Diagonalisation calculator

Diagonalising a matrix means finding a basis in which the matrix acts as pure scaling along independent directions, so its action collapses to a list of numbers on the diagonal. Those numbers are the eigenvalues, and the directions are the eigenvectors. Diagonalisation makes matrix powers, exponentials and dynamical systems easy to analyze, which is why it is central to physics, statistics and engineering. This calculator finds the eigenvalues of a two by two matrix, the diagonal entries of its diagonal form. You enter the four matrix entries, and it computes the trace (the sum of the diagonal), the determinant, and then the two eigenvalues from the characteristic equation, lambda squared minus trace times lambda plus determinant equals zero. The eigenvalues are the trace plus or minus the square root of the trace squared minus four times the determinant, all divided by two. When that discriminant is positive the eigenvalues are real and distinct; when it is negative they are a complex conjugate pair. Enter your own matrix to analyze a linear map, a Markov chain or a system of differential equations. Every figure here is computed deterministically from the characteristic equation, shown below with a worked example that reconciles exactly to the calculator.

The eigenvalues solve lambda squared minus (trace) lambda plus (determinant) = 0, giving lambda = (trace plus or minus sqrt(trace squared minus 4 det)) / 2. For the matrix [[2, 1], [1, 2]] the trace is 4, the determinant is 3, and the eigenvalues are 3 and 1.

Source: US National Institute of Standards and Technology (NIST). As at 25 June 2026.

Trace--
Determinant--
Eigenvalues--

Eigenvalues from the characteristic equation

matrix M = [[a, b], [c, d]]
trace T = a + d, determinant D = a d - b c
characteristic equation: lambda^2 - T lambda + D = 0
lambda = ( T +/- sqrt( T^2 - 4 D ) ) / 2
real and distinct when T^2 - 4D > 0

The characteristic equation comes from setting the determinant of M minus lambda times the identity to zero. Solving the resulting quadratic gives the two eigenvalues, the diagonal entries of the diagonalised matrix. The sign of the discriminant tells you whether they are real or a complex pair.

Worked example

Diagonalise the symmetric matrix [[2, 1], [1, 2]].

  1. Trace T = 2 + 2 = 4
  2. Determinant D = (2)(2) - (1)(1) = 4 - 1 = 3
  3. Discriminant = T^2 - 4D = 16 - 12 = 4, square root = 2
  4. lambda = (4 + 2) / 2 = 3 and lambda = (4 - 2) / 2 = 1
  5. The eigenvalues are 3 and 1, the diagonal of the diagonalised matrix

The eigenvalues are 3 and 1. These are the calculator's default inputs, so the results above match the widget exactly.

Diagonalisation calculator: frequently asked questions

What does it mean to diagonalise a matrix?

Diagonalising a matrix means rewriting it, in a suitable basis of eigenvectors, as a diagonal matrix whose entries are the eigenvalues. In that basis the matrix simply scales each eigenvector, which makes powers, exponentials and long-term behavior easy to compute.

What are eigenvalues?

An eigenvalue is a number lambda for which there is a nonzero vector that the matrix merely scales by lambda, without changing its direction. That vector is an eigenvector. The eigenvalues are the diagonal entries of the diagonalised form and are found from the characteristic equation.

How are the eigenvalues of a 2x2 matrix found?

For a two by two matrix you compute the trace, the sum of the diagonal, and the determinant. The eigenvalues are the trace plus or minus the square root of the trace squared minus four times the determinant, divided by two. This is just the quadratic formula applied to the characteristic equation.

When is a matrix diagonalisable?

A two by two matrix is diagonalisable over the real numbers when it has two linearly independent eigenvectors, which happens when the discriminant is positive (two distinct real eigenvalues) or when it is a scalar multiple of the identity. A negative discriminant gives complex eigenvalues, diagonalisable only over the complex numbers.

What if the discriminant is negative?

A negative discriminant means the eigenvalues are a complex conjugate pair, so the matrix represents a rotation-like map with no real eigenvectors. The calculator reports the complex eigenvalues in that case. The arithmetic is deterministic and reconciles exactly to the worked example for real cases.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.