DiagonalizableMatrixQ
✖
DiagonalizableMatrixQ
Details and Options

- A matrix m is diagonalizable if it is similar to a diagonal matrix. That is, if there is a nonsingular matrix
such that
is diagonal.
- DiagonalizableMatrixQ works for symbolic as well as numerical matrices.
- For approximate matrices, the option Tolerance->t can be used to indicate that the determinant of eigenvectors v of the matrix m satisfying Abs[Det[v]]≤t is taken to be zero, which means that the eigenvectors v are linearly dependent and the matrix m is not diagonalizable.
- The option Tolerance has Automatic as its default value.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Test if a 2×2 numeric matrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-nkqygb

Test if a 3×3 symbolic matrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-wkn8su

https://wolfram.com/xid/0cf2p3lndza022b-ee7ewa

Put the eigenvectors of the matrix in columns:

https://wolfram.com/xid/0cf2p3lndza022b-m4gz6m
Verify the matrix is similar to diagonal matrix:

https://wolfram.com/xid/0cf2p3lndza022b-kaj1j5

Scope (9)Survey of the scope of standard use cases
Basic Uses (5)
Test if a real machine-precision matrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-c1lz7v

https://wolfram.com/xid/0cf2p3lndza022b-u5nvc8


https://wolfram.com/xid/0cf2p3lndza022b-kqdx37


https://wolfram.com/xid/0cf2p3lndza022b-f49y5m

The diagonal elements of the obtained matrix are the eigenvalues of :

https://wolfram.com/xid/0cf2p3lndza022b-cy1pjs

Test if a complex matrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-vd1q50

https://wolfram.com/xid/0cf2p3lndza022b-evd1wm

Test if an exact matrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-fhbhm1

https://wolfram.com/xid/0cf2p3lndza022b-8e6vmf

Make the matrix diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-cnbo4m

Use DiagonalizableMatrixQ with an arbitrary-precision matrix:

https://wolfram.com/xid/0cf2p3lndza022b-h89ze5

A random square matrix is typically diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-e792ql

Use DiagonalizableMatrixQ with a symbolic matrix:

https://wolfram.com/xid/0cf2p3lndza022b-p54id

Specia; Matrices (4)
Use DiagonalizableMatrixQ with sparse matrices:

https://wolfram.com/xid/0cf2p3lndza022b-kfksuk


https://wolfram.com/xid/0cf2p3lndza022b-qvlhy


https://wolfram.com/xid/0cf2p3lndza022b-tr53kr


https://wolfram.com/xid/0cf2p3lndza022b-hmu0fe

Use DiagonalizableMatrixQ with structured matrices:

https://wolfram.com/xid/0cf2p3lndza022b-fyaetx


https://wolfram.com/xid/0cf2p3lndza022b-c0k3bb

Use with a QuantityArray structured matrix:

https://wolfram.com/xid/0cf2p3lndza022b-so3bn


https://wolfram.com/xid/0cf2p3lndza022b-d4v8l

The identity matrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-kkhgb9

HilbertMatrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-ou7ra

Options (1)Common values & functionality for each option
Tolerance (1)
Generate a real-valued non-diagonalizable Jordan block matrix with some random perturbation of order :

https://wolfram.com/xid/0cf2p3lndza022b-35lu76

https://wolfram.com/xid/0cf2p3lndza022b-mrsvrl


https://wolfram.com/xid/0cf2p3lndza022b-u3ld0

But the eigenvectors v are numerically linearly dependent:

https://wolfram.com/xid/0cf2p3lndza022b-ih4l58

Adjust the option Tolerance so that the linear dependence of the eigenvectors is detected:

https://wolfram.com/xid/0cf2p3lndza022b-cbjh4n

Applications (6)Sample problems that can be solved with this function
If a matrix is diagonalizable, it can be decomposed as
, where
is nonsingular and
is diagonal. This can be used to compute a matrix function by using its power series representation
as
, and
can be computed by simply applying
to each of the diagonal elements. Use this method to compute several different matrix functions:

https://wolfram.com/xid/0cf2p3lndza022b-d5n0n8


https://wolfram.com/xid/0cf2p3lndza022b-ftsy0t

The matrix has the eigenvectors as columns, and the diagonal entries are the eigenvalues:

https://wolfram.com/xid/0cf2p3lndza022b-xzyi1z
Compute and confirm using MatrixPower:

https://wolfram.com/xid/0cf2p3lndza022b-x7kijh


https://wolfram.com/xid/0cf2p3lndza022b-yhg7z1

Compute and confirm using MatrixExp:

https://wolfram.com/xid/0cf2p3lndza022b-84eey2


https://wolfram.com/xid/0cf2p3lndza022b-yvqjhd

Compute and confirm using MatrixLog:

