计算时,一般需要多次运算来把行列式转换为上三角型或下三角型 2、交换行列式中的两行(列),行列式变号(交换) 3、行列式中某行(列)的公因子,可以提出放到行列式之外。(倍乘)(注:矩阵是全部元素都乘,都...
目录
方阵的行列式5.1 定义5.2运算法则6. 逆矩阵6.1 定理 1-26.2运算法则 0. 定义A=(ai×j);B=(bi×j)i=1...m;j=1...n \begin{aligned}A &= \left(a_{i \times j}\right); \\ B &= \left(b_{i \times j}\...

矩阵运算

0. 定义
A = ( a i × j ) ; B = ( b i × j ) i = 1... m ; j = 1... n \begin{aligned} A &= \left(a_{i \times j}\right); \\ B &= \left(b_{i \times j}\right) \\ i&=1...m; \\ j &= 1...n \end{aligned}ABij=(ai×j);=(bi×j)=1...m;=1...n
1. 矩阵加法法则
( i ) A + B = B + A ( i i ) ( A + B ) + C = A + ( B + C ) ( i i ) 负矩阵:−A=(−aij);A+(−A)=O;A+(−B)=A−B\begin{aligned} &(i) \, A + B = B + A \\ &(ii) \, (A + B) + C = A + (B + C) \\ &(ii) \, 负矩阵: \\ &-A = (-a_{ij}); \\ &A + (-A) = O; \\ &A + (-B) = A - B \end{aligned}(i)A+B=B+A(ii)(A+B)+C=A+(B+C)(ii)负矩阵:−A=(−aij);A+(−A)=O;A+(−B)=A−B
2. 数与矩阵相乘
( i ) ( λ μ ) A = λ ( μ A ) ( i i ) ( λ + μ ) A = λ A + μ A ( i i i ) λ ( A + B ) = λ A + λ B \begin{aligned} &(i) \, (\lambda\mu)A = \lambda(\mu A)\\ &(ii) \, (\lambda + \mu)A = \lambda A + \mu A \\ &(iii) \, \lambda (A + B) = \lambda A + \lambda B \end{aligned}(i)(λμ)A=λ(μA)(ii)(λ+μ)A=λA+μA(iii)λ(A+B)=λA+λB
3. 矩阵与矩阵相乘

3.1 定义

设 A = ( a m × s ) A = (a_{m \times s})A=(am×s) 和 B = ( b s × n ) B = (b_{s \times n})B=(bs×n) ,则 A AA和 B BB的乘积为: C = A B C = ABC=AB
注意:
只有第一个矩阵的列数和第二个矩阵的行数相同时,才可以相乘;注意相乘的顺序(左乘和右乘)A B ABAB 不一定等于 B A BABA, 只有两者可交换时,才相等。对于两个n阶方阵 A , B A, BA,B,若 A B = B A AB = BAAB=BA,则称方阵 A AA和 B BB是可交换的

3.2 乘法法则

( i ) ( A B ) C = A ( B C ) ( i i ) λ ( A B ) = ( λ A ) B = A ( λ B ) ( i i i ) A ( B + C ) = A B + A C , ( B + C ) A = B A + C A ( i v ) E A = A E = A , ( λ E ) A = λ A = A ( λ E ) \begin{aligned} & (i) \, (AB)C = A(BC) \\ & (ii) \, \lambda (AB) = (\lambda A)B = A(\lambda B) \\ & (iii) \, A(B + C) = AB + AC, (B + C)A = BA + CA \\ & (iv) \, EA = AE = A, (\lambda E)A = \lambda A = A (\lambda E) \end{aligned}(i)(AB)C=A(BC)(ii)λ(AB)=(λA)B=A(λB)(iii)A(B+C)=AB+AC,(B+C)A=BA+CA(iv)EA=AE=A,(λE)A=λA=A(λE)
注意:
只有方阵的幂才有意义: A k A^kAk
4. 矩阵的转置
( i ) ( A T ) T = A ( i i ) ( A + B ) T = A T + B T ( i i i ) ( λ A ) T = λ A T ( v i ) ( A B ) T = B T A T ( v ) 对称矩阵:AT=A\begin{aligned} &(i) \, (A^T)^T = A \\ &(ii) \, (A + B)^T = A^T + B^T \\ &(iii) \, (\lambda A)^T = \lambda A^T \\ &(vi) \, (AB)^T = B^TA^T \\ &(v) \, 对称矩阵:A^T = A \end{aligned}(i)(AT)T=A(ii)(A+B)T=AT+BT(iii)(λA)T=λAT(vi)(AB)T=BTAT(v)对称矩阵:AT=A
5. 方阵的行列式

5.1 定义

矩阵是有一定顺序的数表;行列式是一个数。n阶方阵的行列式: ∣ A ∣ 或detA|A| 或det A∣A∣或detA

5.2 运算法则

( i ) ∣ A T ∣ = ∣ A ∣ ( i i ) ∣ λ A ∣ = λ n ∣ A ∣ ( i i i ) ∣ A B ∣ = ∣ A ∣ ∣ B ∣ \begin{aligned} &(i) \, |A^T| = |A| \\ &(ii) \, |\lambda A| = \lambda^n|A| \\ &(iii) \, |AB| = |A||B| \end{aligned}(i)∣AT∣=∣A∣(ii)∣λA∣=λn∣A∣(iii)∣AB∣=∣A∣∣B∣
伴随矩阵:由行列式 ∣ A ∣ |A|∣A∣的各个元素的代数余子式 A i j A_{ij}Aij构成。
A ∗ = { A 11 A 21 − A n 1 A 12 A 22 − A n 2 ∣ ∣ ∣ ∣ A 1 n A 2 n − A n n } ; A i j = ( − 1 ) i + j M i j A^* = \left\{ \begin{matrix} A_{11} & A_{21} & - & A_{n1}\\ A_{12} & A_{22} & - & A_{n2} \\ | & | & | & | \\ A_{1n} & A_{2n} & - & A_{nn} \end{matrix} \right\}; A_{ij} = (-1)^{i+j}M_{ij}A∗=⎩⎪⎪⎨⎪⎪⎧A11A12∣A1nA21A22∣A2n−−∣−An1An2∣Ann⎭⎪⎪⎬⎪⎪⎫;Aij=(−1)i+jMij
( v i ) A ∗ A = A A ∗ = ∣ A ∣ E (vi) A^*A = AA^* = |A|E(vi)A∗A=AA∗=∣A∣E
6. 逆矩阵
对于n阶矩阵 A AA,如果有一个n阶矩阵 B BB,使
A B = B A = E AB=BA=EAB=BA=E
则, A AA可逆,且记为: A − 1 = B A^{-1}=BA−1=B(逆矩阵是唯一的)

6.1 定理 1-2

n 阶方阵可逆的充分必要条件为: ∣ A ∣ ≠ 0 |A| \neq 0∣A∣=0, 且:
A − 1 = 1 ∣ A ∣ A ∗ , A ∗ 为伴随矩阵A^{-1} = \frac{1}{|A|} A^*, A^*为伴随矩阵A−1=∣A∣1A∗,A∗为伴随矩阵
若 ∣ A ∣ ≠ 0 |A| \neq 0∣A∣=0,则 A AA为奇异矩阵,否则为非奇异矩阵;可逆矩阵为非奇异矩阵推论:若 A B = E 或(BA=E)AB = E 或(BA = E)AB=E或(BA=E),则 B = A − 1 B=A^{-1}B=A−1

6.2 运算法则

(i) 若 A AA可逆,则 A − 1 A^{-1}A−1亦可逆,且 ( A − 1 ) − 1 = A (A^{-1})^{-1} =A(A−1)−1=A
(ii)若 A AA可逆,数 λ ≠ 0 \lambda \neq 0λ=0,则 λ A \lambda AλA可逆,且 ( λ A ) − 1 = 1 λ A − 1 (\lambda A)^{-1} = \frac{1}{\lambda}A^{-1}(λA)−1=λ1A−1
(iii)若 A , B A,BA,B为同阶矩阵且可逆,则 A B ABAB亦可逆,且 ( A B ) − 1 = B − 1 A − 1 (AB)^{-1}=B^{-1}A^{-1}(AB)−1=B−1A−1
(iv)若 A AA可逆,则 A T A^TAT亦可逆,且 ( A T ) − 1 = ( A − 1 ) T (A^T)^{-1}=(A^{-1})^T(AT)−1=(A−1)T
转自:... 求导公式(撇号为转置): Y =A * X --> DY/DX =A' Y = X *A --> DY/DX =A Y =A' * X * B --> DY/DX =A * B' Y =A' * X' * B --> DY/DX = B *A'...
求导公式(撇号为转置):
Y = A * X --> DY/DX = A'
Y = X * A --> DY/DX = A
Y = A' * X * B --> DY/DX = A * B'
Y = A' * X' * B --> DY/DX = B * A'
例题"/>乘积的导数
d(f*g)/dx=(df'/dx)g+(dg/dx)f'
例题"/>
例题"/>
例题"/>
例题"/>
例题"/>
于是把以前学过的矩阵求导部分整理一下:
1. 矩阵Y对标量x求导:
相当于每个元素求导数后转置一下,注意M×N矩阵求导后变成N×M了
Y = [y(ij)]--> dY/dx = [dy(ji)/dx]
2. 标量y对列向量X求导:
注意与上面不同,这次括号内是求偏导,不转置,对N×1向量求导后还是N×1向量
y= f(x1,x2,..,xn) --> dy/dX= (Dy/Dx1,Dy/Dx2,..,Dy/Dxn)'
3. 行向量Y'对列向量X求导:
注意1×M向量对N×1向量求导后是N×M矩阵。
将Y的每一列对X求偏导,将各列构成一个矩阵。
重要结论:
dX'/dX =I
d(AX)'/dX =A'
4. 列向量Y对行向量X’求导:
转化为行向量Y’对列向量X的导数,然后转置。
注意M×1向量对1×N向量求导结果为M×N矩阵。
dY/dX' =(dY'/dX)'
5. 向量积对列向量X求导运算法则:
注意与标量求导有点不同。
d(UV')/dX =(dU/dX)V' + U(dV'/dX)
d(U'V)/dX =(dU'/dX)V + (dV'/dX)U'
重要结论:
d(X'A)/dX =(dX'/dX)A + (dA/dX)X' = IA + 0X' = A
d(AX)/dX' =(d(X'A')/dX)' = (A')' = A
d(X'AX)/dX =(dX'/dX)AX + (d(AX)'/dX)X = AX + A'X
6. 矩阵Y对列向量X求导:
将Y对X的每一个分量求偏导,构成一个超向量。
注意该向量的每一个元素都是一个矩阵。
7. 矩阵积对列向量求导法则:
d(uV)/dX =(du/dX)V + u(dV/dX)
d(UV)/dX =(dU/dX)V + U(dV/dX)
重要结论:
d(X'A)/dX =(dX'/dX)A+ X'(dA/dX) = IA + X'0 = A
8. 标量y对矩阵X的导数:
类似标量y对列向量X的导数,
把y对每个X的元素求偏导,不用转置。
dy/dX = [Dy/Dx(ij) ]
重要结论:
y = U'XV=ΣΣu(i)x(ij)v(j) 于是 dy/dX = [u(i)v(j)] =UV'
y = U'X'XU 则dy/dX = 2XUU'
y =(XU-V)'(XU-V) 则dy/dX = d(U'X'XU - 2V'XU + V'V)/dX = 2XUU' - 2VU' +0 = 2(XU-V)U'
9. 矩阵Y对矩阵X的导数:
将Y的每个元素对X求导,然后排在一起形成超级矩阵。
10.乘积的导数
d(f*g)/dx=(df'/dx)g+(dg/dx)f'
结论
d(x'Ax)=(d(x'')/dx)Ax+(d(Ax)/dx)(x'')=Ax+A'x(注意:''是表示两次转置)

Notation

d/dx(y)is a vector whose(i)element isdy(i)/dxd/dx(y) is a vector whose(i)element isdy/dx(i)d/dx(yT) is a matrix whose(i,j)element isdy(j)/dx(i)d/dx(Y) is a matrix whose(i,j)element isdy(i,j)/dxd/dX(y) is a matrix whose(i,j)element isdy/dx(i,j)
Note that the Hermitian transpose is not used because complex conjugates are not analytic.
In the expressions below matrices and vectorsA,B,Cdo not depend onX.

Derivatives of Linear Products

d/dx(AYB)=A*d/dx(Y) *Bd/dx(Ay)=A*d/dx(y)d/dx(xTA)=Ad/dx(xT)=Id/dx(xTa)= d/dx(aTx) =ad/dX(aTXb) =abTd/dX(aTXa) =d/dX(aTXTa) =aaTd/dX(aTXTb) =baTd/dx(YZ)=Y*d/dx(Z) +d/dx(Y)* Z

Derivatives of Quadratic Products

d/dx(Ax+b)TC(Dx+e) =ATC(Dx+e)+DTCT(Ax+b)d/dx(xTCx) = (C+CT)x[C: symmetric]:d/dx(xTCx) = 2Cxd/dx(xTx) = 2xd/dx(Ax+b)T(Dx+e) =AT(Dx+e)+DT(Ax+b)d/dx(Ax+b)T(Ax+b) = 2AT(Ax+b)[C: symmetric]:d/dx(Ax+b)TC(Ax+b) = 2ATC(Ax+b)d/dX(aTXTXb) =X(abT+ baT)d/dX(aTXTXa) = 2XaaTd/dX(aTXTCXb) =CTXabT+ CXbaTd/dX(aTXTCXa) =(C + CT)XaaT[C:Symmetric]d/dX(aTXTCXa) =2CXaaTd/dX((Xa+b)TC(Xa+b)) = (C+CT)(Xa+b)aT

Derivatives of Cubic Products

d/dx(xTAxxT) = (A+AT)xxT+xTAxI

Derivatives of Inverses

d/dx(Y-1) =-Y-1d/dx(Y)Y-1

Derivative of Trace

Note: matrix dimensions must result in ann*nargument for tr().
d/dX(tr(X)) =Id/dX(tr(Xk)) =k(Xk-1)Td/dX(tr(AXk)) =SUMr=0:k-1(XrAXk-r-1)Td/dX(tr(AX-1B)) =-(X-1BAX-1)Td/dX(tr(AX-1)) =d/dX(tr(X-1A)) =-X-TATX-Td/dX(tr(ATXBT)) =d/dX(tr(BXTA)) =ABd/dX(tr(XAT)) =d/dX(tr(ATX)) =d/dX(tr(XTA)) =d/dX(tr(AXT))= Ad/dX(tr(AXBXT)) =ATXBT+AXBd/dX(tr(XAXT)) =X(A+AT)d/dX(tr(XTAX)) =XT(A+AT)d/dX(tr(AXTX)) =(A+AT)Xd/dX(tr(AXBX)) =ATXTBT+BTXTAT[C:symmetric]d/dX(tr((XTCX)-1A) =d/dX(tr(A (XTCX)-1) =-(CX(XTCX)-1)(A+AT)(XTCX)-1[B,C:symmetric]d/dX(tr((XTCX)-1(XTBX)) =d/dX(tr( (XTBX)(XTCX)-1) =-2(CX(XTCX)-1)XTBX(XTCX)-1+ 2BX(XTCX)-1

Derivative of Determinant

Note: matrix dimensions must result in ann*nargument for det().
d/dX(det(X)) =d/dX(det(XT)) = det(X)*X-Td/dX(det(AXB)) = det(AXB)*X-Td/dX(ln(det(AXB))) =X-Td/dX(det(Xk)) =k*det(Xk)*X-Td/dX(ln(det(Xk))) =kX-T[Real]d/dX(det(XTCX)) = det(XTCX)*(C+CT)X(XTCX)-1[C:Real,Symmetric]d/dX(det(XTCX)) = 2det(XTCX)* CX(XTCX)-1[C:Real,Symmetricc]d/dX(ln(det(XTCX))) = 2CX(XTCX)-1

Jacobian

Ifyis a function ofx, thendyT/dxis the Jacobian matrix ofywith respect tox.
Its determinant, |dyT/dx|, is theJacobianofywith respect toxand represents the ratio of the hyper-volumesdyanddx. The Jacobian occurs when changing variables in an integration: Integral(f(y)dy)=Integral(f(y(x)) |dyT/dx| dx).

Hessian matrix

If f is a function ofxthen the symmetric matrix d2f/dx2=d/dxT(df/dx) is theHessianmatrix of f(x). A value ofxfor which df/dx=0corresponds to a minimum, maximum or saddle point according to whether the Hessian is positive definite, negative definite or indefinite.
d2/dx2(aTx) = 0d2/dx2(Ax+b)TC(Dx+e) =ATCD+DTCTAd2/dx2(xTCx) =C+CTd2/dx2(xTx) = 2Id2/dx2(Ax+b)T(Dx+e) =ATD+DTAd2/dx2(Ax+b)T(Ax+b) = 2ATA[C: symmetric]:d2/dx2(Ax+b)TC(Ax+b) = 2ATCA
求导公式(撇号为转置): Y =A * X --> DY/DX =A' Y = X *A --> DY/DX =A Y =A' * X * B --> DY/DX =A * B' ...例题" title="矩阵求导计算法则例题" style="margin:0px; padding:0px; bord
转载自http://blog.sina.com.cn/s/blog_4a033b090100pwjq.html,仅用作个人学习。
求导公式(撇号为转置):
Y = A * X --> DY/DX = A'
Y = X * A --> DY/DX = A
Y = A' * X * B --> DY/DX = A * B'
Y = A' * X' * B --> DY/DX = B * A'
例题"/>乘积的导数
d(f*g)/dx=(df'/dx)g+(dg/dx)f'
例题"/>
例题"/>
例题"/>
例题"/>
例题"/>
于是把以前学过的矩阵求导部分整理一下:
1. 矩阵Y对标量x求导:
相当于每个元素求导数后转置一下,注意M×N矩阵求导后变成N×M了
Y = [y(ij)]--> dY/dx = [dy(ji)/dx]
2. 标量y对列向量X求导:
注意与上面不同,这次括号内是求偏导,不转置,对N×1向量求导后还是N×1向量
y= f(x1,x2,..,xn) --> dy/dX= (Dy/Dx1,Dy/Dx2,..,Dy/Dxn)'
3. 行向量Y'对列向量X求导:
注意1×M向量对N×1向量求导后是N×M矩阵。
将Y的每一列对X求偏导,将各列构成一个矩阵。
重要结论:
dX'/dX =I
d(AX)'/dX =A'
4. 列向量Y对行向量X’求导:
转化为行向量Y’对列向量X的导数,然后转置。
注意M×1向量对1×N向量求导结果为M×N矩阵。
dY/dX' =(dY'/dX)'
5. 向量积对列向量X求导运算法则:
注意与标量求导有点不同。
d(UV')/dX =(dU/dX)V' + U(dV'/dX)
d(U'V)/dX =(dU'/dX)V + (dV'/dX)U'
重要结论:
d(X'A)/dX =(dX'/dX)A + (dA/dX)X' = IA + 0X' = A
d(AX)/dX' =(d(X'A')/dX)' = (A')' = A
d(X'AX)/dX =(dX'/dX)AX + (d(AX)'/dX)X = AX + A'X
6. 矩阵Y对列向量X求导:
将Y对X的每一个分量求偏导,构成一个超向量。
注意该向量的每一个元素都是一个矩阵。
7. 矩阵积对列向量求导法则:
d(uV)/dX =(du/dX)V + u(dV/dX)
d(UV)/dX =(dU/dX)V + U(dV/dX)
重要结论:
d(X'A)/dX =(dX'/dX)A+ X'(dA/dX) = IA + X'0 = A
8. 标量y对矩阵X的导数:
类似标量y对列向量X的导数,
把y对每个X的元素求偏导,不用转置。
dy/dX = [Dy/Dx(ij) ]
重要结论:
y = U'XV=ΣΣu(i)x(ij)v(j) 于是 dy/dX = [u(i)v(j)] =UV'
y = U'X'XU 则dy/dX = 2XUU'
y =(XU-V)'(XU-V) 则dy/dX = d(U'X'XU - 2V'XU + V'V)/dX = 2XUU' - 2VU' +0 = 2(XU-V)U'
9. 矩阵Y对矩阵X的导数:
将Y的每个元素对X求导,然后排在一起形成超级矩阵。
10.乘积的导数
d(f*g)/dx=(df'/dx)g+(dg/dx)f'
结论
d(x'Ax)=(d(x'')/dx)Ax+(d(Ax)/dx)(x'')=Ax+A'x(注意:''是表示两次转置)
矩阵求导 属于 矩阵计算,应该查找 Matrix Calculus 的文献:
http://www.stanford.edu/~dattorro/matrixcalc.pdf
http://www.colorado.edu/engineering/CAS/courses.d/IFEM.d/IFEM.AppD.d/IFEM.AppD.pdf
http://www4.ncsu.edu/~pfackler/MatCalc.pdf
http://center.uvt.nl/staff/magnus/wip12.pdf