线性代数(MIT)

线性代数

矩阵消元

矩阵行变化, 相当于左乘矩阵.

如下矩阵乘法为对第一行进行行变化row1:=row1+2∗row2−row3row1 := row1 + 2*row2 - row3row1:=row1+2row2row3.
[12−1010001][−.row1−−.row2−−.row3−] \begin{bmatrix} 1 & 2 & -1\\ 0 & 1 & 0\\ 0 & 0 & 1\\ \end{bmatrix} \begin{bmatrix} -. & row1 & - \\ -. & row2 & - \\ -. & row3 & - \\ \end{bmatrix} 100210101...row1row2row3

矩阵乘法的几种理解

An×m⋅Bm×p=Cn×p A_{n \times m}\cdot B_{m \times p} = C_{n \times p} An×mBm×p=Cn×p

从单个元素的角度

Ci,j=∑k=1mAi,k⋅Bk,j C_{i,j} = \sum_{k=1}^m{A_{i,k} \cdot B_{k,j}} Ci,j=k=1mAi,kBk,j

列角度

[∣∣⋯col1col2⋯∣∣⋯]⋅[∣⋯col1⋯∣⋯]=[∣⋯col1⋯∣⋯] \begin{bmatrix} | & | & \cdots \\ col1 & col2 & \cdots \\ | & | & \cdots \\ \end{bmatrix} \cdot \begin{bmatrix} | & \cdots \\ col1 & \cdots \\ | & \cdots \\ \end{bmatrix}= \begin{bmatrix} | & \cdots \\ col1 & \cdots \\ | & \cdots \\ \end{bmatrix} col1col2col1=col1

col1 of Ccol1\ of\ Ccol1 of CAAA的每一列的线性组合, 每一列的权重为col1 of Bcol1\ of\ Bcol1 of B.

行角度

[−.row1−⋯⋯⋯⋮⋮⋮]⋅[−.row1−−.row2−⋮⋮⋮]=[−.row1−⋯⋯⋯⋮⋮⋮] \begin{bmatrix} -. & row1 & - \\ \cdots & \cdots & \cdots \\ \vdots & \vdots & \vdots \\ \end{bmatrix} \cdot \begin{bmatrix} -. & row1 & - \\ -. & row2 & - \\ \vdots & \vdots & \vdots \\ \end{bmatrix}= \begin{bmatrix} -. & row1 & - \\ \cdots & \cdots & \cdots \\ \vdots & \vdots & \vdots \\ \end{bmatrix} .row1..row1row2=.row1
row1 of Crow1\ of\ Crow1 of CBBB的每一行的线性组合, 每一行的权重为row1 of Arow1\ of\ Arow1 of A.

列乘行的角度

A=[col1col2⋯],B=[row1row2⋮]A⋅B=∑i=1mcoli⋅rowi A = \begin{bmatrix} col1 & col2 & \cdots \end{bmatrix}, B = \begin{bmatrix} row1 \\ row2 \\ \vdots \end{bmatrix}\\ A \cdot B = \sum_{i=1}^m{col_i \cdot row_i} A=[col1col2],B=row1row2AB=i=1mcolirowi

例子
col1=[234],row1=[16]col1⋅row1=[234]⋅[16]=[212318424] col1 = \begin{bmatrix}2 \\ 3 \\ 4 \end{bmatrix},row1=\begin{bmatrix}1 & 6\end{bmatrix}\\ col1 \cdot row1 = \begin{bmatrix}2 \\ 3 \\ 4 \end{bmatrix} \cdot \begin{bmatrix}1 & 6\end{bmatrix}= \begin{bmatrix} 2 & 12\\ 3 & 18\\ 4 & 24\\ \end{bmatrix} col1=234,row1=[16]col1row1=234[16]=234121824

分块角度

以上三种角度都可以用分块角度很直观地看出.

矩阵的逆

可逆

若存在x≠0, A⋅x=0x \neq 0,\ A \cdot x = 0x=0, Ax=0, 则AAA是奇异矩阵, 不可逆.

证明:

假设存在B⋅A=IB \cdot A = IBA=I, 则有
A⋅x=0B⋅Ax=0I⋅x=0x=0 A\cdot x = 0\\ B \cdot Ax = 0\\ I \cdot x = 0\\ x = 0 Ax=0BAx=0Ix=0x=0
矛盾. 故B不存在B不存在B.

逆的计算

Gauss-Jordan消元法对[AI]\begin{bmatrix}A & I\end{bmatrix}[AI]进行消元, 最后100左边消为III, 右边即为A−1A^{-1}A1. 由于矩阵行变化相当于左乘矩阵, 故
∵E⋅A=I∴E⋅I=A−1E⋅[AI]=[IA−1] \because E \cdot A = I\\ \therefore E \cdot I = A^{-1}\\ E \cdot \begin{bmatrix}A & I\end{bmatrix} = \begin{bmatrix}I & A^{-1}\end{bmatrix} EA=IEI=A1E[AI]=[IA1]

LU分解

把A进行行变化, 得到上三角矩阵U.(不使用行交换).

A3×3A_{3\times 3}A3×3例子
E2,1⋅E3,1⋅E3,2⋅A=UA=E3,2−1⋅E3,1−1⋅E2,1−1⋅U=LU E_{2,1}\cdot E_{3,1}\cdot E_{3,2}\cdot A = U\\ A = E_{3,2}^{-1}\cdot E_{3,1}^{-1}\cdot E_{2,1}^{-1}\cdot U = LU E2,1E3,1E3,2A=UA=E3,21E3,11E2,11U=LU

转置、置换、向量空间

置换矩阵

