Tool to invert a matrix. The inverse of a square matrix M is a matrix denoted M^-1 such as que M.M^-1=I where I is the identity matrix.

Inverse 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*!

Tool to invert a matrix. The inverse of a square matrix M is a matrix denoted M^-1 such as que M.M^-1=I where I is the identity matrix.

The **inverse of a matrix** is calculated in several ways, the easiest is the cofactor method which necessitate to calculate the determinant of the matrix but also the comatrix and its transposed matrix :

$$ M^{-1}=\frac1{\det M} \,^{\operatorname t}\!{{\rm com} M} = \frac1{\det M} \,^{\rm t}\!C $$

For a 2x2 matrix:

$$ M^{-1} = \begin{bmatrix} a & b \\ c & d \\ \end{bmatrix}^{-1} = \frac{1}{\det(M)} \begin{bmatrix} d & -b \\ -c & a \\ \end{bmatrix} = \frac{1}{ad - bc} \begin{bmatrix} d & -b \\ -c & a \\ \end{bmatrix} $$

Example: $$ M = \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ \end{bmatrix} \Rightarrow M^{-1} = \frac{1}{\det(M)} \begin{bmatrix} 4 & -2 \\ -3 & 1 \\ \end{bmatrix} = -\frac{1}{2} \begin{bmatrix} 4 & -2 \\ -3 & 1 \\ \end{bmatrix} $$

It is essential that the determinant of the matrix to be inverted is not equal to zero for the matrix to be invertible.

A matrix is invertible if its determinant is non-zero (different from 0).

The multiplication of the matrix by its inverse must give the identity matrix. So the computation of $ M . M^{-1} = I $.

The principle is the same, but instead of calculating the determinant, calculate the modular inverse of the matrix determinant.

dCode retains ownership of the source code of the script Inverse of a Matrix 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 released for free. To download the online Inverse of a Matrix script for offline use on PC, iPhone or Android, ask for price quote on contact page !

inverse,matrix,square,identity,inversion,invertible,nonsingular,nondegenerate

Source : https://www.dcode.fr/matrix-inverse

© 2019 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaches. dCode

Feedback

▲