Tool to calculate the characteristic polynomial of a matrix. The characteristic polynomial of a matrix M is computed as the determinant of (X.I-M).

Characteristic Polynomial of a Matrix - 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*!

The **characteristic polynomial** (or sometimes secular function) $ P $ of a square matrix $ M $ of size $ n \times n $ is the polynomial defined by $$ P(M) = \det(x.I_n - M) \tag{1} $$ or $$ P(M) = \det(x.I_n - M) \tag{2} $$ with $ I_n $ the identity matrix of size $ n $ (and det the matrix determinant).

The 2 possible values $ (1) $ and $ (2) $ give opposite results, but since the polynomial is used to find roots, the sign does not matter.

The equation $ P = 0 $ is called the *characteristic equation* of the matrix.

The **characteristic polynomial** $ P $ of a matrix, as its name indicates, characterizes a matrix, it allows in particular to calculate the eigenvalues and the eigenvectors.

If $ M $ is a diagonal matrix with $ \lambda_1, \lambda_2, \ldots, \lambda_n $ as diagonal elements, then the computation is simplified and $$ P(M) = (x-\lambda_1)(x-\lambda_2)\ldots(x-\lambda_n) $$

If $ M $ is a triangular matrix with $ \lambda_1, \lambda_2, \ldots, \lambda_n $ as diagonal elements, then as for diagonal matrix, the computation is simplified and $$ P(M) = (x-\lambda_1)(x-\lambda_2)\ldots(x-\lambda_n) $$

The calculation of the **characteristic polynomial** of a square matrix of order 2 can be calculated with the determinant of the matrix $ [ x.I_2 - M ] $ as $$ P(M) = \det [ x.I_2 - M ] $$

The polynomial can also be written with another formula using the trace of the matrix $ M $ (noted Tr): $$ P(M) = \det( x.I_2 - M ) = x^2 - \operatorname{Tr}(M)x+ \det(M) $$

__Example:__ $$ M=\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \\ \Rightarrow x.I_n - M = \begin{pmatrix} x & 0 \\ 0 & x \end{pmatrix} - \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} = \begin{pmatrix} x-1 & -2 \\ -3 & x-4 \end{pmatrix} \\ \Rightarrow \det(x.I_n - M) = (x-1)(x-4)-((-2)\times(-3)) = x^2-5x-2 $$

Calculation of the **characteristic polynomial** of a square 3x3 matrix can be calculated with the determinant of the matrix $ [ x.I_3 - M ] $ as $$ P(M) = \det [ x.I_3 - M ] $$

__Example:__ $$ M = \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix} $$ $$ [ x.I_3 - M ] = x \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} - M = \begin{pmatrix} x-a & -b & -c \\ -d & x-e & -f \\ -g & -h & x-i \end{pmatrix} $$ $$ P(M) = \det [ x.I_3 - M ] = -a e i+a e x+a f h+a i x-a x^2+b d i-b d x-b f g-c d h+c e g-c g x+e i x-e x^2-f h x-i x^2+x^3 $$

It is also possible to use another formula with the Trace of the matrix $ M $ (noted Tr): $$ P(M) = x^3 + \operatorname{Tr}(M)x^2 + ( \operatorname{Tr}^2(M) - \operatorname{Tr}(M^2) ) x + ( \operatorname{Tr}^3(M) + 2\operatorname{Tr}(M^3) - 3 \operatorname{Tr}(M) \operatorname{Tr}(M^2) ) $$

The **characteristic polynomial** is unique for a given matrix. There is only one way to calculate it and it has only one result.

On the other hand, two different matrices can give the same **characteristic polynomial**.

A matrix $ M $ and its matrix transpose $ M^T $ have the same **characteristic polynomial**.

dCode retains ownership of the online 'Characteristic Polynomial of a Matrix' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'Characteristic Polynomial of a Matrix' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'Characteristic Polynomial of a Matrix' function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for 'Characteristic Polynomial of a Matrix' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.

Please, check our dCode Discord community for help requests!

NB: for encrypted messages, test our automatic cipher identifier!

- Characteristic Polynomial Calculator
- What is the characteristic polynomial for a matrix? (Definition)
- Why calculating the characteristic polynomial of a matrix?
- How to calculate the characteristic polynomial of a diagonal matrix?
- How to calculate the characteristic polynomial of a triangualr matrix?
- How to calculate the characteristic polynomial for a 2x2 matrix?
- How to calculate the characteristic polynomial for a 3x3 matrix?
- Is there multiple characteristic polynomial for a matrix?
- How to calculate the characteristic polynomial for a transpose matrix?

characteristic,polynomial,matrix,eigenvalue,eigenvector,determinant

Source : https://www.dcode.fr/matrix-characteristic-polynomial

© 2021 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback

▲
Thanks to your feedback and relevant comments, dCode has developed the best 'Characteristic Polynomial of a Matrix' tool, so feel free to write! Thank you!