DigitHelm

Eigenvalue & Eigenvector Calculator | 2×2 & 3×3

Calculate eigenvalues and eigenvectors for 2×2 and 3×3 matrices. Shows characteristic polynomial, eigenvectors, diagonalization, matrix properties, and step-by-step working.

Presets:
Enter matrix A (2×2):
A = [[a, b], [c, d]] · entries read left-to-right, top-to-bottom

All computations run live in your browser using exact characteristic polynomial formulas. 3×3 eigenvalues use Cardano's method and the trigonometric form for three real roots. No data is sent to any server.

What Is the Eigenvalue & Eigenvector Calculator | 2×2 & 3×3?

An eigenvalue λ of a square matrix A is a scalar for which there exists a nonzero vector v (the eigenvector) satisfying Av = λv. The matrix acts on v by pure scaling, no rotation, which is why eigenvalues reveal the "natural directions" of a linear transformation. Finding them begins by rearranging to (A − λI)v = 0, which has nonzero solutions exactly when det(A − λI) = 0.

Expanding this determinant gives the characteristic polynomial. For a 2×2 matrix it is a quadratic λ² − tr·λ + det = 0, solved by the quadratic formula. The discriminant Δ = tr² − 4·det determines the type: positive for two distinct real eigenvalues, zero for one repeated eigenvalue, negative for a complex conjugate pair.

For a 3×3 matrix, the characteristic polynomial is a cubic λ³ − tr·λ² + (Σ M_ii)·λ − det = 0, where Σ M_ii is the sum of the three 2×2 principal minors. This calculator solves it analytically using Cardano's method, the trigonometric (Viète) form for three real roots, and the standard Cardano form for one real and two complex conjugate roots. Eigenvectors for each real eigenvalue are found by Gaussian elimination on the augmented system (A − λI).

Two key invariant relationships connect eigenvalues to matrix properties: tr(A) = Σ λᵢ (trace equals sum of eigenvalues) and det(A) = Π λᵢ (determinant equals product of eigenvalues). These identities are useful for checking results.

Formula

2×2 Eigenvalue Formula
det(A − λI) = 0 → λ² − tr(A)·λ + det(A) = 0
λ = [tr(A) ± √(tr(A)² − 4·det(A))] / 2
tr(A) = a + d · det(A) = ad − bc
Δ = tr² − 4·det · Δ > 0: two real · Δ = 0: repeated · Δ < 0: complex
Eigenvectors: for each λ, solve (A − λI)v = 0. For 2×2: v = [b, λ−a]ᵀ (normalized)
3×3 Characteristic Polynomial
λ³ − tr(A)·λ² + (Σ M_ii)·λ − det(A) = 0
Σ M_ii = sum of 2×2 principal minors (M₁₁ + M₂₂ + M₃₃)
Solved analytically via Cardano's method / trigonometric form
Eigenvectors: null space of (A − λₖI) via Gaussian elimination
Algebraic check: Σλᵢ = tr(A) · Πλᵢ = det(A) · Σλᵢλⱼ (i≠j) = Σ M_ii
SymbolNameDescription
ASquare matrixThe n×n matrix whose eigenvalues are sought
λEigenvalueScalar satisfying Av = λv for a nonzero vector v
vEigenvectorNonzero vector that only scales (not rotates) under A
IIdentity matrixSquare matrix with 1s on diagonal, 0s elsewhere
tr(A)TraceSum of diagonal entries; equals sum of all eigenvalues
det(A)DeterminantScalar property of A; equals product of all eigenvalues
ΔDiscriminant (2×2)tr² − 4·det; determines whether eigenvalues are real or complex
Σ M_iiSum of principal minorsSum of 2×2 minors formed by deleting row/col i; equals Σᵢ<ⱼ λᵢλⱼ

