【線性代數(6)】範德蒙德行列式及克萊姆法則

手動反爬蟲:原博地址

 知識梳理不易,請尊重勞動成果,文章僅發佈在CSDN網站上,在其他網站看到該博文均屬於未經作者授權的惡意爬取信息

如若轉載,請標明出處,謝謝!

1 範德蒙德行列式

D=11...11x1x2...xn1xn(x1)2(x2)2...(xn1)2(xn)2...............(x1)n2(x2)n2...(xn1)n2(xn)n2(x1)n1(x2)n1...(xn1)n1(xn)n1=1j<in(xixj)D = \begin{vmatrix}1&1 &...& 1& 1\\x_{1}&x_{2} &... & x_{n-1}&x_{n} \\(x_{1})^{2}&(x_{2})^{2} &... & (x_{n-1})^{2}&(x_{n})^{2}\\... & ...&... &...&... \\ (x_{1})^{n-2}&(x_{2})^{n-2} &... & (x_{n-1})^{n-2}&(x_{n})^{n-2}\\(x_{1})^{n-1}&(x_{2})^{n-1} &... & (x_{n-1})^{n-1}&(x_{n})^{n-1}\end{vmatrix} = \prod_{1\leqslant j <i \leqslant n }(x_{i} - x_{j})

簡單證明

①當n=2時,顯然成立

②當n>2時,採用由下往上相鄰兩行的上一行乘以x1-x_{1}加到下一行,將第一列全部化爲0

③這時候就變成了加邊法後的結果了,直接可以去掉“加的邊”,此時行列式的階數就由原來的n階變成n-1階了

④然後發現每一列都存在着公因式,因此可以進行提取因式

⑤最後就發現提取的公因式正是j=1時候的表達式相乘,而後面的是在j>1時候的表達式,因此就得證

D=11...11x1x2...xn1xn(x1)2(x2)2...(xn1)2(xn)2...............(x1)n2(x2)n2...(xn1)n2(xn)n2(x1)n1(x2)n1...(xn1)n1(xn)n1D = \begin{vmatrix}1&1 &...& 1& 1\\x_{1}&x_{2} &... & x_{n-1}&x_{n} \\(x_{1})^{2}&(x_{2})^{2} &... & (x_{n-1})^{2}&(x_{n})^{2}\\... & ...&... &...&... \\ (x_{1})^{n-2}&(x_{2})^{n-2} &... & (x_{n-1})^{n-2}&(x_{n})^{n-2}\\(x_{1})^{n-1}&(x_{2})^{n-1} &... & (x_{n-1})^{n-1}&(x_{n})^{n-1}\end{vmatrix}

=   11...110x2x1...xn1x1xnx10(x2)2x1x2...(xn1)2x1xn1(xn)2x1xn...............0(x2)n2x1(x2)n3...(xn1)n2x1(xn1)n3(xn)n2x1(xn)n30(x2)n1x1(x2)n2...(xn1)n1x1(xn1)n2(xn)n1x1(xn)n2= \text{ } \text{ } \text{ }\begin{vmatrix}1&1 &...& 1& 1\\0&x_{2} -x_{1}&... & x_{n-1}-x_{1}&x_{n}-x_{1} \\0&(x_{2})^{2} -x_{1}x_{2}&... & (x_{n-1})^{2} -x_{1}x_{n-1}&(x_{n})^{2}-x_{1}x_{n}\\... & ...&... &...&... \\ 0&(x_{2})^{n-2}-x_{1}(x_{2})^{n-3} &... & (x_{n-1})^{n-2}-x_{1}(x_{n-1})^{n-3}&(x_{n})^{n-2}-x_{1}(x_{n})^{n-3}\\0&(x_{2})^{n-1} -x_{1}(x_{2})^{n-2}&... & (x_{n-1})^{n-1}-x_{1}(x_{n-1})^{n-2}&(x_{n})^{n-1}-x_{1}(x_{n})^{n-2}\end{vmatrix}

