Diagonalize Matrix Calculator

Enter your square matrix (up to 4×4) and the Diagonalize Matrix Calculator determines whether it's diagonalizable. Provide the matrix size and fill in the matrix entries to get back the eigenvalues, eigenvector matrix P, and diagonal matrix D — along with a clear breakdown showing how A = PDP⁻¹.

Select the size of your square matrix.

Results

Diagonalizable?

--

Eigenvalues (λ)

--

Diagonal Matrix D

--

Eigenvector Matrix P

--

Number of Distinct Eigenvalues

--

Eigenvalues

Results Table

Frequently Asked Questions

What does it mean to diagonalize a matrix?

Diagonalizing a matrix A means finding matrices P and D such that A = PDP⁻¹, where D is a diagonal matrix. P is formed from the eigenvectors of A as its columns, and D has the corresponding eigenvalues along its main diagonal. This form makes repeated matrix powers and other operations much simpler to compute.

Not every matrix is diagonalizable — when does diagonalization fail?

A matrix is diagonalizable if and only if it has enough linearly independent eigenvectors to form a complete basis — specifically, the sum of the geometric multiplicities of all eigenvalues must equal n (the matrix size). If a repeated eigenvalue has fewer independent eigenvectors than its algebraic multiplicity, the matrix is called defective and cannot be diagonalized.

How do eigenvalues relate to matrix diagonalization?

Eigenvalues are the values λ satisfying det(A − λI) = 0, known as the characteristic equation. Each eigenvalue has at least one associated eigenvector. In the diagonalized form A = PDP⁻¹, the eigenvalues appear as the diagonal entries of D, making them the 'simplest representation' of how A scales space.

What is the difference between matrix P and matrix D in diagonalization?

Matrix P (the modal matrix) is constructed by placing the eigenvectors of A as its columns in order. Matrix D (the diagonal matrix) contains the corresponding eigenvalues on its main diagonal, in the same order as the eigenvectors in P. Together they satisfy A = PDP⁻¹.

Are symmetric matrices always diagonalizable?

Yes — every real symmetric matrix is diagonalizable (this follows from the Spectral Theorem). Moreover, symmetric matrices can always be orthogonally diagonalized, meaning the matrix P can be chosen to be orthogonal (P⁻¹ = Pᵀ). This is a very useful property in physics and engineering applications.

How do I use this diagonalize matrix calculator?

Select the size of your square matrix (2×2, 3×3, or 4×4), then enter each entry of the matrix in the corresponding fields. The calculator automatically finds the eigenvalues, constructs the eigenvector matrix P and the diagonal matrix D, and tells you whether the matrix is diagonalizable.

What are the practical applications of matrix diagonalization?

Diagonalization is widely used in differential equations, quantum mechanics, computer graphics, principal component analysis (PCA), Markov chains, and structural engineering. Because diagonal matrices are computationally simple, diagonalizing A makes it straightforward to compute Aⁿ, matrix exponentials, and solve linear systems.

Can this calculator handle complex eigenvalues?

This calculator focuses on real eigenvalues arising from real matrices. Matrices with complex eigenvalues (such as rotation matrices) are not diagonalizable over the real numbers but can be diagonalized over the complex numbers. For such cases the calculator will report the matrix as not diagonalizable in the real domain.

More Math Tools