Skip to the lesson
FixTheRobot Explore Robotics / Linear Algebra / M6 Eigenvalues, Eigenvectors and SVD / M6-T2

Linear Algebra · Theory · M6

M6-T2 — The Characteristic Equation

Eigenvalues are the roots of a polynomial built from the matrix. For small matrices you can solve it by hand, and it reveals trace, determinant and rotations.

  • Lesson 2 of 8
  • Module 6: Eigenvalues, Eigenvectors and SVD
  • Eigen and SVD
  • About 8 minutes to read

The definition A v = λ v is an equation with two unknowns. Eliminating v leaves an equation in λ alone: the characteristic equation. For 2 × 2 and 3 × 3 matrices you can solve it by hand, which is the best way to see how trace, determinant, repeated roots and rotations show up in the eigenvalues.

Learning objectives

After this lesson, you should be able to:

  • Derive and solve the characteristic equation det(A − λI) = 0 for 2 × 2 and simple 3 × 3 matrices.
  • Find eigenvectors as null-space vectors of A − λI.
  • Prove that the eigenvalues sum to the trace and multiply to the determinant.
  • Classify the roots (distinct real, repeated, complex) and interpret each for robot dynamics.

Introduction and motivation

Whether a linearised controller is stable, whether a covariance prediction blows up, and how an arm vibrates can all be read from eigenvalues, and the quickest way to find them for the small matrices that appear in analysis is the characteristic equation. It also makes visible three facts to keep in mind: the eigenvalues add to the trace, multiply to the determinant, and come in complex pairs when the matrix rotates.

The intuition

The equation A v = λ v can be rewritten (A − λI) v = 0. We are looking for a non-zero v in the null space of A − λI. A matrix has a non-zero null vector exactly when it is singular, which means its determinant is zero. So the allowed values of λ are the ones that make A − λI singular: det(A − λI) = 0. That is the characteristic equation, a polynomial equation of degree n in λ.

Three kinds of rootsThe characteristic polynomial of a two by two matrix is a quadratic. Its discriminant decides the case: two different real eigenvalues, one repeated eigenvalue, or a complex pair, which is the signature of a matrix that rotates.λ² − (trace) λ + (determinant) = 0 discriminant > 0two real eigenvaluese.g. [[2,1],[1,2]]: 3 and 1 discriminant = 0one repeated eigenvaluee.g. [[2,1],[0,2]]: 2 (twice) discriminant < 0complex paire.g. rotation: ±i discriminant = (trace)² − 4·(determinant)
For a 2 × 2 matrix the characteristic polynomial is a quadratic: its discriminant decides between two real, one repeated, or a complex pair of eigenvalues.

Interactive figure. A two by two matrix turns the unit circle into an ellipse and the dashed lines mark real eigen-directions. When the eigenvalues become complex the matrix rotates every direction and no dashed lines are drawn. The readout shows eigenvalues, trace and determinant. This figure needs JavaScript to be interactive.

Change the matrix entries. The readout checks that the eigenvalues add to the trace and multiply to the determinant. Make the off-diagonal entries opposite in sign and large (b = 2, c = −2): the eigenvalues turn complex and the dashed eigen-directions disappear.

Geometric and physical interpretation

Geometric view. Shifting the matrix by −λI subtracts λ from the stretch along every direction. At an eigenvalue, the shifted matrix squashes some direction to zero, so it is singular: the parallelogram of its columns has zero area. Physical view. For a 2D linear system the trace and determinant together decide the behaviour: complex eigenvalues mean the state spirals, and the sign of the real part decides whether the spiral grows or decays. A planar system with a rotation component (a pendulum, an oscillating gimbal) always has complex eigenvalues.

The mathematics

p(λ)
the characteristic polynomial det(A − λI), of degree n for an n × n matrix.
tr A
the trace: the sum of the diagonal entries.
det A
the determinant.

The equation

(A − λI) v = 0 with v ≠ 0   ⇔   det(A − λ I) = 0

What it means. A non-zero v exists only if A − λI is singular. The values of λ that make the determinant zero are the eigenvalues; each one has a null space of A − λI containing its eigenvectors.

The 2 × 2 case

det [a−λ  b; c  d−λ] = λ² − (a + d) λ + (a d − b c) = λ² − tr(A) λ + det(A) = 0
λ = ( tr ± √( tr² − 4 det ) ) / 2

What it means. A quadratic whose coefficients are the trace and determinant. The sign of the discriminant tr² − 4 det chooses between real distinct, repeated and complex roots.