=   x2x1...xn1x1xnx1(x2)2x1x2...(xn1)2x1xn1(xn)2x1xn............(x2)n2x1(x2)n3...(xn1)n2x1(xn1)n3(xn)n2x1(xn)n3(x2)n1x1(x2)n2...(xn1)n1x1(xn1)n2(xn)n1x1(xn)n2 = \text{ } \text{ } \text{ }\begin{vmatrix}\\x_{2} -x_{1}&... & x_{n-1}-x_{1}&x_{n}-x_{1} \\(x_{2})^{2} -x_{1}x_{2}&... & (x_{n-1})^{2} -x_{1}x_{n-1}&(x_{n})^{2}-x_{1}x_{n}\\ ...&... &...&... \\ (x_{2})^{n-2}-x_{1}(x_{2})^{n-3} &... & (x_{n-1})^{n-2}-x_{1}(x_{n-1})^{n-3}&(x_{n})^{n-2}-x_{1}(x_{n})^{n-3}\\(x_{2})^{n-1} -x_{1}(x_{2})^{n-2}&... & (x_{n-1})^{n-1}-x_{1}(x_{n-1})^{n-2}&(x_{n})^{n-1}-x_{1}(x_{n})^{n-2}\end{vmatrix}

=   (x2x1)(x2x1)...(xnx1)1...11x2...xn1xn(x2)2...(xn1)2(xn)2............(x2)n2...(xn1)n2(xn)n2(x2)n1...(xn1)n1(xn)n1n1= \text{ } \text{ } \text{ }(x_{2} -x_{1})(x_{2} -x_{1})...(x_{n} -x_{1})\begin{vmatrix}1 &...& 1& 1\\x_{2} &... & x_{n-1}&x_{n} \\(x_{2})^{2} &... & (x_{n-1})^{2}&(x_{n})^{2}\\...&... &...&... \\ (x_{2})^{n-2} &... & (x_{n-1})^{n-2}&(x_{n})^{n-2}\\(x_{2})^{n-1} &... & (x_{n-1})^{n-1}&(x_{n})^{n-1}\end{vmatrix}_{n-1}

=   (x2x1)(x2x1)...(xnx1)2j<in(xixj)   =   1j<in(xixj) = \text{ } \text{ } \text{ }(x_{2} -x_{1})(x_{2} -x_{1})...(x_{n} -x_{1}) \prod_{2\leqslant j <i \leqslant n }(x_{i} - x_{j}) \text{ } \text{ } \text{ }= \text{ } \text{ } \text{ } \prod_{1\leqslant j <i \leqslant n }(x_{i} - x_{j})

5階行列範德蒙德展開

①當j=1時,i = 2,3,4,5

②當j=2時,i = 3,4,5

③當j=3時,i = 4,5

④當j=4時,i = 5

⑤最後展開一共十項

11111x1x2x3x4x5(x1)2(x2)2(x3)2(x4)2(x5)2(x1)3(x2)3(x3)3(x4)3(x5)3(x1)4(x2)4(x2)4(x4)4(x5)4\begin{vmatrix}1&1 &1& 1& 1\\x_{1}&x_{2} &x_{3}& x_{4}&x_{5} \\(x_{1})^{2}&(x_{2})^{2} &(x_{3})^{2}& (x_{4})^{2}&(x_{5})^{2}\\ (x_{1})^{3}&(x_{2})^{3} &(x_{3})^{3} & (x_{4})^{3}&(x_{5})^{3}\\(x_{1})^{4}&(x_{2})^{4} &(x_{2})^{4} & (x_{4})^{4}&(x_{5})^{4}\end{vmatrix}
=   (x2x1)(x3x1)(x4x1)(x5x1)(x3x2)(x4x2)(x5x2)(x4x3)(x5x3)(x5x4)= \text{ } \text{ } \text{ } (x_{2}-x_{1})(x_{3}-x_{1})(x_{4}-x_{1})(x_{5}-x_{1})(x_{3}-x_{2})(x_{4}-x_{2})(x_{5}-x_{2})(x_{4}-x_{3})(x_{5}-x_{3})(x_{5}-x_{4})

小示例