How to Use

  1. 1
    Choose matrix size: Click "2×2 Matrix" or "3×3 Matrix". The 2×2 mode also shows diagonalization; 3×3 handles all three eigenvalue cases including complex conjugate pairs.
  2. 2
    Load a preset or enter entries: Use a preset (Diagonal, Symmetric, Shear, Rotation, Tridiagonal…) to explore a known case, or type your own entries into the matrix grid. Entries can be integers or decimals.
  3. 3
    Press Calculate or Enter: Click "Calculate Eigenvalues" or press Enter from any input field. The characteristic polynomial appears first, followed by eigenvalues with colour-coded badges.
  4. 4
    Read eigenvalues and eigenvectors: Each eigenvalue λₖ gets its own card with the corresponding unit eigenvector vₖ (shown as a column vector). Complex eigenvalues are noted with no real eigenvector.
  5. 5
    Check properties: Badges indicate whether the matrix is symmetric, diagonal, singular, invertible, or positive definite. The stat row shows trace, determinant, and discriminant for quick verification.
  6. 6
    Inspect diagonalization: For 2×2 matrices with two distinct real eigenvalues, the result shows the diagonalization A = PDP⁻¹ with explicit P and P⁻¹ matrices.
  7. 7
    Show calculation steps: Click the expand arrow to see every intermediate step: characteristic equation setup, polynomial expansion, discriminant computation, and eigenvector derivation.
  8. 8
    Copy or reset: Use "Copy result" to copy eigenvalues and eigenvectors to the clipboard. Press Reset or Esc to clear everything. Your last inputs are restored automatically on the next visit.

Example Calculation

Example 1: 2×2 symmetric matrix, two real eigenvalues

Matrix A = [[4, 2], [2, 1]]. Find eigenvalues and eigenvectors.

Characteristic polynomial: det(A − λI) = (4−λ)(1−λ) − 2×2 = 0 = λ² − 5λ + 4 − 4 = λ² − 5λ = 0 Wait, tr = 5, det = 4−4 = 0. So: λ² − 5λ + 0 = 0 λ(λ − 5) = 0 → λ₁ = 5, λ₂ = 0 Eigenvector v₁ (λ=5): (A−5I)v=0 → [−1,2; 2,−4]v=0 → v₁=[2,1]/√5 ≈ [0.894, 0.447] Eigenvector v₂ (λ=0): Av=0 → v₂=[1,−2]/√5 ≈ [0.447, −0.894] Check: tr = λ₁+λ₂ = 5+0 = 5 ✓ · det = λ₁×λ₂ = 5×0 = 0 ✓

Example 2: 2×2 rotation matrix, complex eigenvalues

A 90° rotation matrix R = [[0, −1], [1, 0]]. tr = 0, det = 1.

Characteristic polynomial: λ² − 0·λ + 1 = 0 → λ² = −1 Δ = 0² − 4×1 = −4 < 0 → complex eigenvalues λ = (0 ± √−4) / 2 = ±i λ₁ = i · λ₂ = −i No real eigenvectors, rotation transforms every real vector In ℂ: eigenvectors are [1, −i] and [1, i] (complex)

Example 3: 3×3 tridiagonal matrix, three real eigenvalues

A = [[2,1,0],[1,2,1],[0,1,2]]. tr = 6, det = 2.

Characteristic polynomial: λ³ − 6λ² + 10λ − 4 = 0 Sum of 2×2 principal minors: M₁₁ = det[[2,1],[1,2]] = 3 M₂₂ = det[[2,0],[0,2]] = 4 M₃₃ = det[[2,1],[1,2]] = 3 → Σ = 10 Roots: λ₁ ≈ 3.4142 (2+√2) · λ₂ = 2 · λ₃ ≈ 0.5858 (2−√2) Check: 3.414+2+0.586 = 6 = tr ✓ · 3.414×2×0.586 ≈ 4 = det ✓

Understanding Eigenvalue & Eigenvector | 2×2 & 3×3

What Are Eigenvalues and Eigenvectors?

When a matrix A multiplies a generic vector, it both rotates and stretches it. But for special vectors, the eigenvectors, A only stretches (or compresses, or reflects): the direction is preserved and only the magnitude changes by a factor λ. This factor is the eigenvalue. Geometrically, eigenvectors point along the invariant axes of the linear transformation represented by A.

The eigenvalue equation Av = λv can be rewritten as (A − λI)v = 0. For a nonzero solution v to exist, the matrix (A − λI) must be singular, its determinant must be zero. Expanding det(A − λI) = 0 produces the characteristic polynomial whose roots are the eigenvalues.