置换矩阵(permutations)是指可以让矩阵进行 行交换(row exchanges)的矩阵。n×nn\times nn×n的置换矩阵就是通过单位矩阵行交换的得到,个数为n!n!n!。他们的逆矩阵都在这个群里。进一步来说,逆矩阵相当于把做的交换逆回去,故有
P−1=PT P^{-1} = P^{T} P1=PT

所以,当需要行交换的时候, LU分解应该写成
PA=LU PA=LU PA=LU

转置

对于任意矩阵RRRRTRR^{T}RRTR是对称矩阵恒成立。即(RTR)T=RTR(R^TR)^T=R^TR(RTR)T=RTR.

向量空间

满足数乘和加法封闭性。最小的向量空间只有零向量。

列空间和零空间

两个子空间SSSTTT的交集也是一个子空间。因为v,w∈S∩Tv,w\in S\cap Tv,wST,所以v+w∈S,v+w∈Tv+w\in S, v+w\in Tv+wS,v+wT,即v+w∈S∩Tv+w\in S\cap Tv+wST

列向量空间

A=[112213314415] A=\begin{bmatrix}1 & 1 & 2 \\ 2 & 1 & 3 \\ 3 & 1 & 4 \\ 4 & 1 & 5\end{bmatrix} A=123411112345

A的列向量子空间是4维空间中的子空间,不能覆盖整个4维空间。用方程组来说,就是Ax=bAx=bAx=b并不是对于所有的bbb都有解,xxx是各个列向量线性组合的权重。有解的bbb是各列的线性组合,即bbb 属于AAA的列空间C(A)C(A)C(A)

A⋅x=[112213314415]⋅[x1x2x3]=[b1b2b3b4] A \cdot x = \begin{bmatrix}1 & 1 & 2 \\ 2 & 1 & 3 \\ 3 & 1 & 4 \\ 4 & 1 & 5\end{bmatrix}\cdot \begin{bmatrix}x_1 \\ x_2 \\ x_3 \end{bmatrix}= \begin{bmatrix} b_1\\ b_2\\ b_3\\ b_4 \end{bmatrix} Ax=123411112345x1x2x3=b1b2b3b4

零空间

Ax=0Ax=0Ax=0的所有解x∈R4x\in R^4xR4组成零空间N(A)N(A)N(A)。至少包含零向量。

用上面的例子,零空间的向量形如以下形式,是一条直线。
[cc−c] \begin{bmatrix} c\\ c\\ -c\\ \end{bmatrix} ccc
证明为什么Ax=0Ax=0Ax=0得到的所有向量一定构成一个向量空间

x,x∗为两个解x,x^*为两个解x,x,则有
Ax=0, Ax∗=0 Ax=0,\ Ax^*=0\\ Ax=0, Ax=0

A(x+x∗)=Ax+Ax∗=0+0=0A(kx)=kAx=0 A(x + x^*) =Ax+Ax^*=0+0=0\\ A(kx)=kAx=0 A(x+x)=Ax+Ax=0+0=0A(kx)=kAx=0
故向量加法和数乘都在向量空间内,故符合向量空间的定义。

Ax=0Ax=0Ax=0的主元和特解

Ax=0Ax=0Ax=0 的解不会因对AAA矩阵进行初等行变化而改变。可以从两个角度得到这个结论。

  1. 进行行变化时,只是对A矩阵每一列内部的行之间进行变化,每列的变化相同。列与列之间的关系不变。
  2. 进行初等行变化相当于左乘一个矩阵EEE,而EAx=0EAx=0EAx=0仍然成立。

矩阵的秩就是矩阵进行行变化之后的主元的个数。
A=[1222246836810]=>U=[122200240000]=>R=[120−200120000] A=\begin{bmatrix}1 & 2 & 2 & 2\\ 2 & 4 & 6 & 8 \\ 3 & 6 & 8 & 10\end{bmatrix}\\ =>\\ U=\begin{bmatrix}1 & 2 & 2 & 2\\ 0& 0& 2 & 4 \\ 0 & 0& 0 & 0\end{bmatrix}\\ =>\\ R=\begin{bmatrix}1 & 2 & 0 & -2\\ 0& 0& 1 & 2 \\ 0 & 0& 0 & 0\end{bmatrix}\\ A=1232462682810=>U=100200220240=>R=100200010220
AAA的秩r=2r=2r=2UUU的第一列和第三列为主列(pivot columns),第二列和第四列为自由列(free columns)。Ax=0Ax=0Ax=0的自由元的个数为n−r=4−2=2n-r=4-2=2nr=42=2。零空间就是让自由元逐一等于1得到的向量之间的线性组合。
x=c⋅[−2100]+d⋅[20−21] x=c\cdot \begin{bmatrix} -2\\ 1\\ 0\\ 0 \end{bmatrix} +d \cdot \begin{bmatrix} 2\\ 0\\ -2\\ 1 \end{bmatrix} x=c2100+d2021
RRR矩阵中的主列凑在一起,把自由列组合在一起,就可以得到rref形式的RRR矩阵。
I=[1001],F=[2−202]R=[[1001][2−202]0000] I=\begin{bmatrix}1&0\\0&1\end{bmatrix},F=\begin{bmatrix}2&-2\\0&2\end{bmatrix} R=\begin{bmatrix}\begin{bmatrix}1&0\\0&1\end{bmatrix}&\begin{bmatrix}2&-2\\0&2\end{bmatrix}\\ \begin{matrix}0&0\end{matrix}&\begin{matrix}0&0\end{matrix}\end{bmatrix} I=[1001],F=[2022]R=[1001]00[2022]00

在这里插入图片描述

则可以通过解RN=0RN=0RN=0来得到列向量为Ax=0Ax=0Ax=0n−rn-rnr个特解,即得到了零基。
N=[−FI] N=\begin{bmatrix} -F\\ I\\ \end{bmatrix} N=[FI]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值