\documentclass{ctexart}
\usepackage{amsmath}
\begin{document}
![86b385c78ee061b3784b003cf6f5c083.png](https://pics.latexstudio.net/uploads/20210428/86b385c78ee061b3784b003cf6f5c083.png)
\begin{align*}
\begin{bmatrix}
1 &x_{1} \\
1 &x_{2} \\
1 &x_{3} \\
1 &x_{4} \\
1 &x_{5}
\end{bmatrix}
\begin{bmatrix}
a \\
b
\end{bmatrix}
&=
\begin{bmatrix}
1/y_{1}^{2} \\
1/y_{2}^{2} \\
1/y_{3}^{2} \\
1/y_{4}^{2} \\
1/y_{5}^{2}
\end{bmatrix}
\intertext{\Rightarrow}
\begin{bmatrix}
1 &1 &1 &1 &1 \\
x_{1} &x_{2} &x_{3} &x_{4} &x_{5}
\end{bmatrix}
\begin{bmatrix}
1 &x_{1} \\
1 &x_{2} \\
1 &x_{3} \\
1 &x_{4} \\
1 &x_{5}
\end{bmatrix}
\begin{bmatrix}
a \\
b
\end{bmatrix}
&=
\begin{bmatrix}
1 &1 &1 &1 &1 \\
x_{1} &x_{2} &x_{3} &x_{4} &x_{5}
\end{bmatrix}
\begin{bmatrix}
1/y_{1}^{2} \\
1/y_{2}^{2} \\
1/y_{3}^{2} \\
1/y_{4}^{2} \\
1/y_{5}^{2}
\end{bmatrix}
\intertext{\Rightarrow}
\begin{bmatrix}
5 &\sum_{i=1}^{5}x_{i} \\
\sum_{i=1}^{5}x_{i} &\sum_{i=1}^{5}x_{i}^{2}
\end{bmatrix}
\begin{bmatrix}
a \\
b
\end{bmatrix}
&=
\begin{bmatrix}
\sum_{i=1}^{5}\frac{1}{y_{i}^{2}} \\
\sum_{i=1}^{5}\frac{x_{i}}{y_{i}^{2}}
\end{bmatrix}
\intertext{\Rightarrow}
\begin{bmatrix}
5a + b\sum_{i=1}^{5}x_{i} \\
a\sum_{i=1}^{5}x_{i} + b\sum_{i=1}^{5}x_{i}^{2}
\end{bmatrix}
&=
\begin{bmatrix}
\sum_{i=1}^{5}\frac{1}{y_{i}^{2}} \\
\sum_{i=1}^{5}\frac{x_{i}}{y_{i}^{2}}
\end{bmatrix}
\end{align*}
\end{document}
矩阵的尺寸不一样的时候看上去就是感觉很别扭;运行是没有问题的,但仍然不美观!
\documentclass{ctexart}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\begin{bmatrix}
1 &x_{1} \\
1 &x_{2} \\
1 &x_{3} \\
1 &x_{4} \\
1 &x_{5}
\end{bmatrix}
\begin{bmatrix}
a \\
b
\end{bmatrix}
&=
\begin{bmatrix}
1/y_{1}^{2} \\
1/y_{2}^{2} \\
1/y_{3}^{2} \\
1/y_{4}^{2} \\
1/y_{5}^{2}
\end{bmatrix}
{\Rightarrow}
\begin{bmatrix}
1 &1 &1 &1 &1 \\
x_{1} &x_{2} &x_{3} &x_{4} &x_{5}
\end{bmatrix}
\begin{bmatrix}
1 &x_{1} \\
1 &x_{2} \\
1 &x_{3} \\
1 &x_{4} \\
1 &x_{5}
\end{bmatrix}
\begin{bmatrix}
a \\
b
\end{bmatrix}\\
&=
\begin{bmatrix}
1 &1 &1 &1 &1 \\
x_{1} &x_{2} &x_{3} &x_{4} &x_{5}
\end{bmatrix}
\begin{bmatrix}
1/y_{1}^{2} \\
1/y_{2}^{2} \\
1/y_{3}^{2} \\
1/y_{4}^{2} \\
1/y_{5}^{2}
\end{bmatrix}\\
&{\Rightarrow}
\begin{bmatrix}
5 &\sum_{i=1}^{5}x_{i} \\
\sum_{i=1}^{5}x_{i} &\sum_{i=1}^{5}x_{i}^{2}
\end{bmatrix}
\begin{bmatrix}
a \\
b
\end{bmatrix}\\
&=
\begin{bmatrix}
\sum_{i=1}^{5}\frac{1}{y_{i}^{2}} \\
\sum_{i=1}^{5}\frac{x_{i}}{y_{i}^{2}}
\end{bmatrix}
{\Rightarrow}
\begin{bmatrix}
5a + b\sum_{i=1}^{5}x_{i} \\
a\sum_{i=1}^{5}x_{i} + b\sum_{i=1}^{5}x_{i}^{2}
\end{bmatrix}\\
&=
\begin{bmatrix}
\sum_{i=1}^{5}\frac{1}{y_{i}^{2}} \\
\sum_{i=1}^{5}\frac{x_{i}}{y_{i}^{2}}
\end{bmatrix}
\end{align*}
\end{document}
可以参看:https://latexstudio.net/index/details/index/mid/1372.html(nicematrix)宏包!
怎么感觉这样更怪。。。似乎变得不太清楚了。