Part II — Linear Algebra & Matrix Decompositions · Chapter 5

Eigenvalues & eigenvectors

Hook

A matrix bends almost every direction you feed it into something new. But "almost" is doing real work in that sentence — are there directions a given matrix leaves alone, only stretching them, never rotating them at all?

Intuition
v = (3.0, -1.0) → Av = (11.0, 3.0) — rotated by 33.7°

Drag vv around. For most positions, AvAv points somewhere completely different from vv — the rotation angle swings all over the place. But near two particular directions, that angle collapses toward 0°: AA stops rotating and only scales.

Formalize

A vector vv is an eigenvector of AA if AA doesn't rotate it at all — only scales it:

Av=λvAv = \lambda v
  • AA — the matrix being analyzed.
  • vv — the eigenvector: a direction AA only scales, never rotates.
  • λ\lambda — the eigenvalue: how much that direction gets stretched (or flipped, if negative).
  1. Finding lambda first

    Rearranging gives (AλI)v=0(A-\lambda I)v = 0, which has a nonzero solution vv only when det(AλI)=0\det(A-\lambda I)=0 — a polynomial in λ\lambda called the characteristic polynomial. Its roots are exactly the eigenvalues.

  2. Then solving for each eigenvector

    Once λ\lambda is known, (AλI)v=0(A-\lambda I)v=0 becomes a system with a whole line of solutions — any nonzero vector along that line is a valid eigenvector for that eigenvalue.

  3. Eigenvectors need not be perpendicular

    Unlike a symmetric matrix, a general matrix's eigenvectors don't have to be at right angles to each other — this chapter's example has eigenvectors at (1,1)(1,1) and (1,2)(1,-2), which are not orthogonal.

Play
rotation = 33.7° | stretch = |Av|/|v| = 3.61

Watch the stretch ratio Av/v|Av|/|v| alongside the rotation angle. At each of the two special directions, the ratio locks onto a fixed number — that number is λ\lambda for that direction, no matter how far out you drag vv along it.

Worked example

For A=(4123)A = \begin{pmatrix}4&1\\2&3\end{pmatrix}:

  1. Solve the characteristic equation

    det(AλI)=(4λ)(3λ)(1)(2)=λ27λ+10=(λ5)(λ2)=0\det(A-\lambda I) = (4-\lambda)(3-\lambda) - (1)(2) = \lambda^2 - 7\lambda + 10 = (\lambda-5)(\lambda-2) = 0, so λ1=5\lambda_1=5 and λ2=2\lambda_2=2.

  2. Solve for the first eigenvector

    These equations come from the matrix-vector multiplication in (AλI)v=0(A-\lambda I)v=0, where v=(xy)v=\begin{pmatrix}x\\y\end{pmatrix} and the right-hand side is the zero vector (00)\begin{pmatrix}0\\0\end{pmatrix}. For λ1=5\lambda_1=5:

    1. Set up the matrix A5IA-5I:

      A5I=(4123)(5005)=(1122)A - 5I = \begin{pmatrix}4&1\\2&3\end{pmatrix} - \begin{pmatrix}5&0\\0&5\end{pmatrix} = \begin{pmatrix}-1&1\\2&-2\end{pmatrix}
    2. Set up the system (A5I)v=0(A-5I)v=0:

      (1122)(xy)=(00)\begin{pmatrix}-1&1\\2&-2\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}0\\0\end{pmatrix}
    3. Multiply row by row:

      • Row 1: (1)(x)+(1)(y)=0    x+y=0(-1)(x)+(1)(y)=0 \implies -x+y=0
      • Row 2: (2)(x)+(2)(y)=0    2(x+y)=0(2)(x)+(-2)(y)=0 \implies 2(-x+y)=0 — the same relation, no new information (exactly what det(A5I)=0\det(A-5I)=0 guarantees)

    So y=xy=x, giving direction (1,1)(1,1). Check: A(1,1)=(4+1,2+3)=(5,5)=5(1,1)A(1,1) = (4+1, 2+3) = (5,5) = 5(1,1). ✓

  3. Solve for the second eigenvector

    For λ2=2\lambda_2=2:

    1. Set up the matrix A2IA-2I:

      A2I=(4123)(2002)=(2121)A - 2I = \begin{pmatrix}4&1\\2&3\end{pmatrix} - \begin{pmatrix}2&0\\0&2\end{pmatrix} = \begin{pmatrix}2&1\\2&1\end{pmatrix}
    2. Set up the system (A2I)v=0(A-2I)v=0:

      (2121)(xy)=(00)\begin{pmatrix}2&1\\2&1\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}0\\0\end{pmatrix}
    3. Multiply row by row — both rows are identical here, so they give the same equation twice:

      • Row 1: (2)(x)+(1)(y)=0    2x+y=0(2)(x)+(1)(y)=0 \implies 2x+y=0
      • Row 2: (2)(x)+(1)(y)=0    2x+y=0(2)(x)+(1)(y)=0 \implies 2x+y=0 (identical to row 1)

    So y=2xy=-2x, giving direction (1,2)(1,-2). Check: A(1,2)=(42,26)=(2,4)=2(1,2)A(1,-2) = (4-2, 2-6) = (2,-4) = 2(1,-2). ✓

Checkpoint

This matrix has two eigenvector directions (both with rotation angle 0). Drag v until Av points the same direction as v and the stretch ratio is 5 — that picks out the eigenvector for the larger eigenvalue. Hint: it's near (1, 1).

rotation = 33.7° | stretch = 3.61 | A = [[4, 1], [2, 3]]
Drag v to try it
Summary
Av=λvAv = \lambda v

Every square matrix carries its own set of invariant directions — the eigenvectors — each with its own private scale factor, the eigenvalue. Finding them means solving one polynomial and then one linear system per root, no guessing required. Later chapters build directly on this: positive semi-definite matrices are defined by the sign of their eigenvalues, and the SVD generalizes this exact machinery to matrices that aren't even square.