[PDF] The Matrix Cookbook 15 nov. 2012 determinant derivative





Previous PDF Next PDF



Le déterminant de Vandermonde

Le déterminant de Vandermonde On rappelle qu'on ne change pas la valeur d'un déterminant en ajoutant `a une ... S. Duchet - http://epsilon.2000.free.fr.



Introduction `a lAnalyse Num´erique

A. Quarteroni R. Sacco & F. Saleri (2000): Numerical Mathematics. Comme la matrice dans (1.6) est inversible (matrice de Vandermonde)



SPÉCIALE MP* : ORAL 2009 Mis `a jour le 27 juin 2010 `a 15:54

27 juin 2010 Déterminant trace et Cayley Hamilton (j'y ai pensé ! ... Étudier la suite (un) et en déduire la somme des premiers termes de 0 `a 2000.



Random matrix theory

12 Free probability and infinite random matrices dL= (diag(Lp)-L)/epsilon; % Eigenvalue perturbation ... Vandermonde determinant as in (3.5).



Méthodes numériques et optimisation un guide du consommateur

12 janv. 2016 3.8.3 A est une matrice de Vandermonde . ... jacobienne est carrée et son déterminant est le jacobien. ?. Page 25 ...





MECANIQUE DES MILIEUX CONTINUS

d'avion calculée par la méthode des éléments finis (Cardona



The Matrix Cookbook

15 nov. 2012 determinant derivative of inverse matrix



Algorithmes de calcul formel et numérique

A.2 L'enfanced'Xcas:2000-2006 . tiers en cherchant ce déterminant dans Z/nZ pour plusieurs nombres ... Square-free factorisation (Algorithme de Yun).



Notes de cours

WIKIPEDIA the free encyclopedia

The Matrix Cookbook

The Matrix Cookbook

[ http://matrixcookbook.com ]

Kaare Brandt Petersen

Michael Syskind Pedersen

Version: November 15, 2012

1

Introduction

What 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 convenience 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 appendices 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 cookbook@2302.dk. Its ongoing:The project of keeping a large repository of relations involving matrices is naturally ongoing 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 acookbook@2302.dk. Keywords:Matrix algebra, matrix relations, matrix identities, derivative of determinant, derivative of inverse matrix, dierentiate a matrix. Acknowledgements:We would like to thank the following for contributions and suggestions: Bill Baxter, Brian Templeton, Christian Rishj, Christian Schroppel, Dan Boley, Douglas L. Theobald, Esben Hoegh-Rasmussen, Evripidis Karseras, Georg Martius, Glynne Casteel, Jan Larsen, Jun Bin Gao, Jurgen 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 Bar~ao, Ole Winther, Pavel Sakov, Stephan Hattinger, Troels Pedersen, Vasile 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 2

CONTENTS CONTENTS

Contents

1 Basics 6

1.1 Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.2 Determinant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.3 The Special Case 2x2 . . . . . . . . . . . . . . . . . . . . . . . . . 7

2 Derivatives 8

2.1 Derivatives of a Determinant . . . . . . . . . . . . . . . . . . . . 8

2.2 Derivatives of an Inverse . . . . . . . . . . . . . . . . . . . . . . . 9

2.3 Derivatives of Eigenvalues . . . . . . . . . . . . . . . . . . . . . . 10

2.4 Derivatives of Matrices, Vectors and Scalar Forms . . . . . . . . 10

2.5 Derivatives of Traces . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.6 Derivatives of vector norms . . . . . . . . . . . . . . . . . . . . . 14

2.7 Derivatives of matrix norms . . . . . . . . . . . . . . . . . . . . . 14

2.8 Derivatives of Structured Matrices . . . . . . . . . . . . . . . . . 14

3 Inverses 17

3.1 Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.2 Exact Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.3 Implication on Inverses . . . . . . . . . . . . . . . . . . . . . . . . 20

3.4 Approximations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.5 Generalized Inverse . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.6 Pseudo Inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4 Complex Matrices 24

4.1 Complex Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.2 Higher order and non-linear derivatives . . . . . . . . . . . . . . . 26

4.3 Inverse of complex sum . . . . . . . . . . . . . . . . . . . . . . . 27

5 Solutions and Decompositions 28

5.1 Solutions to linear equations . . . . . . . . . . . . . . . . . . . . . 28

5.2 Eigenvalues and Eigenvectors . . . . . . . . . . . . . . . . . . . . 30

5.3 Singular Value Decomposition . . . . . . . . . . . . . . . . . . . . 31

5.4 Triangular Decomposition . . . . . . . . . . . . . . . . . . . . . . 32

5.5 LU decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.6 LDM decomposition . . . . . . . . . . . . . . . . . . . . . . . . . 33

5.7 LDL decompositions . . . . . . . . . . . . . . . . . . . . . . . . . 33

6 Statistics and Probability 34

6.1 Denition of Moments . . . . . . . . . . . . . . . . . . . . . . . . 34

6.2 Expectation of Linear Combinations . . . . . . . . . . . . . . . . 35

6.3 Weighted Scalar Variable . . . . . . . . . . . . . . . . . . . . . . 36

7 Multivariate Distributions 37

7.1 Cauchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7.2 Dirichlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7.3 Normal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7.4 Normal-Inverse Gamma . . . . . . . . . . . . . . . . . . . . . . . 37

7.5 Gaussian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7.6 Multinomial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 3

CONTENTS CONTENTS

7.7 Student's t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7.8 Wishart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

7.9 Wishart, Inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

8 Gaussians 40

8.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

8.2 Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

8.3 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

8.4 Mixture of Gaussians . . . . . . . . . . . . . . . . . . . . . . . . . 44

9 Special Matrices 46

9.1 Block matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

9.2 Discrete Fourier Transform Matrix, The . . . . . . . . . . . . . . 47

9.3 Hermitian Matrices and skew-Hermitian . . . . . . . . . . . . . . 48

9.4 Idempotent Matrices . . . . . . . . . . . . . . . . . . . . . . . . . 49

9.5 Orthogonal matrices . . . . . . . . . . . . . . . . . . . . . . . . . 49

9.6 Positive Denite and Semi-denite Matrices . . . . . . . . . . . . 50

9.7 Singleentry Matrix, The . . . . . . . . . . . . . . . . . . . . . . . 52

9.8 Symmetric, Skew-symmetric/Antisymmetric . . . . . . . . . . . . 54

9.9 Toeplitz Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

9.10 Transition matrices . . . . . . . . . . . . . . . . . . . . . . . . . . 55

9.11 Units, Permutation and Shift . . . . . . . . . . . . . . . . . . . . 56

9.12 Vandermonde Matrices . . . . . . . . . . . . . . . . . . . . . . . . 57

10 Functions and Operators 58

10.1 Functions and Series . . . . . . . . . . . . . . . . . . . . . . . . . 58

10.2 Kronecker and Vec Operator . . . . . . . . . . . . . . . . . . . . 59

10.3 Vector Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

10.4 Matrix Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

10.5 Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

10.6 Integral Involving Dirac Delta Functions . . . . . . . . . . . . . . 62

10.7 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

A One-dimensional Results 64

A.1 Gaussian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 A.2 One Dimensional Mixture of Gaussians . . . . . . . . . . . . . . . 65

B Proofs and Details 66

B.1 Misc Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 4

CONTENTS CONTENTS

Notation and Nomenclature

AMatrix

A ijMatrix indexed for some purpose A iMatrix indexed for some purpose A ijMatrix indexed for some purpose A nMatrix indexed for some purposeor

The n.th power of a square matrix

A

1The inverse matrix of the matrixA

A +The pseudo inverse matrix of the matrixA(see Sec. 3.6) A

1=2The square root of a matrix (if unique), not elementwise

(A)ijThe (i;j).th entry of the matrixA A ijThe (i;j).th entry of the matrixA [A]ijTheij-submatrix, i.e.Awith i.th row and j.th column deleted aVector (column-vector) a iVector indexed for some purpose a iThe i.th element of the vectora aScalar Tr(A) Trace of the matrixA diag(A) Diagonal matrix of the matrixA, i.e. (diag(A))ij=ijAij eig(A) Eigenvalues of the matrixA vec(A) The vector-version of the matrixA(see Sec. 10.2.2) sup Supremum of a set jjAjjMatrix norm (subscript if any denotes what norm) A

TTransposed matrix

A TThe inverse of the transposed and vice versa,AT= (A1)T= (AT)1. A

Complex conjugated matrix

A HTransposed and complex conjugated matrix (Hermitian)

ABHadamard (elementwise) product

A

BKronecker product

0The null matrix. Zero in all entries.

IThe identity matrix

J ijThe single-entry matrix, 1 at (i;j) and zero elsewhere

A positive denite matrix

A diagonal matrixPetersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 5

1 BASICS

1 Basics

(AB)1=B1A1(1) (ABC:::)1=:::C1B1A1(2) (AT)1= (A1)T(3) (A+B)T=AT+BT(4) (AB)T=BTAT(5) (ABC:::)T=:::CTBTAT(6) (AH)1= (A1)H(7) (A+B)H=AH+BH(8) (AB)H=BHAH(9) (ABC:::)H=:::CHBHAH(10)

1.1 Trace

Tr(A) =P

iAii(11)

Tr(A) =P

ii; i= eig(A) (12)

Tr(A) = Tr(AT) (13)

Tr(AB) = Tr(BA) (14)

Tr(A+B) = Tr(A) + Tr(B) (15)

Tr(ABC) = Tr(BCA) = Tr(CAB) (16)

a

Ta= Tr(aaT) (17)

1.2 Determinant

LetAbe annnmatrix.

det(A) =Q iii= eig(A) (18) det(cA) =cndet(A);ifA2Rnn(19) det(AT) = det(A) (20) det(AB) = det(A)det(B) (21) det(A1) = 1=det(A) (22) det(An) = det(A)n(23) det(I+uvT) = 1 +uTv(24)

Forn= 2:

det(I+A) = 1 + det(A) + Tr(A) (25)

Forn= 3:

det(I+A) = 1 + det(A) + Tr(A) +12

Tr(A)212

Tr(A2) (26)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 6

1.3 The Special Case 2x2 1 BASICS

Forn= 4:

det(I+A) = 1 + det(A) + Tr(A) +12 +Tr(A)212

Tr(A2)

16

Tr(A)312

Tr(A)Tr(A2) +13

Tr(A3) (27)

For small", the following approximation holds

det(I+"A)=1 + det(A) +"Tr(A) +12 "2Tr(A)212 "2Tr(A2) (28)

1.3 The Special Case 2x2

Consider the matrixA

A=A11A12

A 21A22

Determinant and trace

det(A) =A11A22A12A21(29)

Tr(A) =A11+A22(30)

Eigenvalues

2Tr(A) + det(A) = 0

1=Tr(A) +pTr(A)24det(A)2

2=Tr(A)pTr(A)24det(A)2

1+2= Tr(A)12= det(A)

Eigenvectors

v 1/A12 1A11 v 2/A12 2A11

Inverse

A

1=1det(A)

A22A12

A21A11

(31)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 7

2 DERIVATIVES

2 Derivatives

This section is covering dierentiation of a number of expressions with respect to a matrixX. Note that it is always assumed thatXhasno special structure, i.e. that the elements ofXare independent (e.g. not symmetric, Toeplitz, positive denite). See section 2.8 for dierentiation of structured matrices. The basic assumptions can be written in a formula as @X kl@X ij=iklj(32) that is for e.g. vector forms, @x@y i =@xi@y @x@y i =@x@y i @x@y ij =@xi@y j The following rules are general and very useful when deriving the dierential of an expression ([19]): @A= 0 (Ais a constant) (33) @(X) =@X(34) @(X+Y) =@X+@Y(35) @(Tr(X)) = Tr(@X) (36) @(XY) = (@X)Y+X(@Y) (37) @(XY) = (@X)Y+X(@Y) (38) @(X

Y) = (@X)

Y+X (@Y) (39) @(X1) =X1(@X)X1(40) @(det(X)) = Tr(adj(X)@X) (41) @(det(X)) = det(X)Tr(X1@X) (42) @(ln(det(X))) = Tr(X1@X) (43) @XT= (@X)T(44) @XH= (@X)H(45)

2.1 Derivatives of a Determinant

2.1.1 General form

@det(Y)@x = det(Y)Tr Y 1@Y@x (46) X k@det(X)@X ikXjk=ijdet(X) (47)

2det(Y)@x

2= det(Y)"

Tr" Y

1@@Y@x

@x +Tr Y 1@Y@x Tr Y 1@Y@x Tr Y 1@Y@x Y 1@Y@x (48)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 8

2.2 Derivatives of an Inverse 2 DERIVATIVES

2.1.2 Linear forms

@det(X)@X= det(X)(X1)T(49) X k@det(X)@X ikXjk=ijdet(X) (50) @det(AXB)@X= det(AXB)(X1)T= det(AXB)(XT)1(51)

2.1.3 Square forms

IfXis square and invertible, then

@det(XTAX)@X= 2det(XTAX)XT(52)

IfXis not square butAis symmetric, then

@det(XTAX)@X= 2det(XTAX)AX(XTAX)1(53)

IfXis not square andAis not symmetric, then

@det(XTAX)@X= det(XTAX)(AX(XTAX)1+ATX(XTATX)1) (54)

2.1.4 Other nonlinear forms

Some special cases are (See [9, 7])

@lndet(XTX)j@X= 2(X+)T(55) @lndet(XTX)@X+=2XT(56) @lnjdet(X)j@X= (X1)T= (XT)1(57) @det(Xk)@X=kdet(Xk)XT(58)

2.2 Derivatives of an Inverse

From [27] we have the basic identity

@Y1@x =Y1@Y@x Y1(59)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 9

2.3 Derivatives of Eigenvalues 2 DERIVATIVES

from which it follows @(X1)kl@X ij=(X1)ki(X1)jl(60) @aTX1b@X=XTabTXT(61) @det(X1)@X=det(X1)(X1)T(62) @Tr(AX1B)@X=(X1BAX1)T(63) @Tr((X+A)1)@X=((X+A)1(X+A)1)T(64) From [32] we have the following result: LetAbe annninvertible square matrix,Wbe the inverse ofA, andJ(A) is annn-variate and dierentiable function with respect toA, then the partial dierentials ofJwith respect toA andWsatisfy@J@A=AT@J@WAT

2.3 Derivatives of Eigenvalues

@@XXeig(X) =@@XTr(X) =I(65) @@XYeig(X) =@@Xdet(X) = det(X)XT(66) IfAis real and symmetric,iandviare distinct eigenvalues and eigenvectors ofA(see (276)) withvTivi= 1, then [33] i=vTi@(A)vi(67) @vi= (iIA)+@(A)vi(68)

2.4 Derivatives of Matrices, Vectors and Scalar Forms

2.4.1 First Order

@xTa@x=@aTx@x=a(69) @aTXb@X=abT(70) @aTXTb@X=baT(71) @aTXa@X=@aTXTa@X=aaT(72) @X@X ij=Jij(73) @(XA)ij@X mn=im(A)nj= (JmnA)ij(74) @(XTA)ij@X mn=in(A)mj= (JnmA)ij(75)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 10

2.4 Derivatives of Matrices, Vectors and Scalar Forms 2 DERIVATIVES

2.4.2 Second Order

@@X ijX klmnX klXmn= 2X klX kl(76) @bTXTXc@X=X(bcT+cbT) (77) @(Bx+b)TC(Dx+d)@x=BTC(Dx+d) +DTCT(Bx+b) (78) @(XTBX)kl@X ij=lj(XTB)ki+kj(BX)il(79) @(XTBX)@X ij=XTBJij+JjiBX(Jij)kl=ikjl(80) See Sec 9.7 for useful properties of the Single-entry matrixJij @xTBx@x= (B+BT)x(81) @bTXTDXc@X=DTXbcT+DXcbT(82) @@X(Xb+c)TD(Xb+c) = (D+DT)(Xb+c)bT(83)

AssumeWis symmetric, then

@@s(xAs)TW(xAs) =2ATW(xAs) (84) @@x(xs)TW(xs) = 2W(xs) (85) @@s(xs)TW(xs) =2W(xs) (86) @@x(xAs)TW(xAs) = 2W(xAs) (87) @@A(xAs)TW(xAs) =2W(xAs)sT(88)

As a case with complex values the following holds

@(axHb)2@x=2b(axHb)(89) This formula is also known from the LMS algorithm [14]

2.4.3 Higher-order and non-linear

@(Xn)kl@X ij=n1X r=0(XrJijXn1r)kl(90)

For proof of the above, see B.1.3.

@@XaTXnb=n1X r=0(Xr)TabT(Xn1r)T(91)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 11

2.5 Derivatives of Traces 2 DERIVATIVES

@XaT(Xn)TXnb=n1X r=0h

Xn1rabT(Xn)TXr

+(Xr)TXnabT(Xn1r)Ti (92)

See B.1.3 for a proof.

Assumesandrare functions ofx, i.e.s=s(x);r=r(x), and thatAis a constant, then @@xsTAr=@s@x T

Ar+@r@x

T A

Ts(93)

@@x(Ax)T(Ax)(Bx)T(Bx)=@@xx

TATAxx

TBTBx(94)

= 2 ATAxx

TBBx2xTATAxBTBx(xTBTBx)2(95)

2.4.4 Gradient and Hessian

Using the above we have for the gradient and the Hessian f=xTAx+bTx(96) r xf=@f@x= (A+AT)x+b(97)

2f@x@xT=A+AT(98)

2.5 Derivatives of Traces

AssumeF(X) to be a dierentiable function of each of the elements ofX. It then holds that@Tr(F(X))@X=f(X)T wheref() is the scalar derivative ofF().

2.5.1 First Order

@@XTr(X) =I(99) @@XTr(XA) =AT(100) @@XTr(AXB) =ATBT(101) @@XTr(AXTB) =BA(102) @@XTr(XTA) =A(103) @@XTr(AXT) =A(104) @@XTr(A X) = Tr(A)I(105)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 12

2.5 Derivatives of Traces 2 DERIVATIVES

2.5.2 Second Order

@@XTr(X2) = 2XT(106) @@XTr(X2B) = (XB+BX)T(107) @@XTr(XTBX) =BX+BTX(108) @@XTr(BXXT) =BX+BTX(109) @@XTr(XXTB) =BX+BTX(110) @@XTr(XBXT) =XBT+XB(111) @@XTr(BXTX) =XBT+XB(112) @@XTr(XTXB) =XBT+XB(113) @@XTr(AXBX) =ATXTBT+BTXTAT(114) @@XTr(XTX) =@@XTr(XXT) = 2X(115) @@XTr(BTXTCXB) =CTXBBT+CXBBT(116) @@XTrXTBXC=BXC+BTXCT(117) @@XTr(AXBXTC) =ATCTXBT+CAXB(118) @@XTrh (AXB+C)(AXB+C)Ti = 2AT(AXB+C)BT(119) @@XTr(X

X) =@@XTr(X)Tr(X) = 2Tr(X)I(120)

See [7].

2.5.3 Higher Order

@@XTr(Xk) =k(Xk1)T(121) @@XTr(AXk) =k1X r=0(XrAXkr1)T(122) @@XTrBTXTCXXTCXB=CXXTCXBBT +CTXBBTXTCTX +CXBBTXTCX +CTXXTCTXBBT(123)Petersen & Pedersen, The Matrix Cookbook, Version: November 15, 2012,Page 13

2.6 Derivatives of vector norms 2 DERIVATIVES

quotesdbs_dbs29.pdfusesText_35
[PDF] Second degré : Résumé de cours et méthodes 1 - Xm1 Math

[PDF] Déterminants

[PDF] X Matrices - Déterminants - Systèmes d 'équations 1 Introduction )

[PDF] 1 Résumé 2 Matrices rectangulaires - Cours en Ligne

[PDF] Diagonalisation des matrices Matrices diagonales - CEMHTI

[PDF] Une démonstration du calcul du déterminant en blocs - Numdam

[PDF] Salud del adolescente - World Health Organization

[PDF] quels sont les principaux déterminants de santé et de bien-être social

[PDF] DS 2 - Seconde - Physique - Chimie - Free

[PDF] sur la détermination de l 'acidité titrable du lait - Hal

[PDF] Détermination théorique de l 'enthalpie de solubilité ? l 'état solide

[PDF] Travaux Pratiques - usthb

[PDF] TP N°2 DETERMINATION DE LA CHALEUR LATENTE DE FUSION

[PDF] Mesures calorimétriques : méthode des mélanges colerette

[PDF] Exercices résolus de chimie organique - Numilog