https://wolfram.com/xid/0cf2p3lndza022b-q43o91


https://wolfram.com/xid/0cf2p3lndza022b-zvg5h0

Compute and confirm using MatrixFunction:

https://wolfram.com/xid/0cf2p3lndza022b-31gq74


https://wolfram.com/xid/0cf2p3lndza022b-nebx7w

Solve the system of ODEs ,
,
. First, construct the coefficient matrix
for the right-hand side:

https://wolfram.com/xid/0cf2p3lndza022b-pg4cx5
The coefficient matrix is diagonalizable, so computing the matrix exponential will be straightforward:

https://wolfram.com/xid/0cf2p3lndza022b-o0s6i2

Find the eigenvalues and eigenvectors:

https://wolfram.com/xid/0cf2p3lndza022b-8onntg

Construct a diagonal matrix whose entries are the exponential of :

https://wolfram.com/xid/0cf2p3lndza022b-r7vslf

Construct the matrix whose columns are the corresponding eigenvectors:

https://wolfram.com/xid/0cf2p3lndza022b-q8i130

The general solution is , for three arbitrary starting values:

https://wolfram.com/xid/0cf2p3lndza022b-gwkeld

Verify the solution using DSolveValue:

https://wolfram.com/xid/0cf2p3lndza022b-gwqjda

Use the fact that the recurrence relation for Fibonacci, , can be written in matrix form as
to derive a formula for the pair
. The solution to the recurrence relation is
, where
:

https://wolfram.com/xid/0cf2p3lndza022b-80oma5

https://wolfram.com/xid/0cf2p3lndza022b-kc6p19

https://wolfram.com/xid/0cf2p3lndza022b-k8lcfp

Thus, the matrix power can be computed simply using Eigensystem[m]:

https://wolfram.com/xid/0cf2p3lndza022b-fkjqnf


https://wolfram.com/xid/0cf2p3lndza022b-ui7kps

https://wolfram.com/xid/0cf2p3lndza022b-5h3tan

Confirm the result using Fibonacci:

https://wolfram.com/xid/0cf2p3lndza022b-sjkem9

Normal matrices are the most general kind of matrix that can be unitarily diagonalized as with
diagonal and
unitary. All Hermitian matrices
are normal because both sides of the equality are simply
:

https://wolfram.com/xid/0cf2p3lndza022b-wvly1p

Similarly, all antihermitian matrices are normal because both sides of the equality are simply :

https://wolfram.com/xid/0cf2p3lndza022b-oe88iq

Unitary matrices are normal, as substituting in the definition gives an identity matrix on both sides:

https://wolfram.com/xid/0cf2p3lndza022b-4ktv4w

Show that the following matrix is normal, then diagonalize it:

https://wolfram.com/xid/0cf2p3lndza022b-1z1cmi


https://wolfram.com/xid/0cf2p3lndza022b-djw0no

Confirm using NormalMatrixQ:

https://wolfram.com/xid/0cf2p3lndza022b-bwszq4

A normal matrix like can be unitarily diagonalized using Eigensystem:

https://wolfram.com/xid/0cf2p3lndza022b-4dicrg

The entries on the diagonal can be arbitrary complex numbers:

https://wolfram.com/xid/0cf2p3lndza022b-9o36nv

Normalizing the eigenvectors and putting them in columns gives a unitary matrix:

https://wolfram.com/xid/0cf2p3lndza022b-3e7oay


https://wolfram.com/xid/0cf2p3lndza022b-yo7dmh

Skipping normalization of the eigenvectors suffices to show that is diagonalizable (though not unitarily):

https://wolfram.com/xid/0cf2p3lndza022b-nsvw2

In quantum mechanics, the energy operator is called the Hamiltonian , and a state with energy
evolves according to the Schrödinger equation
. An important assumption is that any state can be written as a sum of eigenstates. Show that this is the case for Hamiltonian for a spin-1 particle in constant magnetic field in the
direction:

https://wolfram.com/xid/0cf2p3lndza022b-f62azb
The matrix is diagonalizable, so its eigenvectors must form a basis for :

https://wolfram.com/xid/0cf2p3lndza022b-x5kch3

Computing the eigensystem, the energy levels are and
:

https://wolfram.com/xid/0cf2p3lndza022b-u0xcpc

Confirm that the eigenvectors are linearly independent and thus a basis:

https://wolfram.com/xid/0cf2p3lndza022b-gediyq


https://wolfram.com/xid/0cf2p3lndza022b-4e2p0g

Decompose an arbitrary state as a sum of the eigenvectors:

https://wolfram.com/xid/0cf2p3lndza022b-s05med

Many matrix distributions produce matrices that are guaranteed to be diagonalizable, including CircularRealMatrixDistribution:

https://wolfram.com/xid/0cf2p3lndza022b-ewows3

