How this instrument works
The characteristic polynomial of a square matrix A is det(A − λI), and its roots are the eigenvalues — the special scalars λ for which some nonzero vector v satisfies Av = λv, meaning A only stretches or flips v rather than turning it. For a general n×n matrix that determinant takes real work to expand. A 2×2 matrix is the one size where the expansion collapses to something you can write from memory: det([[a−λ, b],[c, d−λ]]) = (a−λ)(d−λ) − bc, and multiplying out the two linear factors leaves λ² − (a+d)λ + (ad−bc). The middle coefficient is the trace, the constant term is the determinant, and no row reduction or cofactor expansion is needed to reach either one.
That shortcut is why this sheet only ever reports trace and determinant rather than grinding through the full expansion: once you have λ² − trace·λ + det = 0, the rest is ordinary quadratic-formula work, λ = (trace ± √(trace² − 4·det)) / 2. The quantity under the root, trace² − 4·det, is the discriminant, and its sign tells you the character of the two eigenvalues before you even finish the arithmetic: positive gives two distinct real values, zero gives one value counted twice, and negative gives a conjugate pair of complex values.
A negative discriminant is not a failure of the method — it is the correct answer for matrices that rotate rather than stretch. A 90° rotation matrix has trace 0 and determinant 1, so its polynomial is λ² + 1 = 0 with roots ±i: there is genuinely no real direction such a matrix leaves unchanged, and the complex pair records that honestly. This is a different question from a Cholesky decomposition, which factors a matrix into L·Lᵀ to describe its structure rather than to locate the scalars where it merely scales a vector.
- Enter the four matrix entries a (row 1, col 1), b (row 1, col 2), c (row 2, col 1), and d (row 2, col 2), read left to right, top to bottom, as [[a, b], [c, d]].
- Read Trace (λ coefficient) — this is a + d, the number the polynomial subtracts as its middle term.
- Read Determinant (constant term) — this is ad − bc, the polynomial's constant term and the product of both eigenvalues.
- Write the polynomial yourself as λ² − Trace·λ + Determinant = 0, then factor it or apply the quadratic formula to get the two eigenvalues.
- Check the discriminant, Trace² − 4·Determinant: positive means two real eigenvalues, zero means a repeated one, negative means a complex-conjugate pair.
Worked example — the matrix [[2, 1], [1, 2]]
Set a = 2, b = 1, c = 1, and d = 2. The sheet reports Trace (λ coefficient) as 4 and Determinant (constant term) as 3, matching a + d = 2 + 2 = 4 and ad − bc = 2×2 − 1×1 = 3 directly from the entries with no extra work required.
Assemble the polynomial by hand from those two figures: λ² − 4λ + 3 = 0. It factors cleanly as (λ − 1)(λ − 3), so the eigenvalues are 1 and 3 — the two scalars this particular matrix stretches some direction by, found without ever writing out det(A − λI) or subtracting λ from the diagonal yourself.
Questions
What is a characteristic polynomial, in plain terms?
It is the equation det(A − λI) = 0 written out for a matrix A, and its roots are the matrix's eigenvalues. For a 2×2 matrix the equation always reduces to λ² − (trace)λ + (determinant), so trace and determinant alone are enough to reconstruct it — no cofactor expansion needed.
How do I turn Trace and Determinant into actual eigenvalues?
Plug them into the quadratic formula: λ = (trace ± √(trace² − 4·determinant)) / 2. For the matrix [[2,1],[1,2]], trace = 4 and determinant = 3, giving λ = (4 ± √(16−12))/2 = (4 ± 2)/2, or λ = 3 and λ = 1.
What does it mean if the discriminant is exactly zero?
It means the two eigenvalues coincide. A diagonal matrix like [[5,0],[0,5]] has trace 10 and determinant 25, so trace² − 4·determinant = 100 − 100 = 0, and the polynomial λ² − 10λ + 25 factors as (λ − 5)², a single repeated eigenvalue at 5 rather than two distinct ones.
Can the eigenvalues come out as complex numbers?
Yes, whenever trace² is less than 4·determinant. The rotation matrix [[0,1],[−1,0]] has trace 0 and determinant 1, giving λ² + 1 = 0 and roots ±i. That is not an error — a rotation genuinely has no real direction it leaves unchanged, and the imaginary pair is the honest description of that fact.
Do the trace and determinant depend on how the matrix is oriented?
No. Swap rows and columns simultaneously (transpose the matrix) and both trace and determinant stay identical, because a + d and ad − bc do not care which entry is labelled b versus c. That is also why trace and determinant survive a change of basis: they describe the matrix's action, not the coordinates used to write it down.
How is this different from a Cholesky decomposition of the same matrix?
A characteristic polynomial locates the eigenvalues — the scalars a matrix stretches certain vectors by. A Cholesky decomposition instead rewrites a symmetric, positive-definite matrix as L·Lᵀ, a matrix square root. Both operate on 2×2 arrays, but one answers what the special scaling factors are and the other what the square root of the matrix is.