1111151324251941612512786462518116256\begin{vmatrix}1&1 &1& 1& 1\\5&-1 &3& 2&4 \\25&1 &9& 4&16\\125&-1&27&8&64\\ 625&1&81 &16&256\end{vmatrix}
=(15)(35)(25)(45)(3+1)(2+1)(4+1)(23)(43)(42)=4320 =(-1-5)(3-5)(2-5)(4-5)(3+1)(2+1)(4+1)(2-3)(4-3)(4-2)=-4320
python代碼實現

import numpy as np
from numpy.linalg import  *
mydet=np.array([[1,1,1,1,1],[5,-1,3,2,4],[25,1,9,4,16],[125,-1,27,8,64],[625,1,81,16,256]])
print(det(mydet))

→ 輸出的結果爲:(驗證無誤)

-4320.000000000022

2 克萊姆法則

注意克萊姆法則使用的前提條件:方程的個數等於未知數的個數

係數行列式:就是把方程組裏面未知數的係數拿出來組成的行列式,比如下面方程組的係數行列式如下

{x1+x2+x3=7x1x2+5x3=6x1+x2+6x3=9            D=111115116\begin{cases} x_{1}+x_{2} + x_{3} =7 \\ x_{1}-x_{2}+5x_{3}=6\\ -x_{1} +x_{2} +6x_{3} =9 \end{cases} \text{ } \text{ } \text{ } \text{ } \text{ } \text{ } \Rightarrow \text{ } \text{ } \text{ } \text{ } \text{ } \text{ } D = \begin{vmatrix}1&1 &1\\1&-1 &5\\-1&1 &6\end{vmatrix}

如果係數行列式D!=0D != 0,,那麼未知數的解就爲xj=DjDx_{j} =\frac{D_{j}}{D},其中DjD_{j}是將未知數所在的列元素換成方程組等號右側的值,然後其他列的元素就是原係數行列式元素不變,注意觀察每列的變化

D1=711615916      D2=171165196      D3=117116119      D_{1} = \begin{vmatrix}7&1 &1\\6&-1 &5\\9&1 &6\end{vmatrix} \text{ } \text{ } \text{ } \text{ } \text{ } \text{ }D_{2} = \begin{vmatrix}1&7 &1\\1&6 &5\\-1&9&6\end{vmatrix} \text{ } \text{ } \text{ } \text{ } \text{ } \text{ }D_{3} = \begin{vmatrix}1&1 &7\\1&-1 &6\\-1&1&9\end{vmatrix} \text{ } \text{ } \text{ } \text{ } \text{ } \text{ }

故可以算出未知數的解:(很明顯發現D在分母上,所以要求係數行列式不爲0)
x1=D1D=2.41      x2=D2D=3.23      x3=D3D=1.36x_{1} = \frac{D_{1}}{D}=2.41 \text{ } \text{ } \text{ } \text{ } \text{ } \text{ }x_{2} = \frac{D_{2}}{D}= 3.23\text{ } \text{ } \text{ } \text{ } \text{ } \text{ }x_{3} = \frac{D_{3}}{D}=1.36

綜上,克萊姆法則的使用中:①方程的個數與未知數個數相等;②係數行列式的值不爲0;③計算量是非常大的,可藉助編程實現

import numpy as np

d = np.reshape([1,1,1,1,-1,5,-1,1,6],(3,3))
d1 = np.reshape([7,1,1,6,-1,5,9,1,6],(3,3))
d2 = np.reshape([1,7,1,1,6,5,-1,9,6],(3,3))
d3 = np.reshape([1,1,7,1,-1,6,-1,1,9],(3,3))

x1 = np.linalg.det(d1)/np.linalg.det(d)
x2 = np.linalg.det(d2)/np.linalg.det(d)
x3 = np.linalg.det(d3)/np.linalg.det(d)
print(x1,x2,x3)
#2.409090909090908 3.2272727272727266 1.3636363636363635

定理1: 如果多元方程組的右側全爲0(也稱齊次方程組),至少有零解,因爲直接將方程組最後的結果替換到相應的列。DiD_{i}行列式的值均爲0,也就是分子爲0

定理2:對於齊次方程組,且係數行列式不爲0,那麼方程組只有零解

定理3:齊次方程組(方程個數等於未知數個數)有非零解     D=0\iff D = 0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章