Function Repository Resource:

# DiagonalizeMatrix

Get the diagonalized matrix of a given matrix

Contributed by: Wolfram|Alpha Math Team
 ResourceFunction["DiagonalizeMatrix"][mat] returns the diagonalized matrix for the matrix mat.

## Examples

### Basic Examples (1)

Return the diagonalized matrix for a matrix:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=

### Scope (2)

DiagonalizeMatrix works with complex-valued matrices:

 In[3]:=
 Out[3]=

DiagonalizeMatrix works with matrices containing symbolic elements:

 In[4]:=
 Out[4]=

### Properties and Relations (2)

When the matrix is diagonalizable, DiagonalizeMatrix returns the diagonal matrix from JordanDecomposition:

 In[5]:=
 Out[5]=

The Eigenvalues of the matrix appear along the diagonal of DiagonalizeMatrix:

 In[6]:=
 Out[6]=

### Possible Issues (2)

The function returns unevaluated when the matrix is not square:

 In[7]:=
 Out[7]=

The function returns unevaluated when the matrix is not diagonalizable:

 In[8]:=
 Out[8]=

For non-diagonalizable square matrices, a form that is "almost" diagonalized exists, having zeros and ones on the superdiagonal and zeros elsewhere than the main diagonal. It can be found using JordanDecomposition:

 In[9]:=
 Out[9]=

## Publisher

Wolfram|Alpha Math Team

## Version History

• 3.0.0 – 23 March 2023
• 2.0.1 – 02 February 2021
• 2.0.0 – 02 October 2020
• 1.0.0 – 24 March 2020