CircularSymplecticMatrixDistribution:

https://wolfram.com/xid/0cf2p3lndza022b-i1asia

GaussianOrthogonalMatrixDistribution:

https://wolfram.com/xid/0cf2p3lndza022b-b8i9rt

GaussianUnitaryMatrixDistribution :

https://wolfram.com/xid/0cf2p3lndza022b-jvzey

Properties & Relations (9)Properties of the function, and connections to other functions
A diagonalizable matrix can be factored as
with
diagonal using Eigensystem:

https://wolfram.com/xid/0cf2p3lndza022b-hg1ro6

Put the eigenvectors in columns and the eigenvalues on the diagonal of a matrix:

https://wolfram.com/xid/0cf2p3lndza022b-ml9bc5

https://wolfram.com/xid/0cf2p3lndza022b-8958b7

A matrix is diagonalizable if and only if it has a complete set of eigenvectors:

https://wolfram.com/xid/0cf2p3lndza022b-328dq9

Although it has repeated eigenvalues, has three linearly independent eigenvectors:

https://wolfram.com/xid/0cf2p3lndza022b-hzoj4g

Despite having the same eigenvalues as , the matrix
is not diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-dlij97

It only has two independent eigenvectors, as indicated by the zero vector returned by Eigensystem:

https://wolfram.com/xid/0cf2p3lndza022b-oneiyo

Any matrix with no repeated eigenvalues is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-7lhj4o


https://wolfram.com/xid/0cf2p3lndza022b-n5ie1f

Any real symmetric matrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-hom9r0


https://wolfram.com/xid/0cf2p3lndza022b-lo5jms


https://wolfram.com/xid/0cf2p3lndza022b-vpn89l


https://wolfram.com/xid/0cf2p3lndza022b-6i4xco

Any real antisymmetric matrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-bxrqni


https://wolfram.com/xid/0cf2p3lndza022b-z5yr7x

As is any antihermitian matrix:

https://wolfram.com/xid/0cf2p3lndza022b-lrvxnn


https://wolfram.com/xid/0cf2p3lndza022b-4tfe0d

Any real orthogonal matrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-ywyn0g

https://wolfram.com/xid/0cf2p3lndza022b-mu30r9


https://wolfram.com/xid/0cf2p3lndza022b-jrlqtr

https://wolfram.com/xid/0cf2p3lndza022b-dsvtg0

Any normal matrix is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-huf6ei

A matrix m is diagonalizable if and only if the matrix of JordanDecomposition[m] is diagonal:

https://wolfram.com/xid/0cf2p3lndza022b-oomz2w

https://wolfram.com/xid/0cf2p3lndza022b-7x0kx


https://wolfram.com/xid/0cf2p3lndza022b-tijdy5

https://wolfram.com/xid/0cf2p3lndza022b-8ytbt9

An ×
matrix
is nilpotent if
for some
:

https://wolfram.com/xid/0cf2p3lndza022b-426mfe

Consider a non-diagonalizable matrix :

https://wolfram.com/xid/0cf2p3lndza022b-f3769f

Use JordanDecomposition to write as
with
diagonalizable and
nilpotent:

https://wolfram.com/xid/0cf2p3lndza022b-2osqqk

Confirm that is diagonalizable:

https://wolfram.com/xid/0cf2p3lndza022b-d2zh93


https://wolfram.com/xid/0cf2p3lndza022b-uiw2r4


https://wolfram.com/xid/0cf2p3lndza022b-33kx85

Wolfram Research (2014), DiagonalizableMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/DiagonalizableMatrixQ.html.
Text
Wolfram Research (2014), DiagonalizableMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/DiagonalizableMatrixQ.html.
Wolfram Research (2014), DiagonalizableMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/DiagonalizableMatrixQ.html.
CMS
Wolfram Language. 2014. "DiagonalizableMatrixQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DiagonalizableMatrixQ.html.
Wolfram Language. 2014. "DiagonalizableMatrixQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DiagonalizableMatrixQ.html.
APA
Wolfram Language. (2014). DiagonalizableMatrixQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiagonalizableMatrixQ.html
Wolfram Language. (2014). DiagonalizableMatrixQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiagonalizableMatrixQ.html
BibTeX
@misc{reference.wolfram_2025_diagonalizablematrixq, author="Wolfram Research", title="{DiagonalizableMatrixQ}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/DiagonalizableMatrixQ.html}", note=[Accessed: 10-July-2025
]}
BibLaTeX
@online{reference.wolfram_2025_diagonalizablematrixq, organization={Wolfram Research}, title={DiagonalizableMatrixQ}, year={2014}, url={https://reference.wolfram.com/language/ref/DiagonalizableMatrixQ.html}, note=[Accessed: 10-July-2025
]}