线性代数笔记

11月 5, 2021 |

Transpose

(Ax)^T=x^TA^T\\ (AB)^T=B^TA^T\\ (AA^{-1})^T=(A^{-1})^T.A^T=I\rightarrow (A^T)^{-1}=(A^{-1})^T\\ \begin{bmatrix} a_1 & & \\ & \ddots \\ && a_n \end{bmatrix}^{-1} = \begin{bmatrix} \frac{1}{a_1} & & \\ & \ddots \\ && \frac{1}{a_n} \end{bmatrix}

Determinants

det(AB)=det(A)\cdot det(B)
detA按行或按列展开a_{ij}\cdot(-1)^{i+j}\cdot\Delta_{ij}

detA^{-1}=\frac{1}{detA}\\ detA^T = detA \\ \begin{vmatrix} a_1 & & \\ & \ddots \\ & & a_n \end{vmatrix} = a_1\cdot a_2 \cdots a_n\\ det(c\mathbf{a_1}\ \mathbf{a_2} \cdots\ \mathbf{a_n}) = \mathit{c} \cdot det(\mathbf{a_1}\ \mathbf{a_2}\ \cdots\ \mathbf{a_n})\\ det(\mathbf{a_1+a_2}\ \mathbf{a_2} \cdots \mathbf{a_n}) = det(\mathbf{a_1}\ \mathbf{a_2}\ \cdots \mathbf{a_n}) + det(\mathbf{a_2}\ \mathbf{a_2} \cdots\ \mathbf{a_n})\rightarrow\\ = det(\mathbf{a_1}\ \mathbf{a_2}\ \cdots \mathbf{a_n}) + 0

projection

a^T(b-a\hat{x})=0
A^T(b-A\hat{x})=0\\ \hat{x}=(A^TA)^{-1}A^Tb\\ p=A\hat{x}=A(A^TA)^{-1}A^Tb\\ p=Pb \rightarrow P=A(A^TA)^{-1}A^T\\

eignvalue and eignvector

A\mathbf{x}=\lambda \mathbf{x} \\ (A-\lambda I)\mathbf{x}=0\\ \lambda_1 +\lambda_2 = \Sigma{a_{ii}}\\ \lambda_1 *\lambda_2 = detA\\

S由A的特征向量构成的矩阵
AS=[\mathbf{s_1}\ \cdots\ \mathbf{s_n}] \begin{bmatrix} \lambda_1 & &\\ & \lambda_2 &\\ & & \lambda_3 \end{bmatrix}\\ AS = S\Lambda\\ A = S\Lambda S^{-1}\\

Symmetric

A=A^T
\lambda is real number
eignvector orthogonal
Q^TQ=I \\ A=Q\Lambda Q^T\\

least squares

求(0,6), (1,0) (2,0) 拟合直线
C+Dx=b \\ A=\begin{bmatrix} 1 & 0 \\ 1 & 1 \\ 1 & 2 \end{bmatrix} x=\begin{bmatrix} C\\ D\\ \end{bmatrix} b=\begin{bmatrix} 6\\ 0\\ 0\\ \end{bmatrix}

x为b在A确定的平面上投影系数

SVD

(A^TA)v_i= \sigma _i^2 v_i 左乘v_i^T
v_i^TA^TAv_i = \sigma ^2v_i^Tv_i\ \ \ \ A^TA 为对称矩阵->特征向量为单位正交向量
(Av_i)^TAv_i = \sigma ^2\\ \begin{Vmatrix}Av_i\end{Vmatrix} = \sigma \\ AA^TAv_i = \sigma_i^2Av_i\\ 左乘矩阵A
u_i =Av_i/\sigma

那么
A[v_1 ... v_r] =[u_1 ... u_r]\begin{bmatrix} \sigma_1 & &\\ & \sigma_2 &\\ & & \sigma_3 \end{bmatrix}\\ Av = u \Sigma
所以
A^TA=\mathbf{v}\Sigma^T\mathbf{u}^T.\mathbf{u}\Sigma \mathbf{v}^T =\mathbf{v}\Sigma^2\mathbf{v}^T

