Tool to diagonalize a matrix. The diagonalization of a matrix consists of writing it in a base where its elements outside the diagonal are null.
Matrix Diagonalization - dCode
Tag(s) : Matrix
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
A diagonal matrix is a matrix whose elements out of the trace (the main diagonal) are all null (zeros).
A square matrix M is diagonal if Mi,j=0 for all i≠j.
Example: A diagonal matrix: [100020003]
Diagonalization is a transform used in linear algebra usually to simplify calculations (like powers of matrices).
A matrix is diagonalizable if there exists an invertible matrix P and a diagonal matrix D such that M=PDP−1
To diagonalize a matrix, a diagonalisation method consists in calculating its eigenvectors and its eigenvalues.
Example: The matrix M=[1221] has for eigenvalues 3 and −1 and eigenvectors respectively [11] and [−11]
The diagonal matrix D is composed of eigenvalues.
Example: D=[300−1]
The order of the eigenvalues in D has no intrinsic importance, but it must match the order of the eigenvectors in P.
The invertible matrix P is composed of the eigenvectors respectively in the same order of the columns than its associated eigenvalues.
P must be a normalized matrix.
Example: P=[1−111] Normalization of P: P=1√2[1−111]
A matrix is not diagonalizable if it does not have as many dimensions as distinct eigenvectors.
Example: The matrix of dimension 2: M=[5105] has a double eigenvalue: 5 and therefore a single eigenvector [10] so it is not diagonalizable.
Example: A 3x3 matrix with a triple eigenvalue therefore a single eigenvector is not diagonalizable.
Calculate the inverse of the matrix P
Diagonalization should give PDP−1=M
Orthogonal diagonalization is a specific type of matrix diagonalization applicable to symmetric matrices. It consists of expressing a symmetric matrix M as M=QDQT or the product of an orthogonal matrix Q (so Q.QT=QT.Q=I), a diagonal matrix D, and the transpose of Q, denoted QT.
Orthogonal diagonalization is useful because it preserves the orthogonality of the eigenvectors and can simplify computations involving symmetric matrices.
dCode retains ownership of the "Matrix Diagonalization" source code. Any algorithm for the "Matrix Diagonalization" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Matrix Diagonalization" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Matrix Diagonalization" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Matrix Diagonalization" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Matrix Diagonalization on dCode.fr [online website], retrieved on 2025-04-25,