Linear algebra cheat sheet

Linear Algebra cheat sheet Vectors dot product: u ∗ v = ||u||  ∗ ||v|| ∗ cos(φ) = ux vx + uy vy uy vz − uz vy cross pr

Views 230 Downloads 23 File size 161KB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

Linear Algebra cheat sheet Vectors dot product: u ∗ v = ||u||  ∗ ||v|| ∗ cos(φ) = ux vx + uy vy uy vz − uz vy cross product: u × v =  uz vx − ux vz  ux vy − uy vx norms: pP n p p kxkp := P i=1 |xi | kxk1 := n i=1 |xi | kxk∞ = max |xi | i

enclosed angle: cosφ = ||u|| ∗ ||v|| =

q

u∗v ||u|| ∗ ||v||

(u2x + u2y )(vx2 + vy2 )

Matrices basic operations [AT ]

transpose: ij = [A]ji : ”mirror over main diagonal” conjungate transpose / adjugate: A∗ = (A)T = AT ”transpose and complex conjugate all entries” (same as transpose for real matrices) multiply: AN ×M ∗ BR×K = MN ×K  −1     a b d −b d −b 1 1 invert: = det(A) = ad−bc c d −c a −c a norm: kAxkp kAkp = max kxk , induced by vector p-norm p x6=0 p T A) (A kAk2 = λmax P kAk1 = max m i=1 |aij |, j Pn kAk∞ = max j=1 |aij |, i

condition: cond(A) = kAk · A−1

eigenvalues, eigenvectors, eigenspace 1. Calculate eigenvalues by solving det (A − λI) = 0 2. Any vector x that satisfies (A − λi I) x = 0 is eigenvector for λi . 3. EigA (λi ) = {x ∈ Cn : (A − λi )x = 0} is eigenspace for λi .

definiteness defined on n×n square matrices: ∀λ ∈ σ(A). λ > 0 ⇐⇒ positive-definite λ ≥ 0 ⇐⇒ positive-semidefinite λ < 0 ⇐⇒ negative-definite λ ≤ 0 ⇐⇒ negative-semidefinite if none true (positive and negative λ exist): indefinite equivalent: eg. xT Ax > 0 ⇐⇒ positive-definite

rank Let A be a matrix and f (x) = Ax. rank(A) = rank(f ) = dim(im(f )) = number of linearly independent column vectors of A = number of non-zero rows in A after applying Gauss

⇒ det(A)−1 = det(A−1 ) ⇒ (A−1 )−1 = A ⇒ (AT )−1 = (A−1 )T diagonalizable An×n can be diagonalized iff: it has n linear independant eigenvectors all eigenvalues are real and distinct there is an invertible T , such that:  λ1  −1 .. D := T AT = 

  

. λn

kernel

A=

T −1 DT

and

AT = T D

kern(A) = {x ∈ Rn : Ax = 0} (the set of vectors mapping to 0) For nonsingular A this has one element and dim(kern(A)) = 0 (?)

λ1 , . . . , λn are the eigenvalues of A! T can be created with eigenvectors of A and is nonsingular!

trace

diagonally P dominant matrix ∀i.|aii | ≥ j6=i |aij | ⇒ nonsingular

defined on n×n square matrices: tr(A) = a11 + a22 + · · · + ann (sum of the elements on the main diagonal)

span Let v1 , . . . , vr be the column vectors of A. Then: span(A) = {λ1 v1 + · · · + λr vr | λ1 , . . . , λr ∈ R}

spectrum

determinants

σ(A) = {λ ∈ C : λ is eigenvalue of A}

P Q det(A) = σ∈Sn sgn(σ) n i=1 Ai,σi For 3×3 matrices (Sarrus rule):

properties square: N × N symmetric: A = AT diagonal: 0 except akk ⇒ implies triangular (eigenvalues on main diagonale) orthogonal AT = A−1 ⇒ normal and diagonalizable

arithmetic rules: det(A · B) = det(A) · det(B) det(A−1 ) = det(A)−1 det (rA) = rn det A , for all An×n and scalars r

nonsingular An×n is nonsingular = invertible = regular iff: There is a matrix B := A−1 such that AB = I = BA det(A) 6= 0 Ax = b has exactly one solution for each b The column vectors of A are linearly independent rank(A) = n f (x) = Ax is bijective (?)

unitary Complex analogy to orthogonal: A complex square matrix is unitary if all column vectors are orthonormal ⇒ diagonolizable ⇒ cond2 (A) = 1 ⇒ |det(A)| = 1

Hermitian A square matrix A where A∗ = A (equal to its adjugate) A real matrix is Hermitian iff symmetric ⇒ =(det(A)) = 0 (determinante is real) triangular A square matrix is  right triangular (wlog n = 3): a11 a12 a13  0 a22 a23  0 0 a33 ⇒ Eigenvalues on main diagonale idempotent A square matrix A for which AA = A. block matrices Let  B, C besubmatrices, and   A, D square submatrices. Then: A 0 A B det = det = det(A) det(D) C D 0 D

minors A matrix A has minors Mi,j := remove row i and column j from A principle minors: {det(upper left i × i matrix of A) : i..n} Sylvester’s criterion for hermitian A: ⇒ A is positiv-definite iff all principle minors are positive