What is 1 2 1 3x3

Calculate the inverse matrix

Two matrices, the product of which is the identity matrix when the matrix is ​​multiplied, are inverse to one another. In some situations one looks for the inverse of a given matrix. On this page a simple and quick procedure is shown how the inverse matrix can be found and also used in the computer.

On the left, enter the numbers of a square matrix to be inverted. Decimal fractions or fractions (notation) can also be entered. The numbers are separated by spaces, line breaks are not necessary. The output is by default in fully abbreviated fractions.
Complex-valued matrices can also be dealt with: Enter the numbers in this form: (always without Spaces).

Notes on the calculation modes:

In fractions mode, the program actually calculates with fractions for purely real-valued matrices, so that the result matrix is ​​usually completely exact; unless there are integers in numerators or denominators that are too large, which can cause rounding errors. (The accuracy of Javascript is approx. 15 decimal places. Numbers of this size are easily reached with excessive fractions. If twelve- or more-digit numbers occur in numerators or denominators in the result, the results are to be taken with caution.) After each calculation step, it is shortened to keep the numbers small. Of course, this is not insignificant at the expense of the running time. In the case of complex-valued matrices, real values ​​(floating point operations) are used in the fraction mode, and the fractions of the inverse matrix are approximated using the continued fraction algorithm.

In decimal mode, the program calculates with normal floating point operations - the speed advantage is quite clear.

In the exact mode (since May 25, 2014) the calculation is now really exact, i.e. the entries are processed in the form a / b + c / d · î, and calculations are carried out using integer arithmetic without size restrictions. (Caution: it may take a lot of time!)


The procedure

The matrix M is transformed into the identity matrix (1 on all diagonal fields and 0 everywhere else) using suitable line transformations. In parallel, the same transformations are carried out on an original identity matrix. The result is then the inverse matrix M-1.

→ Evidence sketch

Example:

-1 For the sample, compute M · M-1: 2 8 -21 -1 -5 13 0 1 -2 3 5 1 abc 2 4 5 def 1 2 2 ghia = 3 2 - 5 1 + 1 0 = 1 b = 3 8 - 5 5 + 1 1 = 0 c = -3 21 + 5 13 - 1 2 = 0 d = 2 2 - 4 1 + 5 0 = 0 e = 2 8 - 4 5 + 5 1 = 1 f = -2 21 + 4 13 - 5 2 = 0 g = 1 2 - 2 1 + 2 0 = 0 h = 1 8 - 2 5 + 2 1 = 0 i = - 1 x 21 + 2 x 13 - 2 x 2 = 1

Evidence sketch

All line transformations can be represented as (among other things) left-sided multiplication with a special square matrix. Adding the q-fold of the second row to the first e.g. works for 3x3 matrices with the left-sided multiplication with the matrix

1 q 0 0 1 0 0 0 1

Swap the second and third lines with

1 0 0 0 0 1 0 1 0

The execution of k transformations one after the other can again be represented as a matrix.
If U1, U2, ..., Uk the corresponding matrices and M are the matrix to be transformed, the concatenation can be written as follows: Uk· Uk-1· ... · U1· M.
The product U: = Uk· Uk-1· ... · U1 is also a square matrix.

Now be such a product of all transformations that are necessary to make the identity matrix.
Then:

U · M = E | both sides with M on the right-1 multiply: U · M · M-1 = E * M-1 | E is the neutral element, and M · M-1= E, therefore: U · E = M-1

This proves the process. You can also see from the last line that U, of course, is nothing other than M-1 is. Incidentally, this already follows from the comparison of M-1· M = E (definition of the inverse) and the approach U · M = E


© Arndt Brünner, August 10, 2003 - Version: May 25, 2014
e-mail
→ calculate linear systems of equations
→ Calculator for the Gauss-Jordan algorithm
→ Calculate non-linear systems of equations
→ Calculate determinants
→ Calculate eigenvalues ​​and eigenvectors
→ Generator for 50 integer invertible 3 × 3 matrices