# 线性方程组

${\displaystyle \mathbf {A} ={\begin{bmatrix}1&2\\3&4\end{bmatrix}}}$

${\displaystyle {\begin{cases}a_{1,1}x_{1}+a_{1,2}x_{2}+\cdots +a_{1,n}x_{n}=b_{1}\\a_{2,1}x_{1}+a_{2,2}x_{2}+\cdots +a_{2,n}x_{n}=b_{2}\\\vdots \quad \quad \quad \vdots \\a_{m,1}x_{1}+a_{m,2}x_{2}+\cdots +a_{m,n}x_{n}=b_{m}\end{cases}}}$

${\displaystyle \mathbf {A} \mathbf {x} =\mathbf {b} }$

${\displaystyle \mathbf {A} ={\begin{bmatrix}a_{1,1}&a_{1,2}&\cdots &a_{1,n}\\a_{2,1}&a_{2,2}&\cdots &a_{2,n}\\\vdots &\vdots &\ddots &\vdots \\a_{m,1}&a_{m,2}&\cdots &a_{m,n}\end{bmatrix}},\quad \mathbf {x} ={\begin{bmatrix}x_{1}\\x_{2}\\\vdots \\x_{n}\end{bmatrix}},\quad \mathbf {b} ={\begin{bmatrix}b_{1}\\b_{2}\\\vdots \\b_{m}\end{bmatrix}}}$

## 例子

${\displaystyle {\begin{cases}3x_{1}+5x_{2}=4\\x_{1}+2x_{2}=1\end{cases}}}$

${\displaystyle {\begin{bmatrix}3&5\\1&2\end{bmatrix}}\cdot {\begin{bmatrix}x_{1}\\x_{2}\end{bmatrix}}={\begin{bmatrix}4\\1\end{bmatrix}}}$

${\displaystyle {\begin{cases}3\times 3+5\times (-1)=9-5=4\\3+2\times (-1)=3-2=1\end{cases}}}$

${\displaystyle {\begin{cases}x_{1}+x_{2}=2\\2x_{1}+2x_{2}=1\end{cases}}}$

${\displaystyle {\begin{cases}x_{1}+x_{2}=2\end{cases}}}$

${\displaystyle x_{1}=1,\,x_{2}=1}$ 是一组解，而${\displaystyle x_{1}=3,\,x_{2}=-1}$ 也是一组解。事实上，解的个数有无限个。

## 线性方程组的解

• 有唯一解的恰定方程组，
• 解不存在的超定方程组，
• 有无穷多解的欠定方程组（也被通俗地称为不定方程组）。

### 齐次线性方程组

${\displaystyle \mathbf {A} \mathbf {x} =\mathbf {0} }$

${\displaystyle {\begin{cases}3x_{1}+x_{2}+2x_{3}=0\\x_{1}-x_{2}+4x_{3}=0\\2x_{1}+3x_{3}=0\end{cases}}}$

${\displaystyle 2x_{1}+3x_{3}={\frac {1}{2}}(3x_{1}+x_{2}+2x_{3})+{\frac {1}{2}}(x_{1}-x_{2}+4x_{3})}$

## 求解

### 克莱姆法则

${\displaystyle {\begin{cases}a_{1}x+b_{1}y=c_{1}\\a_{2}x+b_{2}y=c_{2}\end{cases}}}$

${\displaystyle x={\frac {D_{x}}{D}},\qquad y={\frac {D_{y}}{D}}}$

${\displaystyle D=\left|{\begin{matrix}a_{1}&b_{1}\\a_{2}&b_{2}\end{matrix}}\right|,}$  ${\displaystyle D_{x}=\left|{\begin{matrix}c_{1}&b_{1}\\c_{2}&b_{2}\end{matrix}}\right|,}$  ${\displaystyle D_{y}=\left|{\begin{matrix}a_{1}&c_{1}\\a_{2}&c_{2}\end{matrix}}\right|}$

${\displaystyle \mathbf {A} \mathbf {x} =\mathbf {b} }$

${\displaystyle {\begin{cases}x_{1}={\frac {D_{1}}{D}}\\x_{2}={\frac {D_{2}}{D}}\\\vdots \qquad \vdots \\x_{n}={\frac {D_{n}}{D}}\end{cases}}}$

${\displaystyle D=\det(\mathbf {A} )}$
${\displaystyle \forall 1\leqslant i\leqslant n,\,\,D_{i}=\det(\mathbf {A_{i}} )}$

${\displaystyle \mathbf {A_{i}} }$ 是将矩阵${\displaystyle \mathbf {A} }$ 的第i纵列换成向量b之后得到的矩阵。