线性代数 2.矩阵消元

2.矩阵消元

方程组:
x + 2 y + z = 2 3 x + 8 y + z = 12 4 y + z = 2 x+2y+z = 2 \\3x+8y+z=12 \\4y+z= 2
写为矩阵的形式:
[ 1 2 1 3 8 1 0 4 1 ] [ x y z ] = [ 2 12 2 ] \left[\begin{matrix} 1 & 2 & 1\\ 3& 8 &1\\ 0&4&1\\ \end{matrix}\right] \left[\begin{matrix} x \\y\\z \end{matrix}\right] = \left[\begin{matrix} 2\\12\\2 \end{matrix}\right]
直接的解法是通过(1)(2)(3)进行消元运算,当然是很直接的方法,但是不断地重复x,y,=的书写挺无聊,故我们在此用矩阵消元的方式来解该方程,实际上思想完全一致,只是更加简洁.写出增广矩阵
[ 1 2 1 2 3 8 1 12 0 4 1 2 ] \left[\begin{matrix} 1 & 2 & 1&2\\ 3& 8 &1 &12\\ 0&4&1&2\\ \end{matrix}\right]
开始消元:
[ 1 2 1 2 3 8 1 12 0 4 1 2 ] > [ 1 2 1 2 0 2 2 6 0 4 1 2 ] > [ 1 2 1 2 0 2 2 6 0 0 5 10 ] \left[\begin{matrix} 1 & 2 & 1&2\\ 3& 8 &1 &12\\ 0&4&1&2\\ \end{matrix}\right]-> \left[\begin{matrix} 1 & 2 & 1&2\\ 0& 2 &-2 &6\\ 0&4&1&2\\ \end{matrix}\right]-> \left[\begin{matrix} 1 & 2 & 1&2\\ 0& 2 &-2 &6\\ 0&0&5&-10\\ \end{matrix}\right]
故我们消元后得到的矩阵为:
[ 1 2 1 2 0 2 2 6 0 0 5 10 ] \left[\begin{matrix} 1 & 2 & 1&2\\ 0& 2 &-2 &6\\ 0&0&5&-10\\ \end{matrix}\right]
由下向上解得:
z = 2 y = 2 x = 4 z=-2\\y=2\\x=4
消元过程中行变换是没有影响的,但是列变换将影响变量的位置

我们来分析一下这个过程,泛化一下:

[ ] [ x y z ] = [ a b c ] \left[\begin{matrix} * & * & *\\ *& * &*\\ *&*&*\\ \end{matrix}\right] \left[\begin{matrix} x \\y\\z \end{matrix}\right] = \left[\begin{matrix} a\\b\\c \end{matrix}\right]
还是用列向量和行向量的办法去看,该过程可以分为两个角度去看

列向量的线性组合:
[ ] [ x y z ] = x [ ] + y [ ] + z [ ] = [ a b c ] 1 2 3 \left[\begin{matrix} * & * & *\\ *& * &*\\ *&*&*\\ \end{matrix}\right] \left[\begin{matrix} x \\y\\z \end{matrix}\right] = x \left[\begin{matrix} *\\*\\* \end{matrix}\right]+y \left[\begin{matrix} *\\*\\* \end{matrix}\right]+ z \left[\begin{matrix} *\\*\\* \end{matrix}\right]= \left[\begin{matrix} a\\b\\c \end{matrix}\right]\\------列1 --列2---列3
行向量则是符合矩阵乘法的方式:
1 [ ] [ x y z ] = a 2 [ ] [ x y z ] = b 3 [ ] [ x y z ] = c 行1\left[\begin{matrix} * * * \end{matrix}\right]\left[\begin{matrix} x \\y\\ z \end{matrix}\right] =a\\ 行2\left[\begin{matrix} * * * \end{matrix}\right]\left[\begin{matrix} x \\y\\ z \end{matrix}\right] =b\\ 行3\left[\begin{matrix} * * * \end{matrix}\right]\left[\begin{matrix} x \\y\\ z \end{matrix}\right] =c\\
原始课程笔记:https://ocw.mit.edu/courses/mathematics/18-06sc-linear-algebra-fall-2011/ax-b-and-the-four-subspaces/elimination-with-matrices/MIT18_06SCF11_Ses1.2sum.pdf

发布了68 篇原创文章 · 获赞 36 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/dingdingdodo/article/details/100826789