Xerobit

Eigenvalue Calculator for 2x2 and 3x3 Matrices

Enter the entries of a 2x2 or 3x3 matrix to compute its eigenvalues and eigenvectors. This eigenvalue calculator solves the characteristic polynomial and returns real results with their corresponding vectors. All math runs locally in your browser without uploading any data.

Result

  • Characteristic polynomial
    λ² - 4λ + 3 = 0
  • λ₁
    3
  • Eigenvector v₁
    [-1, -1]
  • λ₂
    1
  • Eigenvector v₂
    [-1, 1]

How to use the eigenvalue calculator

  1. Select 2x2 or 3x3 from the matrix size dropdown.
  2. Enter each entry of your matrix into the corresponding fields.
  3. The eigenvalue calculator updates automatically as you type.
  4. Read the characteristic polynomial, eigenvalues, and eigenvectors in the result area.

How eigenvalues are computed

An eigenvalue λ satisfies the equation Av = λv, where A is a square matrix and v is a nonzero vector called an eigenvector. To find λ, we solve the characteristic equation det(A - λI) = 0.

For a 2x2 matrix with entries a, b, c, d, the characteristic polynomial is λ² - (a+d)λ + (ad-bc) = 0. The sum (a+d) is the trace, and (ad-bc) is the determinant. Applying the quadratic formula gives the two eigenvalues.

For example, if the matrix has entries 2, 1, 1, 2, the trace is 4 and the determinant is 3. The polynomial becomes λ² - 4λ + 3 = 0, which factors as (λ-1)(λ-3) = 0. The eigenvalues are 1 and 3.

Finding eigenvectors

Once you have an eigenvalue λ, substitute it back into (A - λI)v = 0 and solve for the vector v. This system always has infinitely many solutions because the matrix (A - λI) is singular by definition.

For the 2x2 example above with λ = 3, the system becomes [-1, 1; 1, -1] times [x, y] equals zero. Both rows give x = y, so one valid eigenvector is [1, 1]. Any scalar multiple of this vector is also an eigenvector for λ = 3.

This eigenvalue calculator normalizes eigenvectors so the largest absolute component is 1, making them easy to read. For repeated eigenvalues, the tool finds linearly independent vectors spanning the eigenspace when possible.

Common 2x2 matrix reference

The table below shows several standard matrices and their eigenvalues. You can use these to verify your own calculations or to understand how matrix structure affects the spectrum.

MatrixEigenvaluesNotes
[1, 0; 0, 1]1, 1Identity matrix
[0, 1; 1, 0]1, -1Swap matrix
[2, 1; 1, 2]3, 1Symmetric
[0, -1; 1, 0]i, -i90 degree rotation (complex)
[a, 0; 0, d]a, dDiagonal entries are eigenvalues

When eigenvalues are complex

If the discriminant of the characteristic polynomial is negative, the eigenvalues are complex conjugates. For a 2x2 real matrix, this happens when the trace squared is less than four times the determinant. Complex eigenvalues indicate rotational behavior in the transformation.

This eigenvalue calculator detects complex roots and reports them clearly instead of returning invalid numbers. For applications requiring only real eigenvalues, ensure your matrix is symmetric, since real symmetric matrices always have real eigenvalues.

For 3x3 matrices, the cubic characteristic polynomial may have one real root and two complex conjugate roots, or three real roots. The tool uses Cardano's method and trigonometric solutions to handle all cases accurately.

Practical applications

Eigenvalues appear throughout science and engineering. In physics, they represent measurable quantities like energy levels in quantum mechanics. In structural engineering, eigenvalues determine natural vibration frequencies of buildings and bridges.

In data science, principal component analysis relies on the eigenvalues of a covariance matrix to identify directions of maximum variance. The largest eigenvalue corresponds to the most important principal component. If you need to solve systems of equations rather than analyze transformations, a linear equation solver may be more appropriate.

For general matrix arithmetic such as multiplication, addition, or inversion, use a dedicated matrix calculator. Understanding eigenvalues complements those operations by revealing the fundamental scaling behavior hidden inside any square matrix.

Worked examples

Each result below was produced by the same code the tool runs, so you can check your own numbers against them.

ExampleInputResult
Symmetric 2x2Matrix size: 2; Row 1, Col 1: 4; Row 1, Col 2: 2; Row 2, Col 1: 2; Row 2, Col 2: 3Characteristic polynomial: λ² - 7λ + 8 = 0; λ₁: 5.56155; Eigenvector v₁: [-1, -0.780776]; λ₂: 1.43845; Eigenvector v₂: [-0.780776, 1]
Identity 2x2Matrix size: 2; Row 1, Col 1: 1; Row 1, Col 2: 0; Row 2, Col 1: 0; Row 2, Col 2: 1Characteristic polynomial: λ² - 2λ + 1 = 0; λ₁: 1; Eigenvector v₁: [1, 0]
Diagonal 3x3Matrix size: 3; Row 1, Col 1: 1; Row 1, Col 2: 0; Row 1, Col 3 (3x3): 0; Row 2, Col 1: 0; Row 2, Col 2: 2; Row 2, Col 3 (3x3): 0; Row 3, Col 1 (3x3): 0; Row 3, Col 2 (3x3): 0; Row 3, Col 3 (3x3): 3Characteristic polynomial: λ³ + 6λ² + 11λ - 6 = 0; λ₁: 1; Eigenvector v₁: [1, 0, 0]; λ₂: 2; Eigenvector v₂: [0, 1, 0]; λ₃: 3; Eigenvector v₃: [0, 0, 1]
General 3x3Matrix size: 3; Row 1, Col 1: 2; Row 1, Col 2: 0; Row 1, Col 3 (3x3): 0; Row 2, Col 1: 0; Row 2, Col 2: 3; Row 2, Col 3 (3x3): 4; Row 3, Col 1 (3x3): 0; Row 3, Col 2 (3x3): 4; Row 3, Col 3 (3x3): -3Characteristic polynomial: λ³ + 2λ² - 25λ + 50 = 0; λ₁: -5; Eigenvector v₁: [0, 0.5, -1]; λ₂: 2; Eigenvector v₂: [1, 0, 0]; λ₃: 5; Eigenvector v₃: [0, 1, 0.5]

FAQ

What is an eigenvalue?

An eigenvalue is a scalar λ such that multiplying a matrix A by a nonzero vector v produces the same result as scaling v by λ. It describes how much the matrix stretches or compresses space along a particular direction.

Can a matrix have negative eigenvalues?

Yes. Negative eigenvalues mean the transformation reverses direction along the corresponding eigenvector. For instance, a reflection matrix has eigenvalues of 1 and -1.

Why does this eigenvalue calculator show complex results?

Real matrices can have complex eigenvalues when the characteristic polynomial has no real roots. This commonly occurs with rotation matrices. The calculator flags these cases explicitly.

What is the difference between algebraic and geometric multiplicity?

Algebraic multiplicity is how many times an eigenvalue appears as a root of the characteristic polynomial. Geometric multiplicity is the number of linearly independent eigenvectors for that eigenvalue. Geometric multiplicity never exceeds algebraic multiplicity.

Does this tool work for 4x4 matrices?

No. This eigenvalue calculator supports 2x2 and 3x3 matrices. Solving quartic polynomials for 4x4 matrices analytically is impractical in a lightweight browser tool, and numerical methods would require a different approach.

Are eigenvectors unique?

No. Any nonzero scalar multiple of an eigenvector is also an eigenvector for the same eigenvalue. This tool normalizes them so the largest component has an absolute value of 1 for readability.