Properties of Eigenvalues

  • Trace identity: The sum of all eigenvalues equals the trace (sum of diagonal entries). For A = [[4,2],[2,1]]: λ₁ + λ₂ = 5 = 4 + 1.
  • Determinant identity: The product of all eigenvalues equals the determinant. A singular matrix (det = 0) always has at least one zero eigenvalue.
  • Symmetric matrices (A = Aᵀ) always have real eigenvalues, even when entries are complex. Their eigenvectors corresponding to distinct eigenvalues are mutually orthogonal, a crucial property exploited in spectral decomposition and PCA.
  • Complex eigenvalues always appear in conjugate pairs (a ± bi) for real matrices. They arise from rotational components in the transformation, rotation matrices in 2D have purely imaginary eigenvalues ±i·sin(θ).
  • Repeated eigenvalues (algebraic multiplicity > 1) may or may not have a full set of eigenvectors. If the geometric multiplicity equals the algebraic multiplicity, the matrix is still diagonalizable; otherwise it is defective (requires a Jordan form).

Diagonalization and A = PDP⁻¹

A matrix A is diagonalizable if it has n linearly independent eigenvectors. The columns of the eigenvector matrix P are those eigenvectors; D is the diagonal matrix of corresponding eigenvalues. Then A = PDP⁻¹, and Aⁿ = PDⁿP⁻¹, computing matrix powers becomes trivial because Dⁿ is just the diagonal of each eigenvalue raised to the nth power.

All real symmetric matrices are diagonalizable (by the spectral theorem), and their diagonalizing matrix P is orthogonal (Pᵀ = P⁻¹). Matrices with all distinct eigenvalues are always diagonalizable. Defective matrices (repeated eigenvalues with insufficient eigenvectors) require Jordan normal form instead.

Applications Across Science and Engineering

  • Principal Component Analysis (PCA): The principal components are eigenvectors of the data covariance matrix; the corresponding eigenvalues give the variance explained by each component. This is the mathematical foundation of dimensionality reduction in machine learning.
  • Structural engineering: Natural frequencies of a vibrating structure are the square roots of eigenvalues of the stiffness-to-mass matrix. Mode shapes are the eigenvectors. Modal analysis prevents resonance in bridges, buildings, and aircraft.
  • Quantum mechanics: Observables are represented as Hermitian operators; possible measurement outcomes are their eigenvalues. The time-independent Schrödinger equation is an eigenvalue problem: Ĥψ = Eψ where E is the energy eigenvalue.
  • Markov chains and Google PageRank: The steady-state distribution of a Markov chain is the eigenvector of the transition matrix corresponding to eigenvalue 1. PageRank finds this eigenvector for the web's link structure.
  • Image compression: Singular Value Decomposition (SVD) generalises the eigendecomposition to rectangular matrices. The singular values (related to eigenvalues of AᵀA) determine how much information each component carries, low-rank approximations discard small singular values.
  • Differential equations: For a system ẋ = Ax, the general solution involves eˡᵗv where λ, v are eigenvalue-eigenvector pairs. Stability depends on the signs of eigenvalue real parts (negative → stable, positive → unstable).

Numerical Methods for Large Matrices

For matrices larger than 3×3, analytical formulas become impractical (no closed-form solution exists for degree ≥ 5 polynomials by the Abel–Ruffini theorem). In practice, iterative numerical algorithms are used: the QR algorithm (standard in LAPACK/NumPy/MATLAB) converges to the Schur form; power iteration finds the dominant eigenvalue; the Lanczos algorithm efficiently finds extreme eigenvalues of large sparse symmetric matrices.

