Search for a tool
Matrix Diagonalization

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. This transform was used in linear algebra so that it allow performing simpler calculations.

Results

Matrix Diagonalization -

Tag(s) : Matrix

dCode and you

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day!
You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!

Team dCode likes feedback and relevant comments; to get an answer give an email (not published). It is thanks to you that dCode has the best Matrix Diagonalization tool. Thank you.

Matrix Diagonalization

Echelon Form Matric Reduction

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. This transform was used in linear algebra so that it allow performing simpler calculations.

How to diagonalize a matrix?

A diagonal matrix is a matrix whose elements out of the trace (the main diagonal) are all null (zeros).

A matrix is diagonalizable if there exists an invertable matrix $$P$$ and a diagonal matrix $$D$$ such that $$M = PDP^{-1}$$

To diagonalize a matrix, a method consists in calculating its eigenvectors and its eigenvalues.

Example: The matrix $$M = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}$$ has for eigenvalues $$3$$ and $$-1$$ and eigenvectors respectively $$\begin{pmatrix} 1 \\ 1 \end{pmatrix}$$ and $$\begin{pmatrix} -1 \\ 1 \end{pmatrix}$$

The diagonal matrix $$D$$ is composed of eigenvalues.

Example: $$D = \begin{bmatrix} 3 & 0 \\ 0 & -1 \end{bmatrix}$$

The invertable matrix $$P$$ is composed of the eigenvectors respectively in the same order of the columns.

P must be a normalized matrix

Example: $$P = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}$$ Normalization of P: $$P = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}$$

How to prove that a matrix is not diagonalizable?

A matrix is not diagonalizable if it does not have as many dimensions as distinct eigenvectors.

Example: The matrix of dimension 2: $$M = \begin{bmatrix} 5 & 1 \\ 0 & 5 \end{bmatrix}$$ has a double eigenvalue: $$5$$ and therefore a single eigenvector $$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$$ so it is not diagonalizable.

How to check a diagonalized matrix calculation?

Calculate the inverse of the matrix $$P$$

Check that $$PDP^{-1} = M$$

Source code

dCode retains ownership of the source code of the script Matrix Diagonalization online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, Matlab, etc.) which dCode owns rights will not be given for free. To download the online Matrix Diagonalization script for offline use on PC, iPhone or Android, ask for price quote on contact page !