Trace and determinant

λ1 + λ2 + ... + λn = tr A          λ1 λ2 ... λn = det A

What it means. The eigenvalues add up to the trace and multiply to the determinant (counted with multiplicity, including complex ones). So det A = 0 exactly when 0 is an eigenvalue.

Eigenvalues are the roots of det(A − λI) = 0. They sum to the trace, multiply to the determinant, and are complex when the matrix rotates.

Step-by-step derivation: the 2 × 2 polynomial, and the trace and determinant relations

The 2 × 2 polynomial. For A = [[a, b], [c, d]]:

  1. A − λI = [[a − λ, b], [c, d − λ]].
  2. Its determinant: (a − λ)(d − λ) − bc = λ² − (a + d)λ + (ad − bc).
  3. Recognise a + d = tr A and ad − bc = det A, giving λ² − (tr A)λ + det A = 0.
  4. Solve with the quadratic formula: λ = (tr ± √(tr² − 4 det))/2.

Sum and product. If the roots are λ₁, λ₂ then λ² − (tr)λ + det = (λ − λ₁)(λ − λ₂) = λ² − (λ₁ + λ₂)λ + λ₁λ₂. Matching coefficients gives λ₁ + λ₂ = tr A and λ₁λ₂ = det A. For general n the same follows by expanding det(A − λI) = Π(λi − λ) and comparing the coefficients of λn−1 and λ⁰ (the second is det A at λ = 0).

Triangular matrices. The determinant of a triangular matrix is the product of its diagonal, so det(A − λI) = Π(aii − λ): the eigenvalues are the diagonal entries.

Finding eigenvectors. For each root λ, solve (A − λI)v = 0 by elimination (Module 3). Because A − λI is singular, there is at least one free variable, giving at least one eigenvector direction. For a repeated root there may be fewer independent eigenvectors than the multiplicity (a defective matrix).

Complex roots. A real matrix has a real polynomial, whose complex roots come in conjugate pairs α ± iβ. For a 2 × 2 real matrix with tr² < 4 det, the state spirals: the magnitude factor is √det per step and the turning angle arctan(β/α).

A worked example: three cases and a 3 × 3

  • Distinct real. A = [[2, 1], [1, 2]]: λ² − 4λ + 3 = 0 = (λ − 3)(λ − 1). For λ = 3: A − 3I = [[−1, 1], [1, −1]], null space spanned by (1, 1). For λ = 1: A − I = [[1, 1], [1, 1]], null space spanned by (1, −1).
  • Repeated. [[2, 1], [0, 2]]: (2 − λ)² = 0, λ = 2 twice, but A − 2I = [[0, 1], [0, 0]] has only the null direction (1, 0): one eigenvector, not two (defective).
  • Complex. The 90° rotation [[0, −1], [1, 0]]: trace 0, determinant 1, so λ² + 1 = 0 and λ = ±i: no real eigenvector. For [[1, 2], [−2, 1]]: trace 2, determinant 5, λ = 1 ± 2i, magnitude √5 = 2.236 (a growing spiral).
  • Trace and determinant. For the first matrix, 3 + 1 = 4 = trace and 3·1 = 3 = determinant ✓.
  • A 3 × 3. [[2, 0, 0], [0, 3, 4], [0, 4, 9]]: the first row and column are decoupled, giving λ = 2; the lower block [[3, 4], [4, 9]] has trace 12, determinant 11, so λ² − 12λ + 11 = (λ − 11)(λ − 1). The eigenvalues are 2, 1 and 11; their sum 14 equals the trace 2 + 3 + 9 = 14, and their product 22 equals the determinant 2·(27 − 16) = 22.

Robotics application

Closed-loop stability. Linearise a controlled robot to ẋ = A x (or x⁺ = A x) and compute the eigenvalues of A. Real parts below zero (or magnitudes below one) mean stability; a complex pair means oscillation, and its imaginary part is the oscillation frequency. Tuning a PD gain is nothing more than moving these eigenvalues; the Foundations and Control labs on this site (PID and oscillating robot) are physical versions of the three cases above: overdamped (distinct real), critically damped (repeated), underdamped (complex pair).

2D covariance ellipses. The eigenvalues of a 2 × 2 covariance are found with the same quadratic, giving the squared half-axes of the uncertainty ellipse; the formula λ = (tr ± √(tr² − 4 det))/2 is used in code that draws the ellipses in SLAM visualisations.

Rotation and turning. The complex eigenvalue of a planar rotation by θ is e±iθ: its argument is the rotation angle. This reappears in Module 7 (the axis of a 3D rotation is its eigenvector with λ = 1) and Module 10.