This calculator uses exact algebraic methods (quadratic formula for 2×2; Cardano's cubic formula with the trigonometric form for three real roots for 3×3). Results are accurate to at least 5 significant figures for well-conditioned matrices.

Data and Methods

Eigenvalue computation uses the characteristic polynomial formulas from standard linear algebra texts (Strang, 2016; Horn & Johnson, 2013). The 3×3 cubic solver implements Cardano's method (1545) with the trigonometric (Viète, 1591) substitution for the three-real-roots case, providing superior numerical stability. Eigenvectors are computed by reduced row echelon form (Gauss-Jordan elimination) on (A − λI). All calculations run live in your browser, no data is transmitted to any server.

Frequently Asked Questions

What is an eigenvalue and what does it mean geometrically?

An eigenvalue λ of matrix A is a scalar for which the equation Av = λv has a nonzero solution v (the eigenvector).

Geometrically: when A acts as a linear transformation, most vectors are both rotated and stretched. An eigenvector is special, A only scales it by factor λ without changing its direction. Negative λ reverses direction; |λ| > 1 stretches; |λ| < 1 compresses.

  • λ = 1, the vector is unchanged (fixed point direction)
  • λ = 0, the vector is collapsed to zero (A is singular)
  • λ = −1, the vector is reflected through the origin

How do I find eigenvalues step by step?

For a 2×2 matrix A = [[a,b],[c,d]], the steps are:

  1. Form A − λI = [[a−λ, b], [c, d−λ]]
  2. Set det(A − λI) = (a−λ)(d−λ) − bc = 0
  3. Expand: λ² − (a+d)λ + (ad−bc) = 0
  4. Apply quadratic formula: λ = [(a+d) ± √((a+d)² − 4(ad−bc))] / 2

For each real eigenvalue λ, find its eigenvector by solving (A − λI)v = 0 using row reduction.

What does the discriminant tell me about eigenvalues?

For a 2×2 matrix, the discriminant is Δ = tr(A)² − 4·det(A):

  • Δ > 0, two distinct real eigenvalues. The matrix is diagonalizable over ℝ.
  • Δ = 0, one repeated real eigenvalue. May or may not be diagonalizable depending on whether the eigenspace is 1D or 2D.
  • Δ < 0, complex conjugate pair a ± bi. No real eigenvectors exist. Typically indicates a rotational component.

Symmetric matrices always have Δ ≥ 0 (always real eigenvalues).

Why do rotation matrices have complex eigenvalues?

A rotation by angle θ in 2D is represented by R = [[cos θ, −sin θ], [sin θ, cos θ]].

Its characteristic polynomial is λ² − 2cos(θ)·λ + 1 = 0, giving λ = cos θ ± i·sin θ = e^(±iθ).

This makes intuitive sense: a rotation moves every real vector, no vector merely scales in place. Complex eigenvalues encode the rotation as multiplication by a complex unit: e^(iθ) has |e^(iθ)| = 1 (no scaling) and argument θ (the rotation angle).

What is the relationship between eigenvalues and the determinant / trace?

Two fundamental identities connect matrix properties to eigenvalues:

  • tr(A) = λ₁ + λ₂ + … + λₙ, trace equals the sum of all eigenvalues. This follows from the coefficient of λⁿ⁻¹ in the characteristic polynomial.
  • det(A) = λ₁ × λ₂ × … × λₙ, determinant equals the product. This is the constant term of the characteristic polynomial (evaluated at λ=0).

These identities let you quickly verify eigenvalue calculations: add your eigenvalues, check against the trace; multiply them, check against the determinant.

When is a matrix diagonalizable?

A matrix A is diagonalizable if it has n linearly independent eigenvectors (where n is the matrix size). This is equivalent to: the geometric multiplicity equals the algebraic multiplicity for every eigenvalue.

  • Always diagonalizable: matrices with n distinct eigenvalues; all symmetric (real) matrices.
  • May not be: matrices with repeated eigenvalues (check if eigenspace is large enough).
  • Never diagonalizable over ℝ: matrices with complex eigenvalues (need to work over ℂ).

Non-diagonalizable matrices require the Jordan normal form, which uses generalized eigenvectors.

How are eigenvalues used in PCA (Principal Component Analysis)?

PCA finds the directions of maximum variance in a dataset by computing the eigenvectors of the data's covariance matrix.

  1. Center the data (subtract the mean from each feature).
  2. Compute the covariance matrix C (symmetric, so always real eigenvalues).
  3. Find eigenvalues λ₁ ≥ λ₂ ≥ … and eigenvectors v₁, v₂, … of C.
  4. The eigenvectors are the principal components; λₖ gives the variance along vₖ.
  5. Project data onto the top k eigenvectors to reduce dimensionality while preserving maximum variance.

The fraction of total variance explained by component k is λₖ / Σλᵢ.

Can eigenvalues be negative or zero?

Yes, eigenvalues can be any real or complex number:

  • Positive λ, eigenvector scaled in the same direction. Common in positive-definite matrices (e.g., covariance matrices).
  • Negative λ, eigenvector reversed and scaled. Indicates the transformation reflects that direction.
  • Zero λ, eigenvector is in the null space; A maps it to zero. The matrix is singular (non-invertible). det(A) = 0.
  • Complex λ, appears in conjugate pairs for real matrices. Indicates rotational behavior in the corresponding 2D plane.

For positive-definite matrices (like covariance matrices), all eigenvalues are strictly positive.

Related Calculators