![內(nèi)容分析案例選讀2018the matrix cookbook_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/18/2181189c-f9ae-4f7e-9552-9b98c45bab5d/2181189c-f9ae-4f7e-9552-9b98c45bab5d1.gif)
![內(nèi)容分析案例選讀2018the matrix cookbook_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/18/2181189c-f9ae-4f7e-9552-9b98c45bab5d/2181189c-f9ae-4f7e-9552-9b98c45bab5d2.gif)
![內(nèi)容分析案例選讀2018the matrix cookbook_第3頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/18/2181189c-f9ae-4f7e-9552-9b98c45bab5d/2181189c-f9ae-4f7e-9552-9b98c45bab5d3.gif)
![內(nèi)容分析案例選讀2018the matrix cookbook_第4頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/18/2181189c-f9ae-4f7e-9552-9b98c45bab5d/2181189c-f9ae-4f7e-9552-9b98c45bab5d4.gif)
![內(nèi)容分析案例選讀2018the matrix cookbook_第5頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/18/2181189c-f9ae-4f7e-9552-9b98c45bab5d/2181189c-f9ae-4f7e-9552-9b98c45bab5d5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、The Matrix CookbookKaare Brandt Petersen Michael Syskind PedersenVersion:November 15, 20121IntroductionWhat is this? These pages are a collection of facts (identities, approxima- tions, inequalities, relations, .) about matrices and matters relating to them. It is collected in this form for the conv
2、enience of anyone who wants a quick desktop reference .Disclaimer: The identities, approximations and relations presented here were obviously not invented but collected, borrowed and copied from a large amount of sources. These sources include similar but shorter notes found on the internet and appe
3、ndices in books - see the references for a full list.Errors: Very likely there are errors, typos, and mistakes for which we apolo- gize and would be grateful to receive corrections at cookbook2302.dk.Its ongoing: The project of keea large repository of relations involvingmatrices is naturally ongoin
4、g and the version will be apparent from the date in the header.Suggestions: Your suggestion for additional content or elaboration of some topics is most welcome acookbook2302.dk.Keywords: Matrix algebra, matrix relations, matrix identities, derivative of determinant, derivative of inverse matrix, di
5、fferentiate a matrix.Acknowledgements: We would like to thank the following for contributions and suggestions: Bill Baxter, Brian Templeton, Christian Rishøj, Christian Schr¨oppel, Dan Boley, Douglas L. Theobald, Esben Hoegh-Rasmussen, Evripidis Karseras, Georg Martius, Glynne Casteel, Jan
6、 Larsen, Jun Bin Gao, Ju¨rgen Struckmeier, Kamil Dedecius, Karim T. Abou-Moustafa, Korbinian Strimmer, Lars Christiansen, Lars Kai Hansen, Leland Wilkinson, Liguo He, Loic Thibaut, Markus Froeb, Michael Hubatka, Miguel Barao, Ole Winther, Pavel Sakov, Stephan Hattinger, Troels Pedersen, Vasile
7、Sima, Vincent Rabaud, Zhaoshui He. We would also like thank The Oticon Foundation for funding our PhD studies.Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012, Page 2CONTENTSCONTENTSContents1Basics666Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8、. . . .Determinant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .The Special Case 2x2 . . . . . . . . . . . . . . . . . . . . . . . . .2Derivatives88910101214142.72.8Derivatives of a Determinant . . . . . . . . . . . . . . . . . . . .Derivatives of an Inverse . . . .
9、 . . . . . . . . . . . . . . . . . . .Derivatives of Eigenvalues . . . . . . . . . . . . . . . . . . . . . .Derivatives of Matrices, Vectors and Scalar Forms . . . . . . . .Derivatives of Traces . . . . . . . . . . . . . . . . . . . . . . . . .Derivatives of vector norms . . . . . . . . . . . . . .
10、. . . . . . .Derivatives of matrix norms . . . . . . . . . . . . . . . . . . . . .Derivatives of Structured Matrices . . . . . . . . . . . . . . . . .3Inverses171718202021Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Exact Relations . . . . . . . . . .
11、. . . . . . . . . . . . . . . . . .Implication on Inverses . . . . . . . . . . . . . . . . . . . . . . . .Approximations . . . . . . . . . . . . . . . . . . . . . . . . . . . .Generalized Inverse . . . . . . . . . . . . . . . . . . . . . . . . . .Pseudo Inverse . . . . . . . . . . . . . . . . . . .
12、. . . . . . . . .4Complex Matrices2424262Complex Derivatives . . . . . . . . . . . . . . . . . . . . . . . . .Higher order and non-linear derivatives . . . . . . . . . . . . . . .Inverse of complex sum . . . . . . . . . . . . . . . . . . . . . . .5Solutions and Decompositions28283031323233
13、35.7Solutions to linear equations . . . . . . . . . . . . . . . . . . . . .Eigenvalues and Eigenvectors . . . . . . . . . . . . . . . . . . . .Singular Value Decomposition . . . . . . . . . . . . . . . . . . . .Triangular Decomposition . . . . . . . . . . . . . . . . . . . . . .LU
14、 decomposition . . . . . . . . . . . . . . . . . . . . . . . . . .LDM decomposition . . . . . . . . . . . . . . . . . . . . . . . . .LDL decompositions . . . . . . . . . . . . . . . . . . . . . . . . .6Statistics and Probability3434353Definition of Moments . . . . . . . . . . . . . . . . .
15、 . . . . . . .Expectation of Linear Combinations . . . . . . . . . . . . . . . .Weighted Scalar Variable . . . . . . . . . . . . . . . . . . . . . .7Multivariate Distributions3737373737373Cauchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Dirichlet . . . . . . .
16、 . . . . . . . . . . . . . . . . . . . . . . . . .Normal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Normal-Inverse Gamma . . . . . . . . . . . . . . . . . . . . . . .Gaussian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Multinomial . . . . . . . . . . . . . . .
17、. . . . . . . . . . . . . . .Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012, Page 3CONTENTSCONTENTSs t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Wishart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Wishart, Inverse . . . . . . . .
18、 . . . . . . . . . . . . . . . . . . .3738398Gaussians4040424448.4Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Mixture of G
19、aussians . . . . . . . . . . . . . . . . . . . . . . . . .9Special Matrices46464748494950525454555652Block matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . .Discrete Fourier Transform Matrix, The . . . . . . . . . . . . . .Hermitian Matrices and s
20、kew-Hermitian . . . . . . . . . . . . . .Idempotent Matrices . . . . . . . . . . . . . . . . . . . . . . . . .Orthogonal matrices . . . . . . . . . . . . . . . . . . . . . . . . .Positive Definite and Semi-definite Matrices . . . . . . . . . . . .Singleentry Matrix, The . . . . . . . . . . . . . . .
21、 . . . . . . . .Symmetric, Skew-symmetric/symmetric . . . . . . . . . . . .Toeplitz Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . .Transition matrices . . . . . . . . . . . . . . . . . . . . . . . . . .Units, Permutation and Shift . . . . . . . . . . . . . . . . . . . .Vandermonde Mat
22、rices . . . . . . . . . . . . . . . . . . . . . . . .10 Functions and Operators585859616162626310.410.510.610.7Functions and Series . . . . . . . . . . . . . . . . . . . . . . . . .Kronecker and Vec Operator . . . . . . . . . . . . . . . . . . . .Vector Norms . . . . . . . . . . . . . .
23、. . . . . . . . . . . . . . .Matrix Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Integral Involving Dirac Delta Functions . . . . . . . . . . . . . .Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . .
24、 . . . . .AOne-dimensional ResultsA.1 Gaussian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A.2 One Dimensional Mixture of Gaussians . . . . . . . . . . . . . . .646465BProofs ands6666B.1 Misc Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Petersen & Pedersen
25、, The Matrix Cookbook, Version: November 15, 2012, Page 4CONTENTSCONTENTSNotation and NomenclatureAAij Ai Aij AnMatrixMatrix indexed for some purpose Matrix indexed for some purpose Matrix indexed for some purpose Matrix indexed for some purpose or The n.th power of a square matrix The inverse matri
26、x of the matrix AThe pseudo inverse matrix of the matrix A (see Sec. 3.6) The square root of a matrix (if unique), not elementwise The (i, j).th entry of the matrix AThe (i, j).th entry of the matrix AThe ij-submatrix, i.e. A with i.th row and j.th column deleted Vector (column-vector)Vector indexed
27、 for some purpose The i.th element of the vector a ScalarA1A+ A1/2(A)ij Aij Aij aai ai a<zReal part of a scalar Real part of a vector Real part of a matrixImaginary part of a scalar Imaginary part of a vector Imaginary part of a matrix<z<Z=z=z=Zdet(A)Tr(A)diag(A) eig(A)vec(A) supDeterminant
28、 of ATrace of the matrix ADiagonal matrix of the matrix A, i.e. (diag(A)ij = ijAijEigenvalues of the matrix AThe vector-version of the matrix A (see Sec. 10.2.2) Supremum of a setMatrix norm (subscript if any denotes what norm) Transposed matrixThe inverse of the transposed and vice versa, AT = (A1)
29、T = (AT )1.Complex conjugated matrixTransposed and complex conjugated matrix (Hermitian)|A|AT ATAAHA BHadamard (elementwise) product Kronecker productA B0IJij The null matrix. Zero in all entries. The identity matrixThe single-entry matrix, 1 at (i, j) and zero elsewhere A positive definite matrixA
30、diagonal matrixPetersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012, Page 51BASICS1Basics(AB)1 (ABC.)1(AT )1(A + B)T(AB)T (ABC.)T (AH )1(A + B)H(AB)H (ABC.)HB1A1.C1B1A1(A1)T AT + BT BT AT.CT BT AT (A1)H AH + BH BH AH.CH BH AH=(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)1.1TraceTr(A)Tr(A)Tr(A)
31、Tr(AB) Tr(A + B) Tr(ABC)aT a=A(11)(12)(13)(14)(15)(16)(17)iiiPii,i = eig(A)Tr(AT )Tr(BA)Tr(A) + Tr(B)Tr(BCA) = Tr(CAB)Tr(aaT )1.2DeterminantLet A be an n × n matrix.det(A) det(cA) det(AT ) det(AB) det(A1) det(An) det(I + uvT )Q=i = eig(A)(18)(19)(20)(21)(22)(23)(24)iicn det(A), det(A) det(A) de
32、t(B) 1/ det(A) det(A)n1 + uT vif A Rn×nFor n = 2:det(I + A) = 1 + det(A) + Tr(A)(25)For n = 3:1122det(I + A) = 1 + det(A) + Tr(A) + Tr(A) Tr(A )22(26)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012, Page 61.3 The Special Case 2x21BASICSFor n = 4:12det(I + A) = 1 + det(A
33、) + Tr(A) +122+Tr(A) Tr(A )2111323+ Tr(A) Tr(A)Tr(A ) + Tr(A ) 623For small , the following approximation holds(27)112222det(I + A) = 1 + det(A) + Tr(A) + Tr(A) Tr(A )(28)221.3The Special Case 2x2Consider the matrix AA = A11 A21A12 A22Determinant and tracedet(A) = A11A22 A12A21Tr(A) = A11 + A22(29)(
34、30)Eigenvalues2 · Tr(A) + det(A) = 0pp22Tr(A) +Tr(A) 4 det(A)Tr(A) Tr(A) 4 det(A)1 =2 =21 + 2 = Tr(A)212 = det(A)Eigenvectorsv1 v2 A12 1 A11A12 2 A11Inverse 1A22A21A121A=(31)A11det(A)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012, Page 72 DERIVATIVES2DerivativesThis se
35、ction is covering differentiation of a number of expressions with respect to a matrix X. Note that it is always assumed that X has no special structure, i.e. that the elements of X are independent (e.g. not symmetric, Toeplitz, positive definite). See section 2.8 for differentiation of structured ma
36、trices. The basic assumptions can be written in a formula asXklXij= (32)ik ljthat is for e.g. vector forms, xxi=xyxyixyxiyj=yyiiijThe following rules are general and very useful when deriving the differential of an expression (19):A(X)(X + Y)(Tr(X)(XY)=0XX + YTr(X)(X)Y + X(Y)(A is a constant)(33)(34
37、)(35)(36)(37)(38)(39)(40)(41)(42)(43)(44)(45)(X Y)(X) Y + X (Y)(X Y)(X) Y + X (Y)(X1)(det(X)(det(X)(ln(det(X)XTXHX1(X)X1Tr(adj(X)X) det(X)Tr(X1X) Tr(X1X)(X)T(X)H2.1Derivativesof a Determinant2.1.1General form det(Y)xYx1=det(Y)Tr Y(46)X det(X)XikX= det(X)(47)jkijk""#1Y2 det(Y)1 x=det(Y) Tr
38、Yx2x YxYxYx1+Tr YTr Y# Yx11TrYY(48)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012, Page 82.2 Derivatives of an Inverse2DERIVATIVES2.1.2Linear forms det(X)det(X)(X1)T=(49)X det(X)XX= det(X)(50)jkijXikk det(AXB)det(AXB)(X1)T = det(AXB)(XT )1=(51)X2.1.3Square formsIf X is squa
39、re and invertible, then det(XT AX)TT= 2 det(X AX)X(52)XIf X is not square but A is symmetric, then det(XT AX)TT1= 2 det(X AX)AX(X AX)(53)XIf X is not square and A is not symmetric, then det(XT AX)TT1TTT1= det(X AX)(AX(X AX)+ A X(X A X)(54)X2.1.4Other nonlinear formsSome special cases are (See 9, 7)
40、ln det(XT X)|+ T=2(X )(55)X ln det(XT X)T=2X(56)X+ ln | det(X)|(X1)T= (XT )1=(57)X det(Xk)kT=k det(X )X(58)X2.2Derivatives of an InverseFrom 27 we have the basic identityY11 Y1= YYx(59)xPetersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012, Page 92.3 Derivatives of Eigenvalues2DER
41、IVATIVESfrom which it follows(X1)kl11(X)ki(X=)jl(60)XijaT X1bTTT=Xab X(61)X det(X1)11 T= det(X)(X)(XBAX)(62)XTr(AX1B)11 T=(63)XTr(X + A)1)11 T=(X + A)(X + A)(64)XFrom 32 we have the following result: Let A be an n × n invertible squarematrix, W be the inverse of A, and J (A) is an n × n -v
42、ariate and differentiablefunction with respect to A, then the partial differentials of J with respect to Aand W satisfyJAJW= ATAT2.3Derivatives of EigenvaluesX eig(X) X X X X=Tr(X)=I(65)Y eig(X)=det(X)XT=det(X)(66)If A is real and symmetric, i and vi are distinct eigenvalues and eigenvectorsof A (se
43、e (276) with vT vi = 1, then 33ii= vT (A)vi(67)(68)i+vi= (iI A) (A)vi2.4 Derivatives of Matrices, Vectors and Scalar2.4.1 First OrderFormsxT aaT x=a(69)xaT XbxT=ab(70)XaT XT bT=ba(71)XaT XaaT XT aT=aa(72)XXXJij=(73)Xij(XA)ijXmn(XT A)ij(JmnA)=(A)=(74)imnjijnm=in(A)mj=(JA)ij(75)XmnPetersen & Peder
44、sen, The Matrix Cookbook, Version: November 15, 2012, Page 102.4 Derivatives of Matrices, Vectors and Scalar Forms2DERIVATIVES2.4.2Second OrderXX XijX X=2X(76)kl mnklklmnklbT XT XcTT=X(bc + cb )(77)X(Bx + b)T C(Dx + d)TTT=B C(Dx + d) + D C (Bx + b)(78)x(XT BX)klT=lj(X B)ki + kj(BX)il(79)Xij(XT BX)Ti
45、jjiij=X BJ + J BX(J)kl = ikjl(80)XijSee Sec 9.7 for useful properties of the Single-entry matrix JijxT BxT=(B + B )x(81)xbT XT DXcTTT=D Xbc + DXcb(82)X(Xb + c)T D(Xb + c)X(D + DT )(Xb + c)bT=(83)Assume W is symmetric, thensT(x As) W(x As)T2A W(x As)2W(x s)2W(x s) 2W(x As)T2W(x As)s=(84)xsT(x s) W(x
46、s)T(x s) W(x s)=(85)=(86)x AT(x As) W(x As)T(x As) W(x As)=(87)=(88)As a case with complex values the following holds(a xH b)2H= 2b(a x b)(89)xThis formula is also known from the LMS algorithm 142.4.3Higher-order and non-linearn1Xn(X )klXijr ij n1r=(X J X)(90)klr=0For proof of the above, see B.1.3.n
47、1X Xn1r TTnr TTa X b =(X ) ab (X)(91)r=0Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012, Page 112.5 Derivatives of Traces2 DERIVATIVEShn1X XXn1rabT (Xn)T XraT (Xn)T Xnb =r=0+(Xr)T XnabT (Xn1r)T i(92)See B.1.3 for a proof.Assume s and r are functions of x, i.e. s = s(x), r =
48、r(x), and that A is a constant, then TTxsxrxsT ArAT s=Ar +(93) (Ax)T (Ax) xT AT Ax=(94)x (Bx)T (Bx)x xT BT BxAT AxxT AT AxBT Bx=2 2xT BBx(xT BT Bx)2(95)2.4.4Gradient and HessianUsing the above we have for the gradient and the HessianxT Ax + bT x(A + A )x + bf=(96)fTxf = x2f=(97)T=A + A(98)xxT2.5Derivatives of TracesAssume F (X) to be a differentiable function of each of the elements of X. It then holds thatTr(F (X)= f (X)TXwhere f (·) is the scalar derivative of F (·).2.5.1First OrderXTr(X)=I(99)ATTr(XA)=(100)XAT BTTr(AXB)=(101)XT
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 10的認(rèn)識(教學(xué)設(shè)計(jì))-2024-2025學(xué)年一年級上冊數(shù)學(xué)人教版
- 8《匆匆》教學(xué)設(shè)計(jì)-2023-2024學(xué)年統(tǒng)編版語文六年級下冊
- 電梯出租服務(wù)合同范本
- 鋼模板加工合同范本
- 人參買賣合同范本
- 6 傳統(tǒng)游戲我會玩2023-2024學(xué)年二年級下冊道德與法治同步教學(xué)設(shè)計(jì)(統(tǒng)編版)
- Module 5 Unit 2 Can I come in (教學(xué)設(shè)計(jì))-2024-2025學(xué)年外研版(一起)英語三年級上冊
- 3《桂花雨》教學(xué)設(shè)計(jì) 第二課時(shí)(教學(xué)設(shè)計(jì))2024-2025學(xué)年統(tǒng)編版語文五年級上冊
- 承裝合同范本
- 6《工具幫助我》 教學(xué)設(shè)計(jì)-2024-2025學(xué)年科學(xué)一年級上冊冀人版
- ??谑写媪糠抠I賣合同模板(范本)
- 《材料力學(xué)》說課-課件
- 與常見距離的比賽時(shí)間對應(yīng)的VDOT值
- 義務(wù)教育物理課程標(biāo)準(zhǔn)(2022年版word版)
- 研學(xué)旅行概論教學(xué)課件匯總完整版電子教案
- 12月腹痛護(hù)理常規(guī)
- 控股集團(tuán)公司組織架構(gòu)圖.docx
- 需求供給與均衡價(jià)格PPT課件
- 最常用2000個(gè)英語單詞_(全部標(biāo)有注釋)字母排序
- 在銀行大零售業(yè)務(wù)工作會議上的講話講解學(xué)習(xí)
- 古代傳說中的藝術(shù)形象-
評論
0/150
提交評論