Mathematics · Algebra & Calculus · Linear Algebra
Eigenvalue Calculator
Computes the eigenvalues and eigenvectors of a 2×2 or 3×3 square matrix using the characteristic polynomial det(A − λI) = 0.
Calculator
Formula
For a 2×2 matrix A, subtract λ times the identity matrix I from A, then set the determinant of the result to zero. This yields the characteristic polynomial: λ² − tr(A)·λ + det(A) = 0, where tr(A) = a + d is the trace (sum of diagonal elements) and det(A) = ad − bc is the determinant. Solving this quadratic equation gives two eigenvalues λ₁ and λ₂. Each eigenvalue λ satisfies Av = λv for some non-zero vector v, called the eigenvector.
Source: Strang, G. (2016). Introduction to Linear Algebra, 5th Edition. Wellesley-Cambridge Press. Chapter 6.
How it works
An eigenvalue λ of a square matrix A is a scalar such that there exists a non-zero vector v (called an eigenvector) satisfying the equation Av = λv. In geometric terms, the matrix A stretches or compresses the eigenvector v by a factor of λ without changing its direction. Every n×n matrix has exactly n eigenvalues (counting multiplicity) in the complex numbers, though real matrices may have complex conjugate eigenvalue pairs.
To find the eigenvalues of a 2×2 matrix A = [[a, b], [c, d]], we form the characteristic polynomial by computing det(A − λI) = 0. Expanding this determinant yields the quadratic equation λ² − tr(A)·λ + det(A) = 0, where tr(A) = a + d is the trace (sum of diagonal entries) and det(A) = ad − bc is the determinant. Applying the quadratic formula gives λ = [tr(A) ± √(tr(A)² − 4·det(A))] / 2. The quantity Δ = tr(A)² − 4·det(A) is the discriminant: if Δ > 0 the matrix has two distinct real eigenvalues, if Δ = 0 it has a repeated real eigenvalue, and if Δ < 0 the eigenvalues are complex conjugates.
Eigenvalues have wide-ranging practical applications. In structural engineering, they determine the natural frequencies at which a structure resonates. In quantum mechanics, eigenvalues of the Hamiltonian operator correspond to measurable energy levels. In machine learning, principal component analysis (PCA) uses eigenvalues of the covariance matrix to identify the directions of greatest variance in data. In control theory, the eigenvalues of a system matrix determine whether a dynamic system is stable: a system is stable if and only if all eigenvalues have negative real parts.
Worked example
Consider the matrix A = [[4, 1], [2, 3]]. Follow these steps to find the eigenvalues:
Step 1 — Compute the trace: tr(A) = 4 + 3 = 7.
Step 2 — Compute the determinant: det(A) = (4)(3) − (1)(2) = 12 − 2 = 10.
Step 3 — Write the characteristic polynomial: λ² − 7λ + 10 = 0.
Step 4 — Compute the discriminant: Δ = 7² − 4(10) = 49 − 40 = 9. Since Δ > 0, there are two distinct real eigenvalues.
Step 5 — Apply the quadratic formula: λ = (7 ± √9) / 2 = (7 ± 3) / 2.
Result: λ₁ = (7 + 3) / 2 = 5 and λ₂ = (7 − 3) / 2 = 2.
Verification: Note that λ₁ + λ₂ = 5 + 2 = 7 = tr(A) ✓ and λ₁ × λ₂ = 5 × 2 = 10 = det(A) ✓. These identities always hold and provide a quick sanity check. The eigenvector for λ₁ = 5 is found by solving (A − 5I)v = 0: [[-1, 1], [2, -2]]v = 0, giving v₁ = [1, 1]. For λ₂ = 2: [[2, 1], [2, 1]]v = 0, giving v₂ = [1, -2].
Limitations & notes
This calculator is designed for 2×2 real matrices only. For 3×3 matrices, the characteristic polynomial is a cubic requiring different solution methods (such as Cardano's formula or numerical iteration), and for larger matrices purely analytical solutions become impractical — numerical methods such as the QR algorithm are used instead. When the discriminant Δ is negative, the eigenvalues are complex conjugates of the form α ± βi; this calculator displays only the real part in that case and does not output the imaginary component separately — users with complex eigenvalue needs should consult dedicated numerical software such as MATLAB, NumPy, or Wolfram Alpha. Floating-point rounding may introduce small errors for matrices with very large or very small entries; for precision-critical applications, symbolic computation tools are recommended. Additionally, this calculator does not handle degenerate cases such as the zero matrix or scalar multiples of the identity matrix in a specialised way — results are still mathematically valid but eigenvectors are not unique in those cases.
Frequently asked questions
What does an eigenvalue physically represent?
An eigenvalue represents the scaling factor by which a matrix stretches or compresses its corresponding eigenvector. If λ = 3, the matrix triples the length of that eigenvector; if λ = −1, it reverses its direction. In applications like PCA, eigenvalues measure the amount of variance explained along each principal component direction.
How do I find eigenvectors once I have the eigenvalues?
For each eigenvalue λ, substitute it back into (A − λI)v = 0 and solve the resulting homogeneous linear system. For a 2×2 matrix this reduces to a single linear equation relating the two components of v. For example, if λ = 5 and A = [[4,1],[2,3]], you solve [[-1,1],[2,-2]]v = 0, which gives v = t[1, 1] for any non-zero scalar t.
What happens when the discriminant is negative?
A negative discriminant Δ = tr(A)² − 4·det(A) < 0 means the 2×2 real matrix has two complex conjugate eigenvalues of the form α ± βi, where α = tr(A)/2 and β = √(−Δ)/2. This occurs, for example, in rotation matrices. The matrix is still fully valid; its eigenvalues simply lie in the complex plane rather than on the real number line.
Is the sum of eigenvalues always equal to the trace?
Yes. For any square matrix, the sum of all eigenvalues (counting multiplicity) equals the trace of the matrix, and the product of all eigenvalues equals the determinant. These are consequences of Vieta's formulas applied to the characteristic polynomial. For a 2×2 matrix: λ₁ + λ₂ = tr(A) and λ₁ × λ₂ = det(A). This provides a useful verification check after computing eigenvalues.
Why are eigenvalues important in stability analysis?
In the study of linear dynamical systems dx/dt = Ax, the long-term behaviour is entirely determined by the eigenvalues of A. If all eigenvalues have negative real parts, all trajectories decay to zero and the system is asymptotically stable. If any eigenvalue has a positive real part, the system is unstable and trajectories grow without bound. This principle underpins control system design, structural dynamics, and population modelling.
Last updated: 2025-01-15 · Formula verified against primary sources.