一般的线性方程组由 m m m个 n n n元一次方程构成:(方程组1)
a 11 x 1 + a 12 x 2 + ⋯ + a 1 n x n = b 1 , a 21 x 1 + a 22 x 2 + ⋯ + a 2 n x n = b 2 , ⋮ a m 1 x 1 + a m 2 x 2 + ⋯ + a m n x n = b m \begin{aligned}{} a_{11} x_{1}+a_{12} x_{2}+\cdots+a_{1 n} x_{n}&=b_{1}, \\ a_{21} x_{1}+a_{22} x_{2}+\cdots+a_{2 n} x_{n}&=b_{2}, \\ \vdots&\\ a_{m1} x_{1}+a_{m 2} x_{2}+\cdots+a_{m n} x_{n}&=b_{m} \end{aligned} a11x1+a12x2+⋯+a1nxna21x1+a22x2+⋯+a2nxn⋮am1x1+am2x2+⋯+amnxn=b1,=b2,=bm
特别的, m = n m=n m=n时可以写作:(方程组2)
{ a 11 x 1 + a 12 x 2 + ⋯ + a 1 n x n = b 1 , a 21 x 1 + a 22 x 2 + ⋯ + a 2 n x n = b 2 , ⋯ ⋯ ⋯ ⋯ a n 1 x 1 + a n 2 x 2 + ⋯ + a n n x n = b n \left\{\begin{array}{l} a_{11} x_{1}+a_{12} x_{2}+\cdots+a_{1 n} x_{n}=b_{1}, \\ a_{21} x_{1}+a_{22} x_{2}+\cdots+a_{2 n} x_{n}=b_{2}, \\ \cdots \cdots \cdots \cdots \\ a_{n 1} x_{1}+a_{n 2} x_{2}+\cdots+a_{n n} x_{n}=b_{n} \end{array}\right. ⎩ ⎨ ⎧a11x1+a12x2+⋯+a1nxn=b1,a21x1+a22x2+⋯+a2nxn=b2,⋯⋯⋯⋯an1x1+an2x2+⋯+annxn=bn
对应与一般线性方程组 m m m个 n n n元线性方程
A = ( a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋮ a m 1 a m 2 ⋯ a m n ) A=\begin{pmatrix} a_{11}& a_{12}& \cdots&a_{1n} \\ a_{21}& a_{22}& \cdots&a_{2n} \\ \vdots& \vdots& &\vdots \\ a_{m1}& a_{m2}& \cdots&a_{mn} \\ \end{pmatrix} A= a11a21⋮am1a12a22⋮am2⋯⋯⋯a1na2n⋮amn
x = ( x 1 , x 2 , ⋯ , x n ) T = ( x 1 x 2 ⋮ x n ) \boldsymbol{x}=(x_1,x_2,\cdots,x_n)^{T}=\begin{pmatrix} x_{1}\\ x_{2}\\ \vdots\\ x_{n} \end{pmatrix} x=(x1,x2,⋯,xn)T= x1x2⋮xn
b = ( b 1 , b 2 , ⋯ , b m ) T \boldsymbol{b}=(b_1,b_2,\cdots,b_m)^T b=(b1,b2,⋯,bm)T
B = ( A ∣ b ) = ( a 11 a 12 ⋯ a 1 n b 1 a 21 a 22 ⋯ a 2 n b 2 ⋮ ⋮ ⋮ ⋮ a m 1 a m 2 ⋯ a m n b m ) B=(A|b)=\begin{pmatrix} a_{11}& a_{12}& \cdots&a_{1n}&b_1 \\ a_{21}& a_{22}& \cdots&a_{2n} &b_2\\ \vdots& \vdots& &\vdots &\vdots\\ a_{m1}& a_{m2}& \cdots&a_{mn}&b_m \\ \end{pmatrix} B=(A∣b)= a11a21⋮am1a12a22⋮am2⋯⋯⋯a1na2n⋮amnb1b2⋮bm
其中 A A A称为线性方程组的系数矩阵
x \boldsymbol{x} x称为未知数矩阵
b \bold{b} b称为常数项矩阵
B \bold{B} B称为增广矩阵,有时记为 A ‾ \overline{A} A
将 A \bold{A} A按列分块( A = ( α 1 , ⋯ , α n ) \bold{A}=(\alpha_1,\cdots,\alpha_n) A=(α1,⋯,αn)),把 x \bold{x} x按行分块(每块一个元素),则由分块矩阵的乘法有
( α 1 α 2 ⋯ α n ) ( x 1 x 2 ⋮ x n ) \begin{pmatrix} \alpha_1&\alpha_2&\cdots&\alpha_n \end{pmatrix} \begin{pmatrix} x_1\\ x_2\\ \vdots\\ x_n \end{pmatrix} (α1α2⋯αn) x1x2⋮xn
即 x 1 α 1 + ⋯ + x n α n = b x_1\alpha_{1}+\cdots+x_n\alpha_n=\bold{b} x1α1+⋯+xnαn=b,即 ∑ i = 1 n x i α i = b \sum_{i=1}^{n}x_i\alpha_i=\bold{b} ∑i=1nxiαi=b
若方程组2是非齐次线性方程组,且 ∣ A i ∣ ≠ 0 |A_i|\neq{0} ∣Ai∣=0,则方程组有唯一解,且是非零解:
x i = ∣ A i ∣ ∣ A ∣ , i = 1 , 2 , ⋯ n x_i=\frac{|A_i|}{|A|},i=1,2,\cdots{n} xi=∣A∣∣Ai∣,i=1,2,⋯n
其中 ∣ A i ∣ |A_i| ∣Ai∣是 ∣ A ∣ |A| ∣A∣中,第 i i i列元素替换为方程组右端的常数项 b 1 , b 2 , ⋯ , b n b_1,b_2,\cdots,b_n b1,b2,⋯,bn所构成的行列式
或者说: A i ( i = 1 , 2 , ⋯ , n ) A_i(i=1,2,\cdots,n) Ai(i=1,2,⋯,n)是把系数矩阵A中第 i i i列的元素用方程组右端的常数项代替后所得到的 n n n阶矩阵
A i = ( a 11 ⋯ a 1 , i − 1 b 1 a 1 , i + 1 ⋯ a 1 n ⋮ ⋮ ⋮ ⋮ ⋮ a n 1 ⋯ a n , i − 1 b n a n , i + 1 ⋯ a n n ) A_{i}=\begin{pmatrix} a_{11}&\cdots&a_{1,i-1}&b_{1}&a_{1,i+1}&\cdots&a_{1n}\\ \vdots&&\vdots&\vdots&\vdots&&\vdots\\ a_{n1}&\cdots&a_{n,i-1}&b_{n}&a_{n,i+1}&\cdots&a_{nn}\\ \end{pmatrix} Ai= a11⋮an1⋯⋯a1,i−1⋮an,i−1b1⋮bna1,i+1⋮an,i+1⋯⋯a1n⋮ann
唯一解是非零解:因为零解不可能满足非齐次方程组
当方程组2是齐次方程组时,用矩阵乘法的形式可以书写为 A x = 0 \bold{Ax=0} Ax=0
∣ A ∣ ≠ 0 |A|\neq{0} ∣A∣=0的充分必要条件是方程组有唯一解,而且是零解(由0构成的解向量或解矩阵)
notes:
如果仅仅需要讨论一个系数矩阵为带参数(设为 λ \lambda λ)方阵的线性方程组的解的情况,使用Cramer法则可以起到简化分类讨论过程
记系数矩阵为 A = A ( λ ) A=A(\lambda) A=A(λ)
先计算 ∣ A ∣ ≠ 0 |A|\neq{0} ∣A∣=0下,参数 λ \lambda λ的取值情况,若解集可表示为: λ ≠ λ i \lambda\neq\lambda_i λ=λi, i = 1 , 2 ⋯ , t i=1,2\cdots,t i=1,2⋯,t,它们对应方程组有唯一解
再分别利用初等变换法计算 λ = λ i \lambda=\lambda_i λ=λi下方程组的解的情况(可能对应无解或者有无穷多解)
主要用到矩阵的逆,伴随矩阵,行列式降阶展公式和代数余子式的逆用
由线性方程组 A x = b , ∣ A ∣ ≠ 0 Ax=b,|A|\neq{0} Ax=b,∣A∣=0
A − 1 A^{-1} A−1存在,对 A x = b Ax=b Ax=b两边左乘 A − 1 A^{-1} A−1,得到 x = A − 1 b = ( 1 ∣ A ∣ A ∗ ) b \boldsymbol{x}=A^{-1}b=(\frac{1}{|A|}A^{*})b x=A−1b=(∣A∣1A∗)b
由结合律 : x = 1 ∣ A ∣ ( ( A ∗ ) b ) = 1 ∣ A ∣ ( ( A i j ) n × n T b ) x j = 1 ∣ A ∣ ( ∑ k = 1 n b k A k j ) = 1 ∣ A ∣ ∣ A j ∣ , j = 1 , 2 , ⋯ , n 由结合律:\boldsymbol{x}=\frac{1}{|A|}((A^{*})\bold{b}) =\frac{1}{|A|}((A_{ij})^T_{n\times{n}}\bold{b}) \\ x_{j}=\frac{1}{|A|}(\sum\limits_{k=1}^{n}b_kA_{kj}) =\frac{1}{|A|}|A_j|,j=1,2,\cdots,n 由结合律:x=∣A∣1((A∗)b)=∣A∣1((Aij)n×nTb)xj=∣A∣1(k=1∑nbkAkj)=∣A∣1∣Aj∣,j=1,2,⋯,n
A ∗ = A i j = ( A 11 A 21 ⋯ A n 1 A 12 A 22 ⋯ A n 2 ⋮ ⋮ A 1 n A 2 n ⋯ A n n ) b = ( b 1 b 2 ⋮ b n ) P = ( A ∗ ) b p i = ∑ k = 1 n A k i b k A^*=A_{ij}=\begin{pmatrix} A_{11}&A_{21}&\cdots&A_{n1}\\ A_{12}&A_{22}&\cdots&A_{n2}\\ \vdots&&&\vdots\\ A_{1n}&A_{2n}&\cdots&A_{nn} \end{pmatrix} \\ \boldsymbol{b}=\begin{pmatrix} b_{1}\\ b_{2}\\ \vdots\\ b_{n} \end{pmatrix} \\ \boldsymbol{P}=(A^*)\boldsymbol{b} \\ p_i=\sum_{k=1}^{n}A_{ki}b_{k} A∗=Aij= A11A12⋮A1nA21A22A2n⋯⋯⋯An1An2⋮Ann b= b1b2⋮bn P=(A∗)bpi=k=1∑nAkibk
设 x 1 , x 2 \boldsymbol{x_1},\boldsymbol{x_2} x1,x2均为 A x = b Ax=b Ax=b的解向量,则 A x 1 = A x 2 = b Ax_1=Ax_2=b Ax1=Ax2=b