# 線性代數/一次聯立方程式與增廣矩陣

## 高斯消去法

### n 元一次聯立方程式

{\displaystyle \left\{{\begin{aligned}a_{11}x_{1}+a_{12}x_{2}=b_{1}\\a_{21}x_{1}+a_{22}x_{2}=b_{2}\end{aligned}}\right.}

{\displaystyle \left\{{\begin{aligned}2x_{1}+x_{2}=1\\3x_{1}-x_{2}=4\end{aligned}}\right.}

{\displaystyle \left\{{\begin{aligned}a_{11}x_{1}+a_{12}x_{2}+\dots +a_{1n}x_{n}&=b_{1}\\a_{21}x_{1}+a_{22}x_{2}+\dots +a_{2n}x_{n}&=b_{2}\\&\vdots \\a_{n1}x_{1}+a_{n2}x_{2}+\dots +a_{nn}x_{n}&=b_{n}\end{aligned}}\right.}

{\displaystyle \left\{{\begin{aligned}3x_{1}+3x_{2}+2x_{3}&=1\\4x_{1}-x_{2}-x_{3}&=-1\\2x_{1}-x_{2}+2x_{3}&=5\end{aligned}}\right.}

### 高斯消去法

{\displaystyle \left\{{\begin{aligned}3x_{1}+3x_{2}+2x_{3}&=1\\4x_{1}-x_{2}-x_{3}&=-1\\2x_{1}-x_{2}+2x_{3}&=5\end{aligned}}\right.{\overset {(1)}{\Longrightarrow }}\left\{{\begin{aligned}15x_{1}-x_{3}&=-2\\4x_{1}-x_{2}-x_{3}&=-1\\-2x_{1}+3x_{3}&=6\end{aligned}}\right.{\overset {(2)}{\Longrightarrow }}\left\{{\begin{aligned}15x_{1}-x_{3}&=-2\\4x_{1}-x_{2}-x_{3}&=-1\\43x_{1}&=0\end{aligned}}\right.}

{\displaystyle \left\{{\begin{aligned}15x_{1}-x_{3}&=-2\\4x_{1}-x_{2}-x_{3}&=-1\\43x_{1}&=0\end{aligned}}\right.{\overset {(3)}{\Longrightarrow }}\left\{{\begin{aligned}-x_{3}&=-2\\-x_{2}-x_{3}&=-1\\x_{1}&=0\end{aligned}}\right.{\overset {(4)}{\Longrightarrow }}\left\{{\begin{aligned}x_{3}&=2\\-x_{2}&=1\\x_{1}&=0\end{aligned}}\right.}

### 特殊情况

• 無解。例如
{\displaystyle \left\{{\begin{aligned}x_{1}-x_{2}+x_{3}&=1\\2x_{1}-2x_{2}+2x_{3}&=3\\2x_{1}-x_{2}+2x_{3}&=5\end{aligned}}\right.}

• 無限多組解。例如
{\displaystyle \left\{{\begin{aligned}x_{1}-x_{2}+x_{3}&=1\\2x_{1}-2x_{2}+2x_{3}&=2\\3x_{1}-3x_{2}+3x_{3}&=3\end{aligned}}\right.}

## 方程组的矩阵表示

### 增廣矩陣

{\displaystyle \left\{{\begin{aligned}a_{11}x_{1}+a_{12}x_{2}+\dots +a_{1n}x_{n}&=b_{1}\\a_{21}x_{1}+a_{22}x_{2}+\dots +a_{2n}x_{n}&=b_{2}\\&\vdots \\a_{n1}x_{1}+a_{n2}x_{2}+\dots +a_{nn}x_{n}&=b_{n}\end{aligned}}\right.}

${\displaystyle \left[{\begin{array}{cccc|c}a_{11}&a_{12}&\dots &a_{1n}&b_{1}\\a_{21}&a_{22}&\dots &a_{2n}&b_{2}\\\vdots &\vdots &\ddots &\vdots &\vdots \\a_{n1}&a_{n2}&\dots &a_{nn}&b_{n}\end{array}}\right]}$

{\displaystyle {\begin{aligned}&\left[{\begin{array}{ccc|c}3&3&2&1\\4&-1&-1&-1\\2&-1&2&5\end{array}}\right]{\overset {(1)}{\Longrightarrow }}\left[{\begin{array}{ccc|c}15&0&-1&-2\\4&-1&-1&-1\\-2&0&3&6\end{array}}\right]{\overset {(2)}{\Longrightarrow }}\left[{\begin{array}{ccc|c}15&0&-1&-2\\4&-1&-1&-1\\43&0&0&0\end{array}}\right]\\{\overset {(3)}{\Longrightarrow }}&\left[{\begin{array}{ccc|c}0&0&-1&-2\\0&-1&-1&-1\\1&0&0&0\end{array}}\right]{\overset {(4)}{\Longrightarrow }}\left[{\begin{array}{ccc|c}0&0&1&2\\0&-1&0&1\\1&0&0&0\end{array}}\right]\end{aligned}}}