Skip to main content

Matrix

Matrix is the extension of vector where from n×1n×mn\times 1 \to n\times m, but notice, the addition of matrix only perform when they are all the same n×mn\times m where they have the same number of rows and columns. For multiplication, we can only perform An×p=Bn×kCk×pA_{n\times p} = B_{n\times k} \cdot C_{k\times p}

Properties

Distributive property: A(B+C)=AB+ACA \cdot (B + C) = A \cdot B + A \cdot C and (A+B)C=AC+BC(A + B) \cdot C = A \cdot C + B \cdot C

Associative property: (AB)C=A(BC)(A \cdot B) \cdot C = A \cdot (B \cdot C)

Identity property: AI=AA \cdot I = A and IA=AI \cdot A = A

Inverse property: AA1=IA \cdot A^{-1} = I and A1A=IA^{-1} \cdot A = I

The inverse of product of matrix: (AB)1=B1A1(AB)^{-1} = B^{-1}A^{-1}, but only square matrix has inverse we will see below

The transpose of product of matrix: (AB)T=BTAT(AB)^T = B^TA^T

  • (A1)=(A)1(A^{-1})' = (A')^{-1}

We define the rank of a matrix AA as the maximum number of linearly independent row/columns of AA

  • rank(An×p)min(n,p)rank(A_{n\times p}) \le \min(n,p)
  • rank(A)=rank(A)=rank(AA)=rank(AA)rank(A) = rank(A') = rank(AA') = rank(A'A)

Let (AλI)=0|(A - \lambda I)| = 0, then λ\lambda is the eigenvalue. And Ax=λxAx = \lambda x, then xx is the eigenvector or specifically, the left eigenvector. We can also define the right eigenvector as yA=λyyA = \lambda y.

  • tr(Ak×k)=i=1kλitr(A_{k\times k}) = \sum_{i = 1}^k \lambda_i
  • Ak×k=i=1kλi|A_{k\times k}| = \prod_{i=1}^k \lambda_i
  • P1APP^{-1}AP and AA have the same eigenvalues

Different Kind of Matrix

We define a squared matrix if it has the same number of rows and columns.

  • We denote the determinant of a squared matrix as det(A)det(A) or A|A|
    • AB=AB|AB| = |A| |B|
    • A=A|A| = |A'|
    • A1=1/A|A^{-1}| = 1/|A|
    • cAk×k=ckAk×k,cR|cA_{k\times k}| =c^k|A_{k\times k}|, c\in \R
    • det(A)=0    A\det(A) = 0 \iff A is singular
  • We denote the trace of a squared matrix as tr(A)tr(A)
    • tr(A+B)=tr(A)+tr(B)tr(A+B) = tr(A) + tr(B)
    • tr(AB)=tr(BA)tr(AB) = tr(BA)
    • tr(P1AP)=tr(A)tr(P^{-1}AP) = tr(A) PP satisfied the inverse and multiplication condition
  • The spectral radius of a squared matrix is the largest absolute eigenvalue denote as ρ(An×n)=maxi=1,,nλi\rho(A_{n\times n}) = \max_{i = 1, \ldots, n} |\lambda_i|
  • Only squared matrix has inverse but only when satisfied A1A=IA^{-1}\cdot A = I, or we can said iff rank(A)=rank(A) = #A's row/column
    • full rank means det0\det \ne 0

Perron-Frobenius theorem: if AA is a real-valued, nonnegative matrix, then there exists a unique largest positive eigenvalue λ\lambda and a corresponding eigenvector vv.

Orthogonal/orthonormal Matrices

We define a matrix QRk×kQ \in \R^{k\times k} is a Orthogonal/orthonormal Matrices     QQ=QQ=I\iff QQ' = Q'Q = I where Q=Q1Q' = Q^{-1}

  • The determinant of an orthogonal matrix is +1 or -1.

Equivalently, for each vector vv in the matrix, we have vv=1v'v = 1 and vw=0v'w = 0 if vwv\ne w. Vice versa, if vv=1v'v = 1 and vw=0v'w = 0 if vwv\ne w, then QQ is an orthogonal matrix.

Symmetric Matrices

We define a matrix AA is symmetric if A=AA = A' (ofc square matrix)

  • let (λi,ei)(\lambda_i, e_i) be the eigenvalues and eigenvectors of the symmetric, then λR\lambda\in \R and ij,eiej=0\forall i\ne j, e_i'e_j = 0 that is eie_i are orthogonal to each other.
  • and also A=i=1kλieieiA = \sum_{i=1}^k\lambda_i e_ie_i'
  • xAx=[x1,x2,,xk][a11a12a1ka12a22a2ka1ka2kakk][x1x2xk]=a11x12+a22x22++akkxkk+2(a12x1x2+a13x1x3++ak1,kxk1xk)x'Ax = [x_1,x_2,\ldots,x_k] \begin{bmatrix}a_{11} & a_{12} & \cdots & a_{1k} \\ a_{12} & a_{22} & \cdots & a_{2k} \\ \cdots & \cdots & \cdots & \cdots \\a_{1k} & a_{2k} & \cdots & a_{kk}\end{bmatrix} \begin{bmatrix}x_1\\x_2\\\vdots\\x_k\end{bmatrix} = a_{11}x_1^2 + a_{22}x_2^2 + \ldots + a_{kk}x^k_k + 2(a_{12}x_1x_2 + a_{13}x_1x_3 + \ldots + a_{k-1, k}x_{k-1}x_k)

If A=AA = -A', then AA is anti-symmetric

Definite Matrix

For a symmetric matrix AA, if xAx0x'Ax \ge 0, we call AA is nonnegative definite matrix. we define as A0A \succeq 0. Or equivalent all its eigenvalues are 0\ge 0

For a symmetric matrix AA, if xAx>0,x0x'Ax > 0, \forall x\ne 0, we call AA is positive definite matrix. we define as A0A \succ 0. Or equivalent all its eigenvalues are strictly positive

  • The inverse(always exists) of a symmetric positive definite matrix is also symmetric positive definite.
  • Given a positive definite matrix BB and a sclar b>0b > 0, \forall positive definite matrix AA, 1Abexp(tr(A1B)/2)1Bb(2b)pbexp(bp)\frac{1}{|A|^b}\exp(-tr(A^{-1}B)/2) \le \frac{1}{|B|^b} (2b)^{pb}\exp(-bp). Such equality holds when A=12bBA = \frac{1}{2b}B.
  • Let say AA is p×pp\times p with eigenvalues λ1λ2λp>0\lambda_1 \ge \lambda_2 \ge \ldots \ge \lambda_p > 0 and associated normalized eigenvectors e1,,epe_1, \ldots, e_p. Then we have maxx0xAxxx=λ1\max\limits_{x \ne 0} \frac{x'Ax}{x'x} = \lambda_1 when x=e1x=e_1,..., minx0xAxxx=λp\min\limits_{x \ne 0} \frac{x'Ax}{x'x} = \lambda_p when x=epx=e_p and minxe1,,ekxAxxx=λk+1\min\limits_{x \perp e_1, \ldots, e_k} \frac{x'Ax}{x'x} = \lambda_{k+1} when x=ek+1x=e_{k+1}

Idempotent Matrices

A square matrix is Idempotent Matrices if A2=AA^2 = A

  • IAI - A is also Idempotent
  • The trace of an idempotent matrix is always integer-valued.

Projection Matrices

A square matrix AA is an Orthogonal Projection Matrices if A2=A=AA^2 = A = A'

  • AA also is Idempotent and symmetric
  • THe eigenvalues of a projection matrix are either 0 or 1

Diagonalizable Matrices

A diagonal matrix is the matrix that has only non-zero elements on the main diagonal.

A square matrix AA is diagonalizable iff there exists a invertible matrix PP such that A=PDP1A = PDP^{-1} where DD is a diagonal matrix.

Normal Matrices

A square matrix AA is normal iff AA=AAA^*A = AA^* where AA^* is the conjugate transpose of AA. That is, we only talk about normmal matrices over C\mathbb{C}.

Decomposition

Depend on different matrix, we have different decomposition. Every matrix has a Singular Value Decomposition (SVD). Every square matrix has a Jordan Decomposition. Every diagonalizable matrix has a eigenvalue decomposition when such factorized matrix is a normal or real symmetric matrix we call it spectral decomposition.

Singular Value Decomposition

An×m=Un×rDr×r(VT)r×mA_{n\times m} = U_{n\times r}D_{r\times r}(V^T)_{r\times m} where Un×rU_{n\times r} and Vm×rV_{m\times r} are semi-orthonormal matrices and Dr×rD_{r\times r} is a diagonal matrix with nonnegative entries with Dij=0D_{ij} = 0 if iji \ne j and singluar values λi\lambda_i ordered on the diagonal such that D11=λ1D22=λ2Drr=λr>0D_{11} = \lambda_1 \ge D_{22} = \lambda_2 \ge \cdots \ge D_{rr} = \lambda_r > 0. We call it Singular Value Decomposition (or SVD). UU and VV are semi-orthonormal matrices where they have the properties:

  • UjTUj=VjTVj=IU_j^TU_j = V_j^TV_j = I for j=1,,rj = 1, \ldots, r
  • UjTUk=VjTVk=0U_j^TU_k = V_j^TV_k = 0 for jkj \ne k
  • UTU=VTV=Ir×rU^TU = V^TV = I_{r\times r} and UUTIn×nUU^T \ne I_{n\times n} and VVTIm×mVV^T \ne I_{m\times m} when rmr \ne m and rnr \ne n. if r=m=nr = m = n, then UUT=VVT=Ir×rUU^T = VV^T = I_{r\times r}
  • if AA is non-square full-rank (i.e. rank =min(n,m)= \min(n,m)), then we have A^=ATA=VD^UTUD^VT=VDDVT=VD^VT\hat A = A^TA = V\hat DU^TU\hat DV^T = VDDV^T = V\hat D V^T is symmetric and positive definite

Jordan Decomposition

For a square matrix AA, Q,s.t,Q1\exists Q, s.t, Q^{-1} exists and A=QBQ1A = QBQ^{-1}. We call it Jordan Decomposition.

Spectral Decomposition

Ak×k=PΛPA_{k\times k} = P\Lambda P' and A1=PΛ1PA^{-1} = P\Lambda^{-1}P' where Λ=diag[λ1,,λk]\Lambda = \text{diag}[\lambda_1, \ldots, \lambda_k], P=[e1,,ek]P = [e_1, \ldots, e_k], and we call it spectral decomposition, for convenience purpose we use the normalized eigenvectors e1,,eke_1, \ldots, e_k as the columns of PP where PP=IP'P = I/eiei=1e_i'e_i = 1.

  • A=PΛPA = P\Lambda P' then A1/2=PΛ1/2PA^{1/2} = P\Lambda^{1/2}P'
  • A1/2A^{1/2} is still symmetric
  • A1/2A1/2=AA^{1/2}A^{1/2} = A
  • A1/2A1/2=A1/2A1/2=IA^{1/2}A^{-1/2} = A^{-1/2}A^{1/2} = I

Block Diagonal Matrix

If a matrix in matrix of matrix form where only the diagonal matrix, then it is Block Diagonal Matrix

Extra Topic

Hadamard Transformation: question in the quiz Q2×2Q_{2\times 2} in the combination of 22\frac{\sqrt{2}}{2} and 22-\frac{\sqrt{2}}{2} totally 8 of them are orthogonal.

Extended Cauchy-Schwarz Inequality: let x,yx,y be two p×1p\times 1 vector and Bp×pB_{p\times p} be a positive definite matrix, then (xy)2(xBx)(yB1y)(x'y)^2 \le (x'Bx)(y'B^{-1}y)

  • Prove can be use Cauchy-Schwarz Inequality and square root matrix.