36207 利用向量內積與外積求反矩陣
利用向量內積與外積求反矩陣

前言:

給定一個二階方陣或三階方陣 $A$, 要如何求得其乘法反矩陣 $A^{-1}$ 呢?

高中數學課程中, 現行課本中的方法, 一般皆是設出此反矩陣的每一元素, 列出滿足 $A A^{-1}$ $=I$ 的一次方程組, 再使用克拉瑪公式解之, 以一般高中生的計算能力來看, 這個代數方法的過程在矩陣 $A$ 為二階方陣時, 並不費事, 但對三階方陣來說, 就有些繁複了。

其實, 若從向量與幾何的角度, 利用向量的內積與外積來求反矩陣, 在解釋三階方陣的反矩陣求法時, 或許會更簡潔也更有數學的興味喔, 以下我們來說明!

預備知識:

  1. 二矩陣的乘積可視為二矩陣對應向量的內積, 如 ${A}=[a_{ij}]_{m\times n}$, ${B}=[b_{ij}]_{n\times p}$, 則 ${C}=A B=[c_{ij}]_{m\times p}$, 其中矩陣 $A$ 的第 $i$ 列向量為 $\vec a_i=(a_{i1},a_{i2},\ldots,a_{in})$ 矩陣 $B$ 的第 $j$ 行向量為 $\vec b_j=\left[\begin{array}{c} b_{1j}\\ b_{2j}\\ \vdots\\ b_{nj} \end{array}\right]$, 其中 $c_{ij}=\vec a_i\cdot \vec b_j=a_{i1}b_{1j}+a_{i2}b_{2j}+\cdots+a_{in}b_{nj}=\sum\limits_{k=1}^n a_{ik}b_{kj}$。
  2. 設 $\vec a$、 $\vec b$ 為空間中兩個不平行的非零向量, 則 $(\vec a\times \vec b) \perp \vec a$ 且 $(\vec a\times \vec b) \perp \vec b$。
  3. 設 $\vec a=(a_1,a_2,a_3)$, $\vec b=(b_1,b_2,b_3)$, $\vec c=(c_1,c_2,c_3)$, 則 \begin{eqnarray*} \Delta_1&=&\left|\begin{matrix} a_1&a_2&a_3\\ b_1&b_2&b_3\\ c_1&c_2&c_3 \end{matrix}\right|=a_1\left|\begin{matrix} b_2&b_3\\ c_2&c_3 \end{matrix}\right|-a_2\left|\begin{matrix} b_1&b_3\\ c_1&c_3 \end{matrix}\right|+a_3\left|\begin{matrix} b_1&b_2\\ c_1&c_2 \end{matrix}\right|\\ &=&a_1\left|\begin{matrix} b_2&b_3\\ c_2&c_3 \end{matrix}\right|+a_2\left|\begin{matrix} b_3&b_1\\ c_3&c_1 \end{matrix}\right|+a_3\left|\begin{matrix} b_1&b_2\\ c_1&c_2 \end{matrix}\right|\\ &=&(a_1,a_2,a_3)\cdot \left(\left|\begin{matrix} b_2&b_3\\ c_2&c_3 \end{matrix}\right|,\left|\begin{matrix} b_3&b_1\\ c_3&c_1 \end{matrix}\right|,\left|\begin{matrix} b_1&b_2\\ c_1&c_2 \end{matrix}\right|\right)\\ &=&\vec a\cdot(\vec b\times \vec c) \end{eqnarray*} 根據行列式的性質, 得 $\Delta_2=\left|\begin{matrix} b_1&b_2&b_3\\ c_1&c_2&c_3\\ a_1&a_2&a_3 \end{matrix}\right|=\vec b\cdot(\vec c\times \vec a)$; $\Delta_3=\left|\begin{matrix} c_1&c_2&c_3\\ a_1&a_2&a_3\\ b_1&b_2&b_3 \end{matrix}\right|=\vec c\cdot(\vec a\times \vec b)$ 且 $\Delta_1=\Delta_2=\Delta_3$。
  4. $A=\left[\begin{matrix} a&b\\ c&d \end{matrix}\right]\ \Rightarrow\ \det(A)=\left|\begin{matrix} a&b\\ c&d \end{matrix}\right|=ad-bc$ $A=\left[\begin{matrix} a_1&a_2&a_3\\ b_1&b_2&b_3\\ c_1&c_2&c_3 \end{matrix}\right]\ \Rightarrow\ \det(A)&=\left|\begin{matrix} a_1&a_2&a_3\\ b_1&b_2&b_3\\ c_1&c_2&c_3 \end{matrix}\right|\\ &=\vec a\cdot(\vec b\times \vec c)=\vec b\cdot(\vec c\times \vec a)=\vec c\cdot(\vec a\times \vec b)$(承(3))。

