AlgebraFree

Diagonalization Calculator

Use this free diagonalization calculator to decompose a 2x2 matrix into A = PDP inverse. Enter four matrix entries and get the diagonal matrix D, eigenvector matrix P, and verification that the decomposition is valid.

Enter Values

Top-left entry of the matrix

Top-right entry of the matrix

Bottom-left entry of the matrix

Bottom-right entry of the matrix

Result

Enter values above and click Calculate to see your result.

AI Assistant

Ask about this calculator

I can help you understand the diagonalization calculator formula, interpret your results, and answer follow-up questions.

Try asking

Formula

A = P D P inverse, where D has eigenvalues on diagonal

Find the eigenvalues (diagonal entries of D) and eigenvectors (columns of P). If the matrix has two linearly independent eigenvectors, the diagonalization exists and A = PDP inverse holds exactly.

Worked Example

A = [[4, 1], [2, 3]] Step 1: Eigenvalues: lambda1 = 5, lambda2 = 2 Step 2: Eigenvector for lambda = 5: v1 = [1, 1] Step 3: Eigenvector for lambda = 2: v2 = [1, -2] Step 4: P = [[1, 1], [1, -2]], D = [[5, 0], [0, 2]] Step 5: Verify: PDP inverse = A (confirmed) Result: A = PDP inverse with D = diag(5, 2).

What Is Matrix Diagonalization?

Diagonalization is the process of expressing a matrix A as the product PDP inverse, where D is a diagonal matrix containing the eigenvalues and P is a matrix whose columns are the corresponding eigenvectors. This decomposition is one of the most powerful tools in linear algebra because diagonal matrices are trivially easy to work with.
  • Computing A to the power of n becomes trivial: A^n = P D^n P inverse, and raising a diagonal matrix to a power just raises each diagonal entry
  • Matrix exponentials (e^A) used in differential equations reduce to exponentiating each eigenvalue
  • Not every matrix can be diagonalized. The matrix must have enough linearly independent eigenvectors
  • Symmetric matrices are always diagonalizable with orthogonal eigenvectors (spectral theorem)
  • Diagonalization is the foundation for spectral decomposition, PCA, and many numerical algorithms

For 2x2 matrices, diagonalization is always possible when the two eigenvalues are distinct real numbers. This calculator handles the complete process: finding eigenvalues, computing eigenvectors, constructing P and D, and verifying the decomposition.

You can also calculate changes using our Eigenvalue Calculator, Eigenvector Calculator, Eigenbasis Calculator or Characteristic Polynomial Calculator.

Frequently Asked Questions

What is A = PDP inverse in simple terms?

P converts coordinates from the standard basis to the eigenvector basis. D applies simple scaling along each eigenvector direction. P inverse converts back. Together they reproduce the same transformation as A but through a much simpler path.

Why is diagonalization useful?

Because diagonal matrices are trivial to compute with. Need A to the 100th power? Instead of 100 matrix multiplications, compute P diag(lambda1^100, lambda2^100) P inverse, which is just one multiplication. This extends to matrix exponentials, differential equations, and Markov chains.

Can every 2x2 matrix be diagonalized?

No. A 2x2 matrix cannot be diagonalized if it has a repeated eigenvalue with only a 1-dimensional eigenspace (like [[2, 1], [0, 2]]), or if it has complex eigenvalues and you need real diagonalization.

What does the D matrix contain?

D is a diagonal matrix with the eigenvalues on the diagonal. The order of eigenvalues in D must match the order of the corresponding eigenvectors as columns of P.

How do I verify the diagonalization is correct?

Compute the product PDP inverse and check that it equals the original matrix A. You can also verify by checking that each column of P is an eigenvector: A times column i of P should equal lambda i times column i of P.

What is the connection between diagonalization and systems of differential equations?

A system dx/dt = Ax can be decoupled by diagonalization. In the eigenvector basis, the system becomes dy/dt = Dy, which is just independent exponential equations. The solution is y(t) = e^(Dt) y(0), then convert back with x = Py.

Accurate and Reliable

All calculations run locally. Solve equations with confidence using AI-verified methods.

Precise Algebraic Calculations Powered by Calculory AI