## Chiò 演算法──另類行列式計算法

\begin{aligned} \left|\!\!\begin{array}{rrc} 2&-5&4\\ 1&0&3\\ -4&5&3 \end{array}\!\!\right|&=(-1)\left|\!\!\begin{array}{rc} -5&4\\ 5&3 \end{array}\!\!\right|+0\left|\!\!\begin{array}{rc} 2&4\\ -4&3 \end{array}\!\!\right|-3\left|\!\!\begin{array}{rr} 2&-5\\ -4&5 \end{array}\!\!\right|\\ &=(-1)(-15-20)-3(10-20)=65.\end{aligned}

\begin{aligned} \left|\!\!\begin{array}{rrc} 2&-5&4\\ 1&0&3\\ -4&5&3 \end{array}\!\!\right|&=-\left|\!\!\begin{array}{rrc} 1&0&3\\ 2&-5&4\\ -4&5&3 \end{array}\!\!\right|=-\left|\!\!\begin{array}{crr} 1&0&3\\ 0&-5&-2\\ 0&5&15 \end{array}\!\!\right|=-\left|\!\!\begin{array}{crr} 1&0&3\\ 0&-5&-2\\ 0&0&13 \end{array}\!\!\right|\\ &=-1\cdot(-5)\cdot 13=65.\end{aligned}

$A=[a_{ij}]$$n\times n$ 階矩陣，且 $a_{nn}\neq 0$，稱為軸元 (pivot element)，稍後會說明如何將此限制排除。令 $D=[d_{ij}]$$(n-1)\times(n-1)$ 階矩陣，各元定義為

$d_{ij}=\begin{vmatrix} a_{ij}&a_{in}\\ a_{nj}&a_{nn} \end{vmatrix},~~1\le i,j\le n-1$

$\det D=(a_{nn})^{n-2}\det A$

Chiò 行列式計算法即由上式給出，

$\det A=\displaystyle\frac{1}{(a_{nn})^{n-2}}\det D$

$\det A=\left|\!\!\begin{array}{rrcr} 2&-5&4&1\\ 1&0&3&-2\\ -4&5&3&0\\ -2&1&1&2 \end{array}\!\!\right|$

\begin{aligned} \det A&=\displaystyle\frac{1}{2^{4-2}}\begin{vmatrix} \left|\!\!\begin{array}{rc} 2&1\\ -2&2 \end{array}\!\!\right|&\left|\!\!\begin{array}{rc} -5&1\\ 1&2 \end{array}\!\!\right|& \left|\!\!\begin{array}{cc} 4&1\\ 1&2\end{array}\!\!\right|\\ ~&~&~\\ \left|\!\!\begin{array}{rr} 1&-2 \\-2&2\end{array}\!\!\right| &\left|\!\!\begin{array}{cr} 0&-2\\1 &2 \end{array}\!\!\right| &\left|\!\!\begin{array}{cr} 3&-2\\ 1&2\end{array}\!\!\right|\\ ~&~&~\\ \left|\!\!\begin{array}{rc} -4&0\\ -2&2 \end{array}\!\!\right| &\left|\!\!\begin{array}{cc} 5&0\\ 1&2\end{array}\!\!\right| &\left|\!\!\begin{array}{cc} 3&0\\ 1&2 \end{array}\!\!\right|\end{vmatrix}=\frac{1}{4}\left|\!\!\begin{array}{rrc} 6&-11&7\\ -2&2&8\\ -8&10&6 \end{array}\!\!\right|\end{aligned}

\begin{aligned} \det A&=\displaystyle\frac{1}{4}\cdot\frac{1}{6^{3-2}}\begin{vmatrix} \left|\!\!\begin{array}{rc}6&7\\-8&6\end{array}\!\!\right|&\left|\!\!\begin{array}{rc}-11&7\\10&6\end{array}\!\!\right|\\ ~&~\\ \begin{vmatrix}-2&8\\-8&6\end{vmatrix}&\left|\!\!\begin{array}{rc}2&8\\10&6\end{array}\!\!\right| \end{vmatrix}=\frac{1}{24}\left|\!\!\begin{array}{cr} 92&-136\\ 52&-68 \end{array}\!\!\right|=34\end{aligned}

Chiò 演算法的證明過程只需運用幾個行列式基本性質，比較奇特的是起頭的第一步，將矩陣 $A$ 的前 $n-1$ 列的每個元都乘以 $a_{nn}$，稱此 $n\times n$ 階矩陣為 $B$

$B=\begin{bmatrix} a_{11}a_{nn}&a_{12}a_{nn}&\cdots&a_{1n}a_{nn}\\ \vdots&\vdots&\ddots&\vdots\\ a_{n-1,1}a_{nn}&a_{n-1,2}a_{nn}&\cdots&a_{n-1,n}a_{nn}\\ a_{n1}&a_{n2}&\cdots&a_{nn} \end{bmatrix}$

$\det B=(a_{nn})^{n-1}\det A$

$C=\begin{bmatrix} a_{11}a_{nn}-a_{1n}a_{n1}&\cdots&a_{1,n-1}a_{nn}-a_{1n}a_{n,n-1}&0\\ \vdots&\ddots&\vdots&\vdots\\ a_{n-1,1}a_{nn}-a_{n-1,n}a_{n1}&\cdots&a_{n-1,n}a_{nn}-a_{n-1,n}a_{n,n-1}&0\\ a_{n1}&\cdots&a_{n,n-1}&a_{nn} \end{bmatrix}$

