Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get the diagonalized matrix of a given matrix
ResourceFunction["DiagonalizeMatrix"][mat] returns the diagonalized matrix for the matrix mat. |
Return the diagonalized matrix for a matrix:
In[1]:= |
|
Out[1]= |
|
In[2]:= |
|
Out[2]= |
|
DiagonalizeMatrix works with complex-valued matrices:
In[3]:= |
|
Out[3]= |
|
DiagonalizeMatrix works with matrices containing symbolic elements:
In[4]:= |
|
Out[4]= |
|
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]= |
|
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]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License