Skip to content
LeetQuant
F6 Linear Algebra and Optimisation

F6 · Linear Algebra and Optimisation · Lesson 1 of 5

Determinants, Eigenvalues & Symmetric Matrices

What determinants and eigenvalues mean, the trace and determinant shortcuts, and the spectral theorem.

25 min

Matrices are maps

An n×nn \times n matrix AA maps vectors to vectors. Its determinant is the factor by which it scales volumes, with a sign for orientation. AA is invertible exactly when det⁡A≠0\det A \ne 0, i.e. when it does not squash space flat. For 2×22 \times 2 matrices:

A=(abcd),det⁡A=ad−bc,A−1=1ad−bc(d−b−ca).A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \qquad \det A = ad - bc, \qquad A^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} .

Useful rules: det⁡(AB)=det⁡Adet⁡B\det(AB) = \det A \det B, det⁡(A⊤)=det⁡A\det(A^\top) = \det A, det⁡(cA)=cndet⁡A\det(cA) = c^n\det A for an n×nn \times n matrix.

Eigenvalues and eigenvectors

An eigenvector v≠0v \neq 0 is a direction that AA only stretches: Av=λvAv = \lambda v. The eigenvalues are the roots of det⁡(A−λI)=0\det(A - \lambda I) = 0. Two shortcuts save time:

tr⁡A=∑iλi,det⁡A=∏iλi.\operatorname{tr} A = \sum_i \lambda_i, \qquad \det A = \prod_i \lambda_i .

For a 2×22 \times 2 matrix the eigenvalues therefore solve λ2−(tr⁡A)λ+det⁡A=0\lambda^2 - (\operatorname{tr} A)\lambda + \det A = 0.

If A=VΛV−1A = V\Lambda V^{-1} (diagonalisable), then Ak=VΛkV−1A^k = V\Lambda^kV^{-1}, so the largest eigenvalue controls long-run growth. The Fibonacci recursion is (Fn+1Fn)=(1110)(FnFn−1)\begin{pmatrix}F_{n+1} \\ F_n\end{pmatrix} = \begin{pmatrix}1 & 1 \\ 1 & 0\end{pmatrix}\begin{pmatrix}F_n \\ F_{n-1}\end{pmatrix}; the matrix has eigenvalues 1±52\tfrac{1 \pm \sqrt5}{2}, so FnF_n grows like 1.618n1.618^n.

Worked example

a symmetric 2×2

Find the eigenvalues and eigenvectors of A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}, and compute A10(10)A^{10}\begin{pmatrix}1 \\ 0\end{pmatrix}.

Show solution

tr⁡A=4\operatorname{tr} A = 4 and det⁡A=3\det A = 3, so λ2−4λ+3=0\lambda^2 - 4\lambda + 3 = 0, giving λ=3\lambda = 3 and 11. The eigenvectors are (1,1)(1, 1) for 33 and (1,−1)(1, -1) for 11.

Write (1,0)=12(1,1)+12(1,−1)(1, 0) = \tfrac12(1, 1) + \tfrac12(1, -1). Then

A10(10)=12⋅310(11)+12(1−1)=(29,52529,524).A^{10}\begin{pmatrix}1 \\ 0\end{pmatrix} = \tfrac12 \cdot 3^{10}\begin{pmatrix}1 \\ 1\end{pmatrix} + \tfrac12\begin{pmatrix}1 \\ -1\end{pmatrix} = \begin{pmatrix}29{,}525 \\ 29{,}524\end{pmatrix}.

Symmetric matrices

Covariance and correlation matrices are symmetric, and symmetric matrices are the nicest kind. The spectral theorem says a real symmetric matrix has real eigenvalues and an orthonormal basis of eigenvectors:

A=QΛQ⊤,Q⊤Q=I.A = Q\Lambda Q^\top, \qquad Q^\top Q = I .

AA is positive semi-definite (PSD) when x⊤Ax≥0x^\top Ax \ge 0 for all xx, which for symmetric matrices is equivalent to all eigenvalues being non-negative. A 2×22 \times 2 symmetric matrix is PSD exactly when its diagonal entries and its determinant are non-negative.

A handy family: the n×nn \times n matrix of all ones, JJ, has eigenvalue nn (eigenvector (1,…,1)(1, \dots, 1)) and eigenvalue 00 with multiplicity n−1n - 1. So aI+bJaI + bJ has eigenvalues a+nba + nb (once) and aa (n−1n - 1 times).

Knowledge check

What are the eigenvalues of (4123)\begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}?

Knowledge check

A 3×33 \times 3 matrix has eigenvalues 1, 2 and 3. What is det⁡(A−1)\det(A^{-1})?

Knowledge check

What is the largest eigenvalue of the 5×55 \times 5 matrix with 1 on the diagonal and 0.50.5 everywhere else?

Practice problems

Finished reading?

Answer the 3 knowledge checks to complete this lesson (0 done).