MIT 18.06 線性代數筆記 | Lecture 2: Elimination with Matrices
真沒想到距離上次寫線性代數的筆記剛好隔3個月,真的好巧阿!
Elimination
考慮下列方程式 \(\begin{cases} \ \ x+2y+z&=2\\ 3x+8y+z&=12\\ \ \ \ \ \ \ \ \ \ 4y+z&=2 \end{cases}\)
elimination的過程如下
綠色方框是augmented matrix,代表等式右邊的column;紅色方框是pivot;中間箭頭上方的兩個數字代表的是要被eliminate的對象。Eliminate完後得到u 和c 代表upper triangular matrix和eliminate後等式右邊的column。
Back Substitution
就是將上面eliminate後的結果轉換成下面的方程式,然後再去解x、y、z的值。 \(\begin{cases} \ \ x+2y+\ \ z&=2\\ \ \ \ \ \ \ \ \ \ 2y-5z&=6\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5z&=-10 \end{cases}\)
Elimination Matrix
每個箭頭的operation都能被視為乘上一個elimination matrix。舉例來說,第一個operation可以視為$E_{21}$乘上$A$,也就是
\[E_{21}A= \begin{bmatrix} 1&0&0\\ -3&1&0\\ 0&0&1 \end{bmatrix} \begin{bmatrix} 1&2&1\\ 3&8&1\\ 0&4&1 \end{bmatrix} = \begin{bmatrix} 1&2&1\\ 0&2&-2\\ 0&4&1 \end{bmatrix}\]因此完整的elimination過程為
\[E_{32}(E_{21}A)= \begin{bmatrix} 1&0&0\\ 0&1&0\\ 0&-2&1 \end{bmatrix} \begin{bmatrix} 1&0&0\\ -3&1&0\\ 0&0&1 \end{bmatrix} \begin{bmatrix} 1&2&1\\ 3&8&1\\ 0&4&1 \end{bmatrix} = \begin{bmatrix} 1&2&1\\ 0&2&-2\\ 0&0&5 \end{bmatrix} =u\]Matrix Multiplication
矩陣的乘法只支持結合律(Associative law),不支持交換律(Commutative law),因此矩陣乘法$E_{32}(E_{21}A)$可以變成$(E_{32}E_{21})A$,但不能變成$E_{21}(E_{32}A)$。
另外,從Elimination的例子可以得知,當矩陣乘在被乘矩陣的左邊時,代表該矩陣對被乘矩陣做row operation;反之,當矩陣乘在被乘矩陣的右邊時,代表該矩陣對被乘矩陣做column operation。舉例來說,下列式子中左邊的permutation matrix對右邊矩陣進行row的互換
\[\begin{bmatrix} 0&1\\ 1&0 \end{bmatrix} \begin{bmatrix} a&b\\ c&d \end{bmatrix} = \begin{bmatrix} c&d\\ a&b \end{bmatrix}\]但是如果permutation matrix乘在被乘矩陣的右邊則不能進行row的互換,要乘在左邊才行,如下列式子
\[\begin{bmatrix} a&b\\ c&d \end{bmatrix} \begin{bmatrix} 0&1\\ 1&0 \end{bmatrix} = \begin{bmatrix} b&a\\ d&c \end{bmatrix}\]