\Sigma=A^TA的特征值\sqrt{ \lambda },v=特征向量
u矩阵既可以通过AV/\Sigma 计算,亦可以和v一样通过AA^T计算,

A^TAAA^T拥有相同的特征值

constant-coefficient differential equation

\frac{d\mathbf{u}}{dt}=A\mathbf{u}

1、计算A的特征值和特征向量
2、方法1使用特征值和特征向量组成特殊解
\mathbf{u}=Ce^{\lambda_1 t}\mathbf{x_1} + De^{\lambda_2 t}\mathbf{x_2}
然后将初值u_{(0)}=u_0带入
Cx_1 + Dx_2 = u_0 确定系数

3、使用u=e^{At}\cdot u_0公式
e^{\Lambda t} = I+\Lambda t + \frac{1}{2}(\Lambda t)^2+ \frac{1}{6}(\Lambda t)^3 + \cdots + \frac{1}{n!}(\Lambda t)^n\\ = \begin{bmatrix} e^{\lambda_1t} & & &\\ & e^{\lambda_2t} & &\\ & & \ddots &\\ & & & e^{\lambda_nt} & \end{bmatrix} \\ e^{At} = I+At + \frac{1}{2}(At)^2+ \frac{1}{6}(At)^3 + \cdots + \frac{1}{n!}(At)^n\\ A^2=S\Lambda S^{-1}S\Lambda S^{-1} = S\Lambda^2 S^{-1}\\ A^n = S\Lambda^n S^{-1}\\ e^{At} = S(I+\Lambda t + \frac{1}{2}(\Lambda t)^2+ \frac{1}{6}(\Lambda t)^3 + \cdots + \frac{1}{n!}(\Lambda t)^n)S^{-1}\\ = Se^{\Lambda t}S^{-1}\\ u=e^{At}\cdot u_0= Se^{\Lambda t}S^{-1}u_0 = Se^{\Lambda t}C \\

4、二阶常系数微分方程
y^{\prime\prime} + y = 0 \\ \frac{dy}{dt} = y^{\prime}\\ y^{\prime\prime} = -y + 0y^{\prime}\\ \frac{d}{dt} \begin{bmatrix} y\\ y^{\prime} \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1& 0 \end{bmatrix}\begin{bmatrix} y\\ y^{\prime} \end{bmatrix}

Positeive Definite Matrices

symmmetric matric has one of these properties it has them all
1. all n pivots are positive
2 all n upper left determinants are positive
3 all n eigenvalues are positive
4 x^TAx is positeive except at x=0
5 A = R^TR , R with independent columns
ax^2+2bxy+cy^2 = 1 \begin{bmatrix} x & y \end{bmatrix} \begin{bmatrix} a & b\\ b & c\\ \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} \\ %%%%% 注释 \begin{bmatrix} x & y \end{bmatrix} Q\Lambda Q^T \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} X & Y \end{bmatrix} \Lambda \begin{bmatrix} X \\ Y \end{bmatrix}\rightarrow \\ \lambda_1X^2 + \lambda_2Y^2=1 \rightarrow\\ X = \frac {1}{\sqrt{\lambda_1}} \ \ Y = \frac {1}{\sqrt{\lambda_2}}

Complex Vectors and Matrices

\frac {1}{a+ib} = \frac {a-ib}{(a+ib)(a-ib)}\\ z=rcos\theta + irsin\theta = re^{i\theta} \\ z\cdot z^{\prime} = r\cdot r^{\prime}e^{i(\theta+\theta^{\prime})}\\ set \ \omega = e^{2\pi i/n} \rightarrow \\ (\omega)^n = (\omega^2)^n= (\omega^{n-1})^n=1
Hermitian Matrices ( A=A^H )
properties: 1)real eigenvalues 2) eigenvectors \perp

unitary Matrices(columns \perp )
U^HU=I

Posted in: IT人生

Comments are closed.