$C=\begin{bmatrix} D&\mathbf{0}\\ \mathbf{c}^T&a_{nn} \end{bmatrix}$

$\displaystyle \det A=\displaystyle\frac{1}{(a_{nn})^{n-1}}\det B=\frac{1}{(a_{nn})^{n-1}}\det C=\frac{1}{(a_{nn})^{n-2}}\det D$

Chiò 演算法還有一個問題要解決：萬一 $a_{nn}=0$ 該怎麼辦？事實上，矩陣裡的任何非零元 $a_{pq}$ 都可以當作軸元，我們僅需將第 $p$ 列和第 $n$ 列交換，再將第 $q$ 行和第 $n$ 行交換即可，每交換一次列或行就改變行列式的正負號。以上面的行列式為例，將第三行與第四行交換，

$\left|\!\!\begin{array}{rrcr} 2&-5&4&1\\ 1&0&3&-2\\ -4&5&3&0\\ -2&1&1&2 \end{array}\!\!\right|=-\left|\!\!\begin{array}{rrrc} 2&-5&1&4\\ 1&0&-2&3\\ -4&5&0&3\\ -2&1&2&1 \end{array}\!\!\right|$

$-\begin{vmatrix} \left|\!\!\begin{array}{rc}2&4\\-2&1\end{array}\!\!\right|&\left|\!\!\begin{array}{rc}-5&4\\1&1\end{array}\!\!\right|&\begin{vmatrix}1&4\\2&1\end{vmatrix}\\ ~&~&~\\ \left|\!\!\begin{array}{rc}1&3\\-2&1\end{array}\!\!\right|&\begin{vmatrix}0&3\\1&1\end{vmatrix}&\left|\!\!\begin{array}{rc}-2&3\\2&1\end{array}\!\!\right|\\ ~&~&~\\ \begin{vmatrix}-4&3\\-2&1\end{vmatrix}&\begin{vmatrix}5&3\\1&1\end{vmatrix}&\begin{vmatrix}0&3\\2&1\end{vmatrix} \end{vmatrix}=-\left|\!\!\begin{array}{rrr} 10&-9&-7\\ 7&-3&-8\\ 2&2&-6 \end{array}\!\!\right|$

$\displaystyle 2((n-1)^2+(n-2)^2+\cdots+2^2+1)=2\displaystyle\frac{1}{6}(n-1)n(2n-1)\approx\frac{2}{3}n^3$

[1] L.E. Fuller and J.D. Logan, On the Evaluation of Determinants by Chiò’s Method, College Mathematics Journal, vol.6, pp 8-10, 1975.
[2] 採用 Laplace 展開 (餘因子展開)，以第一列展開計算所有的行列式，

\begin{aligned} \left|\!\!\begin{array}{rrcr} 2&-5&4&1\\ 1&0&3&-2\\ -4&5&3&0\\ -2&1&1&2 \end{array}\!\!\right|&= 2\left|\!\!\begin{array}{rcr} 0&3&-2\\ 5&3&0\\ 1&1&2 \end{array}\!\!\right|+5\left|\!\!\begin{array}{rcr} 1&3&-2\\ -4&3&0\\ -2&1&2 \end{array}\!\!\right|+4\left|\!\!\begin{array}{rrr} 1&0&-2\\ -4&5&0\\ -2&1&2 \end{array}\!\!\right|-1\left|\!\!\begin{array}{rrc} 1&0&3\\ -4&5&3\\ -2&1&1 \end{array}\!\!\right|\\ &=2\left(0\left|\!\!\begin{array}{cr} 3&0\\ 1&2 \end{array}\!\!\right|-3\left|\!\!\begin{array}{rr} 5&0\\ 1&2 \end{array}\!\!\right|-2\left|\!\!\begin{array}{rc} 5&3\\ 1&1 \end{array}\!\!\right|\right)\\ &~~~+5\left(1\left|\!\!\begin{array}{cr} 3&0\\ 1&2 \end{array}\!\!\right|-3\left|\!\!\begin{array}{rr} -4&0\\ -2&2 \end{array}\!\!\right|-2\left|\!\!\begin{array}{rc} -4&3\\ -2&1 \end{array}\!\!\right|\right)\\ &~~~+4\left(1\left|\!\!\begin{array}{rr} 5&0\\ 1&2 \end{array}\!\!\right|+0\left|\!\!\begin{array}{rr} -4&0\\ -2&2 \end{array}\!\!\right|-2\left|\!\!\begin{array}{rr} -4&5\\ -2&1 \end{array}\!\!\right|\right)\\ &~~~-\left(1\left|\!\!\begin{array}{rrc} 5&3\\ 1&1 \end{array}\!\!\right|+0\left|\!\!\begin{array}{rc} -4&3\\ -2&1 \end{array}\!\!\right|+3\left|\!\!\begin{array}{rr} -4&5\\ -2&1 \end{array}\!\!\right|\right)\\ &=2(0-30-4)+5(6+24-4)+4(10+0-12)-(2+0+18)\\ &=-68+130-8-20=34.\end{aligned}

### 3 Responses to Chiò 演算法──另類行列式計算法

1. 蒋sir 說道：

但是，其实上这个方法并没有给问题带来化简的作用。就上面那个4X4的矩阵而言，Lapalace展开需要计算12个二阶行列式，而这个算法也一样要计算这么多。Lapalace只设计加减乘，而这个方法还具有除与乘方。这或许是他失传的一个很重要的原因吧。

2. 蔡金龍 說道：

很有用 感謝

• 蔡金龍 說道：

感謝大大的文章 轉C++ 就可行了