問題一: 給定一個二階方陣 $A$, 是否可找到一反矩陣 $A^{-1}$, 使 $A A^{-1}=A^{-1}A=I$?

給二階方陣 $A=\left[\begin{matrix} a&b\\ c&d \end{matrix}\right]$, 若 $A$ 有乘法反矩陣 $A^{-1}$, 我們可用向量內積觀點來找出 $A^{-1}$; 由 $A A^{-1}=\left[\begin{matrix} 1&0\\ 0&1 \end{matrix}\right]$, 可知 $A$ 的第一列與 $A^{-1}$ 的第二行對應之向量內積為 0, $A$ 的第二列與 $A^{-1}$ 的第一行對應之向量內積為 0。

教學設計:

步驟(I):

將二階方陣 $A=\left[\begin{matrix} a&b\\ c&d \end{matrix}\right]$ 第一、二列元素分別視為向量 $\vec u$、 $\vec v$, 其中 $\vec u=(a,b)$, $\vec v=(c,d)$, 現在目標是找到 $A^{-1}=\left[\begin{matrix} e&f\\ g&h \end{matrix}\right]=[\vec x\quad \vec y]$, 其中 $\vec x=\left(\begin{matrix} e\\ g \end{matrix}\right)$, $\vec y=\left(\begin{matrix} f\\ h \end{matrix}\right)\Rightarrow$ 現在想滿足 $A A^{-1}=I$, 也就是 $\left[\begin{matrix} \vec u\\ \vec v \end{matrix}\right][\vec x\quad \vec y]=\left[\begin{matrix} \vec u\cdot\vec x&\vec u\cdot \vec y\\ \vec v\cdot \vec x&\vec v\cdot \vec y \end{matrix}\right]=\left[\begin{matrix}1&0\\ 0&1 \end{matrix}\right]$, 其中 $\vec u$、 $\vec v$ 為已知向量, $\vec x$、 $\vec y$ 為所求向量。 可得 $\left\{\begin{matrix}\vec u\cdot \vec x=1\\ \vec u\cdot\vec y=0\\ \vec v\cdot \vec x=0\\ \vec v\cdot\vec y=1\end{matrix}\right.$, 直觀想法是湊湊看, 但內積值為 0 使我們聯想到找垂直向量, 所以從這個方向著手。

步驟(II):

因為 $\vec u=(a,b)$, $\vec v=(c,d)$, 又 $\vec u\cdot\vec y=0$ 且 $\vec v\cdot\vec x=0$, 因此 $\vec x$, $\vec y$ 有四個選擇, 分別為 \begin{eqnarray*} \hbox{(i)}\hskip .2cm \left\{\begin{matrix} \vec x=\left[\begin{matrix} d\\ -c\end{matrix}\right]\\ \vec y=\left[\begin{matrix} b\\ -a\end{matrix}\right] \end{matrix}\right.&\Rightarrow& A^{-1}=\left[\begin{matrix} d&b\\ -c&-a\end{matrix}\right]\Rightarrow A A^{-1}=\left[\begin{matrix} ad-bc&0\\ 0&bc-ad\end{matrix}\right]\\ \hbox{(ii)}\hskip .2cm\left\{\begin{matrix} \vec x=\left[\begin{matrix} d\\ -c\end{matrix}\right]\\ \vec y=\left[\begin{matrix} -b\\ a\end{matrix}\right] \end{matrix}\right.&\Rightarrow& A^{-1}=\left[\begin{matrix} d&-b\\ -c&a\end{matrix}\right]\Rightarrow A A^{-1}=\left[\begin{matrix} ad-bc&0\\ 0&ad-bc\end{matrix}\right]\\ \hbox{(iii)}\left\{\begin{matrix} \vec x=\left[\begin{matrix} -d\\ c\end{matrix}\right]\\ \vec y=\left[\begin{matrix} b\\ -a\end{matrix}\right] \end{matrix}\right.&\Rightarrow& A^{-1}=\left[\begin{matrix} -d&b\\ c&-a\end{matrix}\right]\Rightarrow A A^{-1}=\left[\begin{matrix} -ad+bc&0\\ 0&-ad+bc\end{matrix}\right]\qquad~\\ \hbox{(iv)}\hskip .1cm \left\{\begin{matrix} \vec x=\left[\begin{matrix} -d\\ c\end{matrix}\right]\\ \vec y=\left[\begin{matrix} -b\\ a\end{matrix}\right] \end{matrix}\right.&\Rightarrow& A^{-1}=\left[\begin{matrix} -d&-b\\ c&a\end{matrix}\right]\Rightarrow A A^{-1}=\left[\begin{matrix} -ad+bc&0\\ 0&ad-bc\end{matrix}\right] \end{eqnarray*} 由以上四種結果來看, 現在雖無法滿足 $\left\{\begin{matrix} \vec u\cdot\vec x=1\\ \vec v\cdot\vec y=1\end{matrix}\right.$, 但要使得 $\vec u\cdot \vec x=\vec v\cdot \vec y$, 所以考慮 (ii) 或 (iii), 再進一步觀察, 發現 (ii) 中 $ad-bc=\det(A)$, 不妨取(ii)來參考, 其實取(iii)亦可。

步驟(III):

因為 $\left[\begin{matrix} a&b\\ c&d\end{matrix}\right]\left[\begin{matrix} d&-b\\ -c&a\end{matrix}\right]=\left[\begin{matrix} ad-bc&0\\ 0&ad-bc\end{matrix}\right]=\left[\begin{matrix} \det(A)&0\\ 0&\det(A)\end{matrix}\right]=\det(A)\left[\begin{matrix} 1&0\\ 0&1\end{matrix}\right]$ 至此可知:當 $\det(A)\not=0$ 時, $A^{-1}$ 才存在, 且由上式得 $\left[\begin{matrix} a&b\\ c&d\end{matrix}\right]\left(\dfrac1{\det(A)} \left[\begin{matrix} d&-b\\ -c&a\end{matrix}\right]\right)=\left[\begin{matrix} 1&0\\ 0&1\end{matrix}\right]$ 即 $A^{-1}=\dfrac1{\det(A)} \left[\begin{matrix} d&-b\\ -c&a\end{matrix}\right]$。

在此, 我們也可得 $A^{-1}A=\dfrac1{\det(A)} \left[\begin{matrix} d&-b\\ -c&a\end{matrix}\right]\left[\begin{matrix} a&b\\ c&d\end{matrix}\right]=\dfrac1{\det(A)} \left[\begin{matrix} ad-bc&0\\ 0&ad-bc\end{matrix}\right]$ $=\dfrac1{\det(A)} \left[\begin{matrix} \det(A)&0\\ 0&\det(A)\end{matrix}\right] =\left[\begin{matrix} 1&0\\ 0&1\end{matrix}\right]$ 同時滿足 $A A^{-1}=A^{-1}A=I$。

接下來我們將求二階反方陣的這種方法延伸至三階反方陣的求法。

問題二:給定一個三階方陣 $A$, 是否可找到一反矩陣 $A^{-1}$, 使 $A A^{-1}=A^{-1}A=I$?

假設給定了 $A=\left[\begin{matrix} a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33} \end{matrix}\right]$, 若 $A$ 有乘法反矩陣 $A^{-1}$, 則滿足 $A A^{-1}=\left[\begin{matrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{matrix}\right]$, 可知 $A$ 的第二列、第三列與 $A^{-1}$ 的第一行對應之向量內積同時為0, $A$ 的第一列、第三列與 $A^{-1}$ 的第二行對應之向量內積同時為 0, $A$ 的第一列、第二列與 $A^{-1}$ 的的第三行對應之向量內積同時為 0。

教學設計:

步驟(I):

將 $A=\left[\begin{matrix} a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33} \end{matrix}\right]$ 第一、二、三列元素分別視為向量 $\vec a$、 $\vec b$、 $\vec c$, 即 $\vec a=(a_{11},a_{12},a_{13})$、 $\vec b=(a_{21},a_{22},a_{23})$、 $\vec c=(a_{31},a_{32},a_{33}) \Rightarrow A=\left[\begin{matrix} a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33} \end{matrix}\right]=\left[\begin{matrix}\vec a\\ \vec b\\ \vec c\end{matrix}\right]$, 將所欲求的反矩陣 $A^{-1}$ 記為 $A^{-1}=\left[\begin{matrix} b_{11}&b_{12}&b_{13}\\ b_{21}&b_{22}&b_{23}\\ b_{31}&b_{32}&b_{33} \end{matrix}\right]=[\vec x\ \vec y\ \vec z]$, 其中 $\vec x=\left(\begin{matrix} b_{11}\\ b_{21}\\ b_{31}\end{matrix}\right)$, $\vec y=\left(\begin{matrix} b_{12}\\ b_{22}\\ b_{32}\end{matrix}\right)$, $\vec z=\left(\begin{matrix} b_{13}\\ b_{23}\\ b_{33}\end{matrix}\right)$ 現在想滿足 $A A^{-1}=I$, 也就是 \begin{equation} \left[\begin{matrix} \vec a\\ \vec b\\ \vec c\end{matrix}\right][\vec x\ \vec y\ \vec z]=\left[\begin{matrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{matrix}\right]\label{1} \end{equation} 其中 $\vec a$、 $\vec b$、 $\vec c$ 為已知向量, $\vec x$、 $\vec y$、 $\vec z$ 為所求向量。

步驟(II):

由矩陣乘法性質可得(1)式中, \begin{eqnarray*} \left[\begin{matrix} \vec a\\ \vec b\\ \vec c\end{matrix}\right][\vec x]&=&\left[\begin{matrix} 1\\ 0\\ 0 \end{matrix}\right] ,\quad \hbox{也就是}\ \left\{\begin{matrix} \vec a\cdot \vec x=1\\ \vec b\cdot \vec x=0\\ \vec c\cdot \vec x=0\end{matrix}\right.\qquad \hbox{(i)}\\ \left[\begin{matrix} \vec a\\ \vec b\\ \vec c\end{matrix}\right][\vec y]&=&\left[\begin{matrix} 0\\ 1\\ 0 \end{matrix}\right] ,\quad \hbox{也就是}\ \left\{\begin{matrix} \vec a\cdot \vec y=0\\ \vec b\cdot \vec y=1\\ \vec c\cdot \vec y=0\end{matrix}\right.\qquad \hbox{(ii)}\\ \left[\begin{matrix} \vec a\\ \vec b\\ \vec c\end{matrix}\right][\vec z]&=&\left[\begin{matrix} 0\\ 0\\ 1 \end{matrix}\right] ,\quad \hbox{也就是}\ \left\{\begin{matrix} \vec a\cdot \vec z=0\\ \vec b\cdot \vec z=0\\ \vec c\cdot \vec z=1\end{matrix}\right.\qquad \hbox{(iii)}\hskip2cm~\\ \end{eqnarray*} 因此可由(i)得知向量 $\vec x$ 需同時與向量 $\vec b$、 $\vec c$ 垂直, 由預備知識中外積運算性質: $(\vec b\times \vec c)\perp \vec b$, $(\vec b\times \vec c)\perp \vec c$ 及二階反方陣求法的精神, 我們不妨暫取 $\vec x=\vec b\times \vec c$, 但這個 $\vec x$ 不一定滿足 $\vec a\cdot(\vec b\times \vec c)=1$, 因此目前可以暫時得到 $\vec x=\vec b\times \vec c$, $\vec y=\vec c\times \vec a$, $\vec z=\vec a\times \vec b$。

步驟(III):

現在我們有 \begin{eqnarray*} \left[\begin{matrix} \vec a\\ \vec b\\ \vec c\end{matrix}\right][\vec x\ \vec y\ \vec z]&=&\left[\begin{matrix} \vec a\\ \vec b\\ \vec c\end{matrix}\right] [\vec b\times \vec c\quad \vec c\times \vec a\quad \vec a\times\vec b]\\ &=&\left[\begin{matrix} \vec a\cdot(\vec b\times \vec c)&0&0\\ 0&\vec b\cdot(\vec c\times \vec a)&0\\ 0&0&\vec c\cdot(\vec a\times \vec b) \end{matrix}\right] \end{eqnarray*} 但因為 $\det(A)=\vec a\cdot(\vec b\times \vec c)=\vec b\cdot(\vec c\times \vec a)=\vec c\cdot(\vec a\times \vec b)= \left|\begin{matrix} a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33} \end{matrix}\right|$\\ (參考預備知識3), 所以 $$\left[\begin{matrix} \vec a\cdot(\vec b\times \vec c)&0&0\\ 0&\vec b\cdot(\vec c\times \vec a)&0\\ 0&0&\vec c\cdot(\vec a\times \vec b) \end{matrix}\right]= \left[\begin{matrix} \det(A)&0&0\\ 0&\det(A)&0\\ 0&0&\det(A) \end{matrix}\right]=\det(A)\left[\begin{matrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{matrix}\right]$$ 因此我們現在有 $$\left[\begin{matrix} \vec a\\ \vec b\\ \vec c\end{matrix}\right][\vec x\ \vec y\ \vec z]=\left[\begin{matrix} \vec a\\ \vec b\\ \vec c\end{matrix}\right] [\vec b\times \vec c\quad \vec c\times \vec a\quad \vec a\times\vec b]=\det(A)\left[\begin{matrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{matrix}\right]$$ 當 $\det(A)\not=0$ 時, 等式兩邊同時除以 $\det(A)$ $$\left[\begin{matrix} \vec a\\ \vec b\\ \vec c\end{matrix}\right] %[\vec x\ \vec y\ \vec z] \cdot \frac 1{\det(A)}[\vec b\times \vec c\quad \vec c\times \vec a\quad \vec a\times\vec b]= \left[\begin{matrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{matrix}\right]$$ 結論:當 $\det(A)\not=0$ 時, $A^{-1}$ 才存在, 且由上式可得 $$A^{-1}=\frac 1{\det(A)}[\vec b\times \vec c\quad \vec c\times \vec a\quad \vec a\times\vec b]=\frac 1{\det(A)} \left[\begin{matrix} \left|\begin{matrix} a_{22}&a_{23}\\ a_{32}&a_{33} \end{matrix}\right|&\left|\begin{matrix} a_{32}&a_{33}\\ a_{12}&a_{13} \end{matrix}\right|&\left|\begin{matrix} a_{12}&a_{13}\\ a_{22}&a_{23} \end{matrix}\right|\\ \left|\begin{matrix} a_{23}&a_{21}\\ a_{33}&a_{31} \end{matrix}\right|&\left|\begin{matrix} a_{33}&a_{31}\\ a_{13}&a_{11} \end{matrix}\right|&\left|\begin{matrix} a_{13}&a_{11}\\ a_{23}&a_{21} \end{matrix}\right|\\ \left|\begin{matrix} a_{21}&a_{22}\\ a_{31}&a_{32} \end{matrix}\right|&\left|\begin{matrix} a_{31}&a_{32}\\ a_{11}&a_{12} \end{matrix}\right|&\left|\begin{matrix} a_{11}&a_{12}\\ a_{21}&a_{22} \end{matrix}\right| \end{matrix}\right],$$ 而且 \begin{eqnarray*} A^{-1}A&=&\frac 1{\det(A)} \left[\begin{matrix} \left|\begin{matrix} a_{22}&a_{23}\\ a_{32}&a_{33} \end{matrix}\right|&\left|\begin{matrix} a_{32}&a_{33}\\ a_{12}&a_{13} \end{matrix}\right|&\left|\begin{matrix} a_{12}&a_{13}\\ a_{22}&a_{23} \end{matrix}\right|\\ \left|\begin{matrix} a_{23}&a_{21}\\ a_{33}&a_{31} \end{matrix}\right|&\left|\begin{matrix} a_{33}&a_{31}\\ a_{13}&a_{11} \end{matrix}\right|&\left|\begin{matrix} a_{13}&a_{11}\\ a_{23}&a_{21} \end{matrix}\right|\\ \left|\begin{matrix} a_{21}&a_{22}\\ a_{31}&a_{32} \end{matrix}\right|&\left|\begin{matrix} a_{31}&a_{32}\\ a_{11}&a_{12} \end{matrix}\right|&\left|\begin{matrix} a_{11}&a_{12}\\ a_{21}&a_{22} \end{matrix}\right| \end{matrix}\right] \left[\begin{matrix} a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33} \end{matrix}\right]\\ &=&\left[\begin{matrix} \det(A)&0&0\\ 0&\det(A)&0\\ 0&0&\det(A) \end{matrix}\right] =\det(A)\left[\begin{matrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{matrix}\right]=I \end{eqnarray*} 同時滿足 $A A^{-1}=A^{-1}A=I$。

結語:

  1. 高中現行課程在三維空間中介紹向量外積, 所以我們利用向量的內積與外積推導反矩陣只討論到三階方陣, 四階以上的反矩陣求法還是回歸矩陣列運算。
  2. 95課綱中高三選修I第二章矩陣2-4小節及99課綱中第四冊第一章空間向量 1$-$4 小節中介紹三階行列式與向量外積的概念, 但若由此向量內積與外積觀點來對學生介紹反方陣求法, 可以另外增加學生對三階行列式值的操作經驗, 靈活運用向量內積與外積, 老師們不妨試試除了克拉瑪法則之外的此種方法。

參考文獻

高中數學課程95課綱及99課綱。 全華高中數學課本選修I。

---本文作者李瑞為台北市建國中學數學科退休教師;
鄭金樹為台北市中山女高數學科退休教師;
洪瑞英、吳汀菱任教台北市中山女高---