Quick checks. Before trusting a library result for a small system, verify trace and determinant against the eigenvalues. This catches transposed or mis-scaled matrices at once.

Engineering implications and limitations

Practical rules

  • Use the polynomial only for 2 × 2 and 3 × 3 by hand. For anything bigger, use a library eigenvalue routine; roots of the characteristic polynomial are extremely sensitive to rounding in the coefficients.
  • Always check trace and determinant. They are free consistency tests: eigenvalues must sum to the trace and multiply to the determinant.
  • Expect complex results for non-symmetric matrices. Do not discard small imaginary parts blindly: a pair such as 0.99 ± 0.01i is a slow oscillation, not noise. For symmetric matrices complex eigenvalues are impossible, so use eigh.
  • A repeated eigenvalue does not guarantee two eigenvectors. Check the null-space dimension of A − λI, not just the multiplicity of the root.
  • Near-repeated eigenvalues are sensitive. The corresponding eigenvectors are poorly determined; small perturbations rotate them a lot. This matters for closely spaced vibration modes.

Limits

The characteristic equation finds eigenvalues exactly in exact arithmetic and for modest sizes. It says nothing about transient behaviour or sensitivity (pseudospectra), and its coefficients are not computed stably for large matrices.

Common misconceptions

“Eigenvalues of a real matrix must be real.”

Only for symmetric matrices. A rotation has eigenvalues ±i; any real matrix with tr² < 4 det (2 × 2) has a complex pair.

“A repeated eigenvalue gives two independent eigenvectors.”

It may not: [[2, 1], [0, 2]] has the double eigenvalue 2 but only one eigenvector direction.

“The eigenvalues of A are the entries of its diagonal.”

Only if A is triangular (or diagonal). In general the diagonal is only constrained by the trace, which equals the sum of the eigenvalues.

“det(A − λI) = 0 gives the eigenvectors.”

It gives the eigenvalues. For each eigenvalue you must then solve (A − λI)v = 0 to get the eigenvectors.

Engineering takeaways

  1. Eigenvalues are the roots of det(A − λI) = 0, because a non-zero v with (A − λI)v = 0 needs a singular A − λI.
  2. For 2 × 2: λ² − tr(A)λ + det(A) = 0, so λ = (tr ± √(tr² − 4 det))/2.
  3. The eigenvalues sum to the trace and multiply to the determinant; for triangular matrices they are the diagonal entries.
  4. A negative discriminant gives a complex pair, the signature of rotation; a repeated root may lack a full set of eigenvectors.
  5. Use library routines for large matrices and always sanity-check trace and determinant.

References and further reading

Primary papers and authoritative documentation.

Knowledge check

Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

Find the eigenvalues and eigenvectors of A = [[3, 1], [0, 2]].

Explanation

Triangular, so λ = 3 and 2. For λ = 3: A − 3I = [[0, 1], [0, −1]], null space (1, 0). For λ = 2: A − 2I = [[1, 1], [0, 0]], null space (1, −1). Check: A(1, −1) = (3 − 1, −2) = (2, −2) = 2·(1, −1). Trace 5 = 3 + 2 and determinant 6 = 3·2.

Question 2

A linearised planar system has A = [[0, 1], [−4, −0.4]]. Compute its eigenvalues. Is it stable, and does it oscillate?

Explanation

trace = −0.4, determinant = 4, so λ² + 0.4λ + 4 = 0 and λ = (−0.4 ± √(0.16 − 16))/2 = −0.2 ± 1.99i. The real part is negative, so it is stable (decaying), and the non-zero imaginary part means it oscillates at about 1.99 rad/s while the amplitude shrinks as e^(−0.2 t): an underdamped system.

Question 3

Why can a symmetric 2 × 2 matrix never have a complex pair of eigenvalues? Use the discriminant.

Explanation

For A = [[a, b], [b, c]] the discriminant of the characteristic polynomial is tr² − 4 det = (a + c)² − 4(ac − b²) = (a − c)² + 4b², a sum of squares and therefore never negative. So the roots are always real.

What’s next

Eigenvalues of general matrices can be complex and eigenvector sets incomplete. Symmetric matrices, the ones that describe covariances, energies and Hessians, are far better behaved, and that is the topic of the next lesson.

Next lesson

M6-T3 — Symmetric Matrices

State the spectral theorem and use the orthogonal eigenbasis of a symmetric matrix.

Nothing below is required to finish this lesson.