「統計解析のための線形代数」復習筆記 24

逆矩陣法解連立一次方程式

\(X\)正則矩陣時(\(|X|\neq0\)),給 \(X\underline{a}=\underline{y}\) 等式兩邊同時乘以 \(X^{-1}\),可以得到 \(X^{-1}X\underline{a}=X^{-1}\underline{y}\rightarrow E\underline{a}=X^{-1}\underline{y}\)。由此方法可以得到 \(\underline{a}=X^{-1}\underline{y}\)


練習 解下列連立一次方程式

\[\begin{align} \left\{ \begin{array}{ll} a_1+2a_2+a_3 = 2\\ 2a_1+a_2+a_3 = 3\\ a_1+a_2+2a_3 = 3 \end{array} \right. \end{align}\]


元連立方程式可以寫作\(X\underline{a}=\underline{y}\),其中 \[X=\left( \begin{array}{c} 1 & 2 & 1 \\ 2 & 1 & 1 \\ 1 & 1 & 2 \end{array} \right), \underline{a}=\left( \begin{array}{c} a_1 \\ a_2 \\ a_3 \\ \end{array} \right), \underline{y}=\left( \begin{array}{c} 2 \\ 3 \\ 3 \\ \end{array} \right)\] 之前我們已經用行的基本變形法逆矩陣法分別計算過了 \(X^{-1}\)\[X^{-1}=\left(\begin{array}{c} -1/4 & 3/4 & -1/4\\ 3/4 & -1/4 & -1/4\\ -1/4 & -1/4 & -3/4\\ \end{array}\right)\]

\(\therefore\)

\[\begin{align} \underline{a} & =X^{-1}\underline{y} \\ & =\left(\begin{array}{c} -1/4 & 3/4 & -1/4\\ 3/4 & -1/4 & -1/4\\ -1/4 & -1/4 & 3/4\\ \end{array}\right)\left( \begin{array}{c} 2 \\ 3 \\ 3 \\ \end{array} \right)\\ &=\left( \begin{array}{c} -1/4\times2+3/4\times3-1/4\times3 \\ 3/4\times1+(-1/4)\times3-1/4\times3 \\ -1/4\times2-1/4\times3+3/4\times3 \\ \end{array} \right) \\ & = \left( \begin{array}{c} 1 \\ 0 \\ 1 \\ \end{array} \right) \end{align} \]

Avatar
王 超辰 - Chaochen Wang
Real World Evidence Scientist

All models are wrong, but some are useful.

comments powered by Disqus

Related