skip to content

How do you find the eigenvalues of the matrix [[2,1],[1,2]] by hand?

level: middleimportance: must knowfreq 68%

answer

  1. rewrite the eigen-equation with zero on one side
  2. a nonzero null vector forces singularity
  3. singular means the determinant vanishes
  4. det(A - lambda I) = 0, then back-substitute
  5. check against trace 4 and determinant 3

basics

~20 s

Solve det(A - lambda I) = 0. For [[2,1],[1,2]] that is (2 - lambda)^2 - 1 = 0, giving lambda = 3 and 1. Substituting each back into (A - lambda I)v = 0 yields eigenvectors (1,1) and (1,-1).

solid answer

~40 s

Start from `Av = lambda v`, rewrite it as `(A - lambda I)v = 0`, and note that a nonzero `v` can only satisfy this if `A - lambda I` is singular, which means `det(A - lambda I) = 0`. For `A = [[2,1],[1,2]]`, `A - lambda I = [[2-lambda, 1],[1, 2-lambda]]`, whose determinant is `(2-lambda)^2 - 1 = lambda^2 - 4*lambda + 3 = (lambda-3)(lambda-1)`. So the eigenvalues are `3` and `1`. Substituting `lambda = 3` gives `[[-1,1],[1,-1]]v = 0`, i.e. `v1 = v2`, so `(1,1)` spans that eigenspace; `lambda = 1` gives `v1 = -v2`, so `(1,-1)`. Two quick sanity checks: the eigenvalues sum to the trace (`3 + 1 = 4`) and multiply to the determinant (`3 * 1 = 3`).

go deeper

for a junior

Be able to set up A - lambda I correctly, take a 2x2 determinant, and solve the resulting quadratic. Remember to subtract lambda from the diagonal only.

for a middle

Expect to derive the characteristic equation from Av = lambda v rather than quote it, back-substitute to get each eigenspace, and verify with the trace-and-determinant identities.

for a senior

Show you know the hand method's limits: forming the characteristic polynomial is numerically poor, real solvers iterate on the matrix, and near-repeated eigenvalues make the eigenvectors themselves badly conditioned.

for a principal

Own the decision of what actually needs computing. Often only the top few eigenpairs matter, or only a trace or determinant summary, and choosing that scope decides whether a full decomposition is affordable at your data size.

