一、线性代数定义
线性代数是计算机专业考研的必考科目,可见它在计算机领域的重要性。相比高等数学,线性代数内容相对较少,也比较好学,但入门偏难,需要认真钻研。
线性代数主要处理线性关系问题,也称线性问题。如果数学对象之间的关系是一次形式(一阶导数为常数的函数)就称它们是线性关系。线性关系指对象之间按比例、成直线的关系
在解析几何中,平面上直线的方程是二元一次方程。空间平面的方程是三元一次方程,空间直线可视为两个空间平面相交,由两个三元一次方程所组成的方程组来表示。因此,含有n个未知量的一次方程称为线性方程,关于变量是一次的函数称为线性函数。解线性方程组是最简单的线性问题。
二、行列式——贯穿线性代数
(一)思维导图
(二)基础知识
定义1.1 n 阶行列式是不同行不同列的n个元素的乘积的代数和(共n!项)
∣
a
11
a
12
⋯
a
1
n
a
21
a
22
⋯
a
2
n
⋮
⋮
⋮
a
n
1
a
n
2
⋯
a
n
n
∣
\left|\begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{1 n} \\ a_{21} & a_{22} & \cdots & a_{2 n} \\ \vdots & \vdots & & \vdots \\ a_{n 1} & a_{n 2} & \cdots & a_{n n} \end{array}\right|
∣
∣a11a21⋮an1a12a22⋮an2⋯⋯⋯a1na2n⋮ann∣
∣
n阶行列式的完全展开式(求值)
∣
a
11
a
12
⋯
a
1
n
a
21
a
22
⋯
a
2
n
⋮
⋮
⋮
a
n
1
a
n
2
⋯
a
n
n
∣
=
∑
j
1
j
2
⋯
j
n
(
−
1
)
τ
(
j
1
j
2
⋯
j
n
)
a
1
j
1
a
2
j
2
⋯
a
n
j
n
\left|\begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{1 n} \\ a_{21} & a_{22} & \cdots & a_{2 n} \\ \vdots & \vdots & & \vdots \\ a_{n 1} & a_{n 2} & \cdots & a_{n n} \end{array}\right|=\sum_{j_{1} j_{2} \cdots j_{n}}(-1)^{\tau\left(j_{1} j_{2} \cdots j_{n}\right)} a_{1 j_{1}} a_{2 j_{2}} \cdots a_{n j_{n}}
∣
∣a11a21⋮an1a12a22⋮an2⋯⋯⋯a1na2n⋮ann∣
∣=j1j2⋯jn∑(−1)τ(j1j2⋯jn)a1j1a2j2⋯anjn
τ
(
j
1
j
2
⋯
j
n
)
\tau\left(j_{1} j_{2} \cdots j_{n}\right)
τ(j1j2⋯jn)表示排列
j
1
j
2
⋯
j
n
j_{1} j_{2} \cdots j_{n}
j1j2⋯jn的n阶行列式的逆序数,如何计算逆序数呢?
对于一个排列,从左往右,从第一个数开始,往后数比它小的数的个数,直到最后一个数。例如排列25134,逆序数等于1+3+0+0+0=4
定义1.2 在n阶行列式中划去元素
a
i
j
a_{ij}
aij所在的第
i
{i}
i行第j列
∣
a
11
a
12
⋯
a
1
n
a
21
a
22
⋯
a
2
n
⋮
⋮
⋮
a
n
1
a
n
2
⋯
a
n
n
∣
\left|\begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{1 n} \\ a_{21} & a_{22} & \cdots & a_{2 n} \\ \vdots & \vdots & & \vdots \\ a_{n 1} & a_{n 2} & \cdots & a_{n n} \end{array}\right|
∣
∣a11a21⋮an1a12a22⋮an2⋯⋯⋯a1na2n⋮ann∣
∣由剩下的元素按原来的排法构成一个n-1阶的行列式就称为
a
i
j
a_{ij}
aij的余子式,记为
M
i
j
M_{ij}
Mij,代数余子式记为
A
i
j
A_{ij}
Aij=
(
−
1
)
i
+
j
M
i
j
(-1)^{i+j} M_{i j}
(−1)i+jMij(带正负)
∣
a
11
⋯
a
1
,
j
−
1
a
1
,
j
+
1
⋯
a
1
n
⋮
⋮
⋮
⋮
a
i
−
1
,
1
⋯
a
i
−
1
,
j
−
1
a
i
−
1
,
j
+
1
⋯
a
i
−
1
,
n
a
i
+
1
,
1
⋯
a
i
+
1
,
j
−
1
a
i
+
1
,
j
+
1
⋯
a
i
+
1
,
n
⋮
⋮
⋮
⋮
a
n
1
⋯
a
n
,
j
−
1
a
n
,
j
+
1
⋯
a
n
n
∣
\left|\begin{array}{cccccc} a_{11} & \cdots & a_{1, j-1} & a_{1, j+1} & \cdots & a_{1 n} \\ \vdots & & \vdots & \vdots & & \vdots \\ a_{i-1,1} & \cdots & a_{i-1, j-1} & a_{i-1, j+1} & \cdots & a_{i-1, n} \\ a_{i+1,1} & \cdots & a_{i+1, j-1} & a_{i+1, j+1} & \cdots & a_{i+1, n} \\ \vdots & & \vdots & \vdots & & \vdots \\ a_{n 1} & \cdots & a_{n, j-1} & a_{n, j+1} & \cdots & a_{n n} \end{array}\right|
∣
∣a11⋮ai−1,1ai+1,1⋮an1⋯⋯⋯⋯a1,j−1⋮ai−1,j−1ai+1,j−1⋮an,j−1a1,j+1⋮ai−1,j+1ai+1,j+1⋮an,j+1⋯⋯⋯⋯a1n⋮ai−1,nai+1,n⋮ann∣
∣
(三)重要定理
定理1.1 n阶行列式D等于它的任意一行的所有元素与它们各自对应的代数余子式的成绩之和
D
=
a
k
1
A
k
1
+
a
k
2
A
k
2
+
⋯
+
a
k
n
A
k
n
(
k
=
1
,
2
,
⋯
,
n
)
D=a_{k 1} A_{k 1}+a_{k 2} A_{k 2}+\cdots+a_{k n} A_{k n} \quad(k=1,2, \cdots, n)
D=ak1Ak1+ak2Ak2+⋯+aknAkn(k=1,2,⋯,n)
定理1.2 n阶行列式D的任意一行的所有元素与另外一行对应的代数余子式之和等于0
a
i
1
A
k
1
+
a
i
2
A
k
2
+
⋯
+
a
i
n
A
k
n
=
0
(
i
≠
k
)
(
i
,
k
=
1
,
2
,
⋯
,
n
)
a_{i 1} A_{k 1}+a_{i 2} A_{k 2}+\cdots+a_{i n} A_{k n}=0(i \neq k)(i, k=1,2, \cdots, n)
ai1Ak1+ai2Ak2+⋯+ainAkn=0(i=k)(i,k=1,2,⋯,n)
(四)重要公式
1. 上(下)三角行列式的值等于主对角线元素的乘积
∣
a
11
a
12
⋯
a
1
n
0
a
22
⋯
a
2
n
⋮
⋮
⋱
⋮
0
0
⋯
a
n
n
∣
=
∣
a
11
0
⋯
0
a
21
a
22
⋯
0
⋮
⋮
⋱
⋮
a
n
1
a
n
2
⋯
a
n
n
∣
=
a
11
a
22
⋯
a
n
n
\left|\begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{1 n} \\ 0 & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & a_{n n} \end{array}\right|=\left|\begin{array}{cccc} a_{11} & 0 & \cdots & 0 \\ a_{21} & a_{22} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ a_{n 1} & a_{n 2} & \cdots & a_{n n} \end{array}\right|=a_{11} a_{22} \cdots a_{nn}
∣
∣a110⋮0a12a22⋮0⋯⋯⋱⋯a1na2n⋮ann∣
∣=∣
∣a11a21⋮an10a22⋮an2⋯⋯⋱⋯00⋮ann∣
∣=a11a22⋯ann
2. 关于副对角线的行列式
∣
a
11
a
12
⋯
a
1
,
n
−
1
a
1
n
a
21
a
22
⋯
a
2
,
n
−
1
0
⋮
⋮
⋮
⋮
a
n
1
0
⋯
0
0
∣
=
∣
0
⋯
0
a
1
n
0
⋯
a
2
,
n
−
1
a
2
n
⋮
⋮
⋮
a
n
1
⋯
a
n
,
n
−
1
a
n
n
∣
=
(
−
1
)
n
(
n
−
1
)
2
a
1
n
a
2
,
n
−
1
⋯
a
n
1
\begin{aligned} \left|\begin{array}{ccccc} a_{11} & a_{12} & \cdots & a_{1, n-1} & a_{1 n} \\ a_{21} & a_{22} & \cdots & a_{2, n-1} & 0 \\ \vdots & \vdots & & \vdots & \vdots \\ a_{n 1} & 0 & \cdots & 0 & 0 \end{array}\right| &=\left|\begin{array}{cccc} 0 & \cdots & 0 & a_{1 n} \\ 0 & \cdots & a_{2, n-1} & a_{2 n} \\ \vdots & & \vdots & \vdots \\ a_{n 1} & \cdots & a_{n, n-1} & a_{n n} \end{array}\right| \\ &=(-1)^{\frac{n(n-1)}{2}} a_{1 n} a_{2, n-1} \cdots a_{n 1} \end{aligned}
∣
∣a11a21⋮an1a12a22⋮0⋯⋯⋯a1,n−1a2,n−1⋮0a1n0⋮0∣
∣=∣
∣00⋮an1⋯⋯⋯0a2,n−1⋮an,n−1a1na2n⋮ann∣
∣=(−1)2n(n−1)a1na2,n−1⋯an1
3. 两个特殊的拉普拉斯展开式
∣
A
∗
O
B
∣
=
∣
A
O
∗
B
∣
=
∣
A
∣
⋅
∣
B
∣
,
∣
O
A
B
∗
∣
=
∣
∗
A
B
O
∣
=
(
−
1
)
m
n
∣
A
∣
⋅
∣
B
∣
\begin{array}{l} \left|\begin{array}{ll} \boldsymbol{A} & * \\ \boldsymbol{O} & \boldsymbol{B} \end{array}\right|=\left|\begin{array}{ll} \boldsymbol{A} & \boldsymbol{O} \\* & \boldsymbol{B} \end{array}\right|=|\boldsymbol{A}| \cdot|\boldsymbol{B}|, \\ \left|\begin{array}{ll} \boldsymbol{O} & \boldsymbol{A} \\ \boldsymbol{B} & * \end{array}\right|=\left|\begin{array}{ll}* & \boldsymbol{A} \\ \boldsymbol{B} & \boldsymbol{O} \end{array}\right|=(-1)^{m n}|\boldsymbol{A}| \cdot|\boldsymbol{B}| \end{array}
∣
∣AO∗B∣
∣=∣
∣A∗OB∣
∣=∣A∣⋅∣B∣,∣
∣OBA∗∣
∣=∣
∣∗BAO∣
∣=(−1)mn∣A∣⋅∣B∣
m,n分别是矩阵A,B的阶数
4. 范德蒙行列式
∣
1
1
⋯
1
x
1
x
2
⋯
x
n
x
1
2
x
2
2
⋯
x
n
2
⋮
⋮
⋮
x
1
n
−
1
x
2
n
−
1
⋯
x
n
n
−
1
∣
=
∏
1
⩽
j
<
i
⩽
n
(
x
i
−
x
j
)
\left|\begin{array}{cccc} 1 & 1 & \cdots & 1 \\ x_{1} & x_{2} & \cdots & x_{n} \\ x_{1}^{2} & x_{2}^{2} & \cdots & x_{n}^{2} \\ \vdots & \vdots & & \vdots \\ x_{1}^{n-1} & x_{2}^{n-1} & \cdots & x_{n}^{n-1} \end{array}\right|=\prod_{1 \leqslant j<i \leqslant n}\left(x_{i}-x_{j}\right)
∣
∣1x1x12⋮x1n−11x2x22⋮x2n−1⋯⋯⋯⋯1xnxn2⋮xnn−1∣
∣=1⩽j<i⩽n∏(xi−xj)
(五)方阵的行列式
- 若A是n阶矩阵,则 A T A^T AT是A的转置矩阵,则 ∣ A T ∣ = ∣ A ∣ |A^T|=|A| ∣AT∣=∣A∣;
- 若A是n阶矩阵,则 ∣ k A ∣ = k n ∣ A ∣ |kA|=k^n|A| ∣kA∣=kn∣A∣;
- 若A,B是n阶矩阵,则 ∣ A B ∣ = ∣ A ∣ ∣ B ∣ |AB|=|A||B| ∣AB∣=∣A∣∣B∣;
- 若A是n阶矩阵, A A ∗ = A ∗ A = ∣ A ∣ E AA^*=A^*A=|A|E AA∗=A∗A=∣A∣E ( A ∗ = [ A 11 A 21 A 31 A 12 A 22 A 32 A 13 A 23 A 33 ] ) A^*= \left [\begin{array}{lll} A_{11} & A_{21} & A_{31} \\ A_{12} & A_{22} & A_{32} \\ A_{13} & A_{23} & A_{33} \end{array}\right]) A∗=⎣ ⎡A11A12A13A21A22A23A31A32A33⎦ ⎤);
- 若A是n阶可逆矩阵,则 ∣ A − 1 ∣ = ∣ A ∣ − 1 |A^{-1}|=|A|^{-1} ∣A−1∣=∣A∣−1(逆矩阵行列式等于原矩阵行列式的倒数);
- 若A是n阶矩阵,则 ∣ A ∗ ∣ |A^*| ∣A∗∣= ∣ A ∣ n − 1 |A|^{n-1} ∣A∣n−1;
- 行列式的值等于特征值的积;
- 若n阶矩阵A和B相似,则 ∣ A ∣ = ∣ B ∣ |A|=|B| ∣A∣=∣B∣ , ∣ A + k E ∣ = ∣ B + k E ∣ |A+kE|=|B+kE| ∣A+kE∣=∣B+kE∣.
(六)克拉默法则
n个方程n个未知数的非齐次线性方程组为
{
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}{c} 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 \\ \vdots \\ 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
其系数行列式D为
D
=
∣
a
11
a
12
⋯
a
1
n
a
21
a
22
⋯
a
2
n
⋮
⋮
⋮
a
n
1
a
n
2
⋯
a
n
n
∣
D=\left|\begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{1 n} \\ a_{21} & a_{22} & \cdots & a_{2 n} \\ \vdots & \vdots & & \vdots \\ a_{n 1} & a_{n 2} & \cdots & a_{n n} \end{array}\right|
D=∣
∣a11a21⋮an1a12a22⋮an2⋯⋯⋯a1na2n⋮ann∣
∣
如果D不等于0,则方程组有唯一解
x
1
=
D
1
D
,
x
2
=
D
2
D
,
⋯
,
x
n
=
D
n
D
,
\begin{array}{c} x_{1}=\frac{D_{1}}{D}, x_{2}=\frac{D_{2}}{D}, \cdots, x_{n}=\frac{D_{n}}{D}, \end{array}
x1=DD1,x2=DD2,⋯,xn=DDn,
D
j
=
∣
a
11
⋯
a
1
,
j
−
1
b
1
a
1
,
j
+
1
⋯
a
1
n
a
21
⋯
a
2
,
j
−
1
b
2
a
2
,
j
+
1
⋯
a
2
n
⋮
⋮
⋮
⋮
⋮
a
n
1
⋯
a
n
,
j
−
1
b
n
a
n
,
j
+
1
⋯
a
n
n
∣
\begin{array}{c} D_{j}=\left|\begin{array}{ccccccc} a_{11} & \cdots & a_{1, j-1} & b_{1} & a_{1, j+1} & \cdots & a_{1 n} \\ a_{21} & \cdots & a_{2, j-1} & b_{2} & a_{2, j+1} & \cdots & a_{2 n} \\ \vdots & & \vdots & \vdots & \vdots & & \vdots \\ a_{n 1} & \cdots & a_{n, j-1} & b_{n} & a_{n, j+1} & \cdots & a_{n n} \end{array}\right| \end{array}
Dj=∣
∣a11a21⋮an1⋯⋯⋯a1,j−1a2,j−1⋮an,j−1b1b2⋮bna1,j+1a2,j+1⋮an,j+1⋯⋯⋯a1na2n⋮ann∣
∣
D
j
D_j
Dj就是把系数行列式第j列换成常数项
D
j
=
∣
b
1
b
2
⋮
b
n
∣
\begin{array}{c} D_{j}=\left|\begin{array}{ccccccc} b_{1} \\ b_{2}\\ \vdots \\ b_{n} \end{array}\right| \end{array}
Dj=∣
∣b1b2⋮bn∣
∣
如果D等于0,则方程组有无穷解或者无解,如何进一步判断?
非齐次线性方程组AX=b
A不动,将b加到A的最后一列,变换成增广矩阵,记为
A
ˉ
\bar{A}
Aˉ,比较A和
A
ˉ
\bar{A}
Aˉ的秩
①若r(A)≠r(
A
ˉ
\bar{A}
Aˉ),则AX=b无解
②若r(A)=r(
A
ˉ
\bar{A}
Aˉ),则AX=b有无穷解
对于齐次线性方程组而言,如果系数行列式D不等于0,则方程组只有零解,如果D等于0,则方程组有无穷解