learn.aathan.in ← back to aathan.in

Eigenvalues of a Matrix

What eigenvalues actually mean, how to compute them by hand, and worked 2×2 and 3×3 examples.

What an eigenvalue actually is

A square matrix AA acts on vectors — it rotates, stretches, or skews them. For almost every vector, applying AA changes its direction. But for a special set of vectors, AA only stretches or shrinks them — it doesn’t rotate them at all. Those are eigenvectors, and the stretch factor is the corresponding eigenvalue:

Av=λvA\mathbf{v} = \lambda \mathbf{v}

Here v\mathbf{v} is a nonzero vector (the eigenvector) and λ\lambda (lambda) is a scalar (the eigenvalue). In words: multiplying v\mathbf{v} by the matrix does the same thing as just multiplying it by the number λ\lambda.

This matters because eigenvalues tell you how a system behaves under repeated transformation — growth/decay rates in dynamical systems, principal axes in PCA, natural frequencies in vibration analysis, stability of Markov chains, and so on. The examples below are deliberately simple, but the method is exactly what’s used underneath all of that.

Turning it into something solvable

Rearrange the definition:

Avλv=0(AλI)v=0A\mathbf{v} - \lambda \mathbf{v} = 0 \quad\Longrightarrow\quad (A - \lambda I)\mathbf{v} = 0

where II is the identity matrix (same size as AA). This says: some nonzero vector v\mathbf{v} gets sent to the zero vector by the matrix (AλI)(A - \lambda I). That’s only possible if (AλI)(A - \lambda I) is singular (non-invertible) — and a matrix is singular exactly when its determinant is zero:

det(AλI)=0\det(A - \lambda I) = 0

This is the characteristic equation. Expanding the determinant gives a polynomial in λ\lambda (the characteristic polynomial); its roots are the eigenvalues of AA.

The recipe

  1. Form AλIA - \lambda I — subtract λ\lambda from each entry on the main diagonal.
  2. Compute det(AλI)\det(A - \lambda I) — you get a polynomial in λ\lambda.
  3. Solve that polynomial =0= 0 — the roots are the eigenvalues.
  4. (Not covered here) Plug each eigenvalue back into (AλI)v=0(A - \lambda I)\mathbf{v} = 0 to solve for its eigenvector.

Example 1 — a plain 2×2 matrix

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

Step 1 — form AλIA - \lambda I:

AλI=(4λ123λ)A - \lambda I = \begin{pmatrix} 4-\lambda & 1 \\ 2 & 3-\lambda \end{pmatrix}

Step 2 — determinant. For a 2×2 matrix (abcd)\begin{pmatrix} a & b \\ c & d \end{pmatrix}, the determinant is adbcad - bc:

det(AλI)=(4λ)(3λ)(1)(2)=λ27λ+10\det(A - \lambda I) = (4-\lambda)(3-\lambda) - (1)(2) = \lambda^2 - 7\lambda + 10

Step 3 — solve:

λ27λ+10=0    (λ5)(λ2)=0\lambda^2 - 7\lambda + 10 = 0 \;\Longrightarrow\; (\lambda - 5)(\lambda - 2) = 0 λ1=5,λ2=2\lambda_1 = 5, \qquad \lambda_2 = 2

Example 2 — a repeated eigenvalue

A=(2102)A = \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix} det(AλI)=(2λ)(2λ)0=(2λ)2=0    λ=2\det(A - \lambda I) = (2-\lambda)(2-\lambda) - 0 = (2-\lambda)^2 = 0 \;\Longrightarrow\; \lambda = 2

Here λ=2\lambda = 2 is a root of multiplicity 2 — it’s “used twice.” This particular matrix only has one independent eigenvector for that eigenvalue (it’s called a defective matrix) — a good example of why eigenvalues alone don’t always tell the full story; you sometimes also need to check how many independent eigenvectors each one actually has.

Example 3 — a 3×3 matrix

A=(200034049)A = \begin{pmatrix} 2 & 0 & 0 \\ 0 & 3 & 4 \\ 0 & 4 & 9 \end{pmatrix}

The first row has only one nonzero entry, so expanding the determinant along that row keeps things manageable:

det(AλI)=(2λ)det(3λ449λ)\det(A - \lambda I) = (2-\lambda) \det\begin{pmatrix} 3-\lambda & 4 \\ 4 & 9-\lambda \end{pmatrix} =(2λ)[(3λ)(9λ)16]=(2λ)(λ212λ+11)= (2-\lambda)\big[(3-\lambda)(9-\lambda) - 16\big] = (2-\lambda)(\lambda^2 - 12\lambda + 11) =(2λ)(λ1)(λ11)= (2-\lambda)(\lambda - 1)(\lambda - 11) λ1=2,λ2=1,λ3=11\lambda_1 = 2, \qquad \lambda_2 = 1, \qquad \lambda_3 = 11

Checking your work

Two identities catch arithmetic mistakes without redoing the whole computation:

  • Sum of eigenvalues = trace of AA (sum of the diagonal entries)
  • Product of eigenvalues = det(A)\det(A)

For Example 3: trace =2+3+9=14= 2 + 3 + 9 = 14, and 2+1+11=142 + 1 + 11 = 14 ✓. Determinant: 2(3944)=211=222 \cdot (3\cdot 9 - 4\cdot 4) = 2 \cdot 11 = 22, and 2111=222 \cdot 1 \cdot 11 = 22 ✓. Always worth running this check — it’s much faster than re-deriving the characteristic polynomial from scratch.

Where hand-calculation stops being practical

For an n×nn \times n matrix, the characteristic polynomial has degree nn. Beyond 3×33\times3 or so, factoring it by hand becomes impractical — there’s no general formula for roots of degree-5-and-up polynomials (Abel–Ruffini theorem), so real software doesn’t solve the characteristic equation directly at all. Instead it uses iterative numerical methods (the QR algorithm is the standard one) that converge to the eigenvalues without ever forming the polynomial. In practice, that’s numpy.linalg.eig, MATLAB’s eig, etc. — the method above is exactly what’s happening conceptually, just computed differently at scale.