## From the definition to a solvable equation The eigen-condition is `Av = lambda v` with `v != 0`. Move everything to one side, being careful to insert the identity so the subtraction is matrix-minus-matrix rather than matrix-minus-scalar: ``` Av - lambda v = 0 -> (A - lambda I) v = 0 ``` This says the nonzero vector `v` lies in the null space of `A - lambda I`. A square matrix has a nonzero null space exactly when it is **singular**, and singular is exactly when the determinant vanishes. Hence the **characteristic equation**: ``` det(A - lambda I) = 0 ``` Every eigenvalue is a root of this equation, and every root is an eigenvalue. The left-hand side expanded is a degree-`n` polynomial in `lambda` called the characteristic polynomial. ## Working the example Take `A = [[2,1],[1,2]]`. Then ``` A - lambda I = [[2 - lambda, 1], [1, 2 - lambda]] ``` For a 2x2 matrix `[[a,b],[c,d]]` the determinant is `ad - bc`, so ``` det(A - lambda I) = (2 - lambda)(2 - lambda) - (1)(1) = lambda^2 - 4*lambda + 4 - 1 = lambda^2 - 4*lambda + 3 = (lambda - 3)(lambda - 1) ``` The roots are `lambda = 3` and `lambda = 1`. There is a useful shortcut for 2x2 matrices: the characteristic polynomial is always `lambda^2 - trace(A)*lambda + det(A)`. Here `trace = 2 + 2 = 4` and `det = 4 - 1 = 3`, which reproduces `lambda^2 - 4*lambda + 3` immediately. ## Getting the eigenvectors Each eigenvalue is substituted back and the resulting homogeneous system is solved. For `lambda = 3`: ``` A - 3I = [[-1, 1], [1, -1]] ``` Both rows say the same thing, `-v1 + v2 = 0`, i.e. `v1 = v2`. The eigenspace is the line spanned by `(1,1)`; normalized it is `(1,1)/sqrt(2)`. For `lambda = 1`: ``` A - I = [[1, 1], [1, 1]] ``` Both rows say `v1 + v2 = 0`, so `v1 = -v2` and the eigenspace is spanned by `(1,-1)`, or `(1,-1)/sqrt(2)` normalized. A reassuring structural detail: the rows of `A - lambda I` **must** turn out to be dependent. If solving the system leaves you with only `v = 0`, you made an arithmetic error in the eigenvalue, because a genuine eigenvalue makes the matrix singular by construction. Notice that `(1,1)` and `(1,-1)` have dot product `1*1 + 1*(-1) = 0` — they are orthogonal. That is not luck. `A` is symmetric, and eigenvectors of a real symmetric matrix belonging to different eigenvalues are always orthogonal. ## Two free sanity checks For any square matrix: - the sum of the eigenvalues (with multiplicity) equals the **trace**, the sum of the diagonal entries; - the product of the eigenvalues equals the **determinant**. Here `3 + 1 = 4 = trace` and `3 * 1 = 3 = det`. These take seconds and catch most sign and arithmetic slips. They also give quick intuition: a zero determinant forces at least one zero eigenvalue, since a product that is zero needs a zero factor. ## Multiplicities A root of the characteristic polynomial can repeat. Its multiplicity as a root is the **algebraic multiplicity**; the dimension of the corresponding eigenspace is the **geometric multiplicity**. Geometric multiplicity is always at least one and never exceeds algebraic multiplicity. In the example above both eigenvalues are simple, so each eigenspace is a single line. ## Why this is a hand method only The characteristic polynomial is the right way to *define* eigenvalues and a fine way to compute them for 2x2 and 3x3 matrices in an interview. It is a poor way to compute them numerically. The polynomial has degree `n`, so for `n >= 5` there is no general closed-form solution by radicals, and worse, polynomial roots can be violently sensitive to small changes in the coefficients, so forming the polynomial first loses accuracy that the original matrix still contained. Practical eigenvalue computation is iterative: it works on the matrix directly with orthogonal transformations, never on its characteristic polynomial. Saying this out loud is usually what separates a memorized answer from an informed one.

  • Why must the determinant of A - lambda I be zero, rather than some other condition?
    Because `(A - lambda I)v = 0` must hold for a *nonzero* `v`. That means `A - lambda I` has a nontrivial null space, so it cannot be invertible, and a square matrix is non-invertible exactly when its determinant is zero. The determinant condition is therefore a restatement of 'there is a direction this matrix crushes to zero'.
  • What do the trace and determinant tell you about eigenvalues before you solve anything?
    The eigenvalues sum to the trace and multiply to the determinant. For `[[2,1],[1,2]]` that is sum `4` and product `3`, which already pins the pair to `3` and `1`. In general the two facts are a cheap check on any computed spectrum, and a zero determinant immediately proves at least one eigenvalue is zero.
  • Why isn't the characteristic polynomial used for large matrices?
    Two reasons. Its degree equals the matrix dimension, and polynomials of degree five or more have no general closed-form roots. More importantly, root-finding is ill-conditioned: tiny perturbations of the coefficients can move roots a lot, so building the polynomial throws away accuracy. Production algorithms iterate on the matrix itself with orthogonal transformations instead.
  • Why did the two eigenvectors of [[2,1],[1,2]] come out orthogonal?
    Because the matrix is symmetric. For a real symmetric matrix, eigenvectors belonging to distinct eigenvalues are always orthogonal, so `(1,1)` and `(1,-1)` had to be perpendicular. For a non-symmetric matrix there is no such guarantee; its eigenvectors can sit at any angle, even nearly parallel.

saying these in an interview costs you the question

  • Writes det(A - lambda) without the identity matrix
  • Solves det(A) - lambda = 0 instead of det(A - lambda I) = 0
  • Reports one eigenvector per matrix rather than per eigenvalue
  • Thinks each eigenvector must be a specific vector, not a spanning direction
  • Claims the characteristic polynomial is how software computes eigenvalues
  • Confuses trace with determinant when sanity-checking

context