Matrix inverse calculator

Number format
Solution comments
Without description (answer only)

a

b

c

d

x

y

z

clear

i

ab
x2
xn

Randomize

313131313135151515151583137
2
2510
=Solve

  About matrix inverse calculator

This is a free online matrix inverse calculator using Cofactor, Gauss-Jordan, Gaussian elimination, Montante(Bareiss algorithm) with complete, detailed, step-by-step description of solutions, that performs operations with matrices up to 99x99 in size with matrix elements of this type: decimal numbers, fractions, complex numbers, variables.

To start the calculation, you need to first enter the size of the matrix in the input field that you can find from the very top of the screen, also there you can choose the desired method of calculation.

A little below you will find a matrix window in which you need to enter matrix elements using the keyboard. The matrix control panel is also located here, which simplifies work with matrices and contains the following control elements:

  • The first element allows you to expand the matrix window. This can be especially useful in cases where you need to perform calculations with very large matrices that do not fit completely. If the matrix is still not visible after expanding the window, you can change the scale of the matrix using the + / - buttons;
  • The second element performs the function of copying the matrix input to the memory buffer. This can be useful in cases where you often use the same matrix for calculations, or if you need to move matrices between operations;
  • And the last element inserts the previously copied matrix, which allows you to speed up the process of entering the matrix to just a few clicks, instead of doing it manually;

And further down you will find a toolbar that allows you to customize the calculator and make it easier to work with it. It is visually divided into three parts, each of which is responsible for the following functionality:

  • The first allows you to select the number format when the solution result is displayed. Also, here you can turn off comments to the solution of the problem if you have already understood how to solve this problem, and you use the calculator to speed up or check your own calculations. Or you can turn off the step-by-step solution entirely if you only need the result of the solution;
  • The second contains buttons that allow you to change the type of the matrix input field, erase its elements or the entire matrix, and the largest button with an equal sign, which will take you to the screen with the solution of the problem. All these buttons are duplicated by keys on the keyboard. To find out which key on the keyboard to press, simply hover over one of the buttons and a tooltip will appear with the name of the key. You can also use the arrow keys on your keyboard to move the cursor between matrix input fields;
  • And the last one allows you to choose the number of digits after the decimal point for rounding non-integer numbers. Also, here you can immediately see an example of how rounded fractions will look;

  What is the inverse of a matrix(matrix to the -1 power)?

If we take any number and divide one by that number, we find the reciprocal, which is the inverse of that number, and if we multiply that number by its reciprocal, we get one. Like ordinary numbers have reciprocal, square matrices can have an inverse matrix if their determinant is not equal to zero, otherwise these matrices are considered singular and it is impossible to find an inverse matrix for them. And if we multiply the matrix by its inverse matrix, we will get an identity matrix as a result. Identity matrix is a matrix that behaves with other matrices in the similar way that the number one behaves with other numbers, when we multiply any matrix by the identity matrix, we will get the same matrix as a result. In the identity matrix on the main diagonal, elements are equal one, and all other elements are equal to zero.

  How to find the inverse of a matrix using Gauss-Jordan?

To find the inverse of a matrix using the Gauss-Jordan method, we can add an identity matrix of the same size to the right of the matrix. After that, if we apply the Gauss-Jordan method to such a matrix in such a way that an identity matrix is formed on the left, then on the right we get the inverse.

  Inverse matrix calculation example

Write the initial matrix
A
:
A
=
2
1
1
1
3
0
1
2
0
To find the inverse matrix of matrix
A
, we can add to the right of it the identity matrix of the same size;
After that, using the
Gauss-Jordan
method, we transform the matrix so that the left part becomes a identity matrix, then in the right part we get the inverse matrix of the matrix
A
;
Write the expanded matrix (adding the identity matrix to the right of matrix
A
):
2
1
1
1
3
0
1
2
0
1
0
0
0
1
0
0
0
1
3
Iteration 1
Divide
1
th row by
2
;
1
1
1
1
2
3
0
1
2
2
0
1
2
0
0
0
1
0
0
0
1
a
0
1,1
=
2
2
=
1
;
a
0
1,2
=
1
2
=
1
2
;
a
0
1,3
=
1
2
=
1
2
;
a
0
1,4
=
1
2
=
1
2
;
a
0
1,5
=
0
2
=
0
;
a
0
1,6
=
0
2
=
0
;
Hide description
Obtain zeros in column
1
;
The element with indices
1,1
becomes the pivot;
The row containing the pivot element remains unchanged;
All other elements of the matrix are found using the rectangle method relative to the pivot element:
Zero the column containing the pivot element:
1
0
0
1
2
2
1
2
-
1
2
1
2
1
1
2
-
1
2
1
2
-
1
2
-
1
2
0
1
0
0
0
1
a
0
2,2
=
1
1
1
1
2
3
0
1
2
2
0
1
2
0
0
0
1
0
0
0
1
=
a
0
2,2
*
a
0
1,1
- (
a
0
2,1
*
a
0
1,2
) =
3
*
1
- (
1
*
1
2
) =
2
1
2
;
a
0
2,3
=
1
1
1
1
2
2
1
2
0
1
2
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
) =
0
*
1
- (
1
*
0
) =
0
;
a
0
3,6
=
1
1
1
1
2
2
1
2
-
1
2
1
2
1
1
2
-
1
2
1
2
-
1
2
-
1
2
0
1
0
0
0
1
=
a
0
3,6
*
a
0
1,1
- (
a
0
3,1
*
a
0
1,6
) =
1
*
1
- (
1
*
0
) =
1
;
Hide description
4
Iteration 2
Divide
2
th row by
2
1
2
;
1
0
0
1
2
1
-
1
2
1
2
3
5
-
1
2
1
2
-
1
5
-
1
2
0
2
5
0
0
0
1
a
0
2,2
=
2
1
2
2
1
2
=
1
;
a
0
2,3
=
1
1
2
2
1
2
=
3
5
;
a
0
2,4
=
-
1
2
2
1
2
=
-
1
5
;
a
0
2,5
=
1
2
1
2
=
2
5
;
a
0
2,6
=
0
2
1
2
=
0
;
Hide description
Obtain zeros in column
2
;
The element with indices
2,2
becomes the pivot;
The row containing the pivot element remains unchanged;
All other elements of the matrix are found using the rectangle method relative to the pivot element:
Zero the column containing the pivot element:
1
0
0
0
1
0
1
5
3
5
-
1
5
3
5
-
1
5
-
3
5
-
1
5
2
5
1
5
0
0
1
a
0
1,3
=
1
0
0
1
2
1
-
1
2
1
2
3
5
-
1
2
1
2
-
1
5
-
1
2
0
2
5
0
0
0
1
=
a
0
1,3
*
a
0
2,2
- (
a
0
1,2
*
a
0
2,3
) =
1
2
*
1
- (
1
2
*
3
5
) =
1
5
;
a
0
1,4
=
1
0
0
1
2
1
-
1
2
1
5
3
5
-
1
2
1
2
-
1
5
-
1
2
0
2
5
0
0
0
1
=
a
0
1,4
*
a
0
2,2
- (
a
0
1,2
*
a
0
2,4
) =
1
2
*
1
- (
1
2
*
-
1
5
) =
3
5
;
a
0
1,5
=
1
0
0
1
2
1
-
1
2
1
5
3
5
-
1
2
3
5
-
1
5
-
1
2
0
2
5
0
0
0
1
=
a
0
1,5
*
a
0
2,2
- (
a
0
1,2
*
a
0
2,5
) =
0
*
1
- (
1
2
*
2
5
) =
-
1
5
;
a
0
1,6
=
1
0
0
1
2
1
-
1
2
1
5
3
5
-
1
2
3
5
-
1
5
-
1
2
-
1
5
2
5
0
0
0
1
=
a
0
1,6
*
a
0
2,2
- (
a
0
1,2
*
a
0
2,6
) =
0
*
1
- (
1
2
*
0
) =
0
;
a
0
3,3
=
1
0
0
1
2
1
-
1
2
1
5
3
5
-
1
2
3
5
-
1
5
-
1
2
-
1
5
2
5
0
0
0
1
=
a
0
3,3
*
a
0
2,2
- (
a
0
3,2
*
a
0
2,3
) =
-
1
2
*
1
- (
-
1
2
*
3
5
) =
-
1
5
;
a
0
3,4
=
1
0
0
1
2
1
-
1
2
1
5
3
5
-
1
5
3
5
-
1
5
-
1
2
-
1
5
2
5
0
0
0
1
=
a
0
3,4
*
a
0
2,2
- (
a
0
3,2
*
a
0
2,4
) =
-
1
2
*
1
- (
-
1
2
*
-
1
5
) =
-
3
5
;
a
0
3,5
=
1
0
0
1
2
1
-
1
2
1
5
3
5
-
1
5
3
5
-
1
5
-
3
5
-
1
5
2
5
0
0
0
1
=
a
0
3,5
*
a
0
2,2
- (
a
0
3,2
*
a
0
2,5
) =
0
*
1
- (
-
1
2
*
2
5
) =
1
5
;
a
0
3,6
=
1
0
0
1
2
1
-
1
2
1
5
3
5
-
1
5
3
5
-
1
5
-
3
5
-
1
5
2
5
1
5
0
0
1
=
a
0
3,6
*
a
0
2,2
- (
a
0
3,2
*
a
0
2,6
) =
1
*
1
- (
-
1
2
*
0
) =
1
;
Hide description
5
Iteration 3
Divide
3
th row by
-
1
5
;
1
0
0
0
1
0
1
5
3
5
1
3
5
-
1
5
3
-
1
5
2
5
-1
0
0
-5
a
0
3,3
=
-
1
5
-
1
5
=
1
;
a
0
3,4
=
-
3
5
-
1
5
=
3
;
a
0
3,5
=
1
5
-
1
5
=
-1
;
a
0
3,6
=
1
-
1
5
=
-5
;
Hide description
Obtain zeros in column
3
;
The element with indices
3,3
becomes the pivot;
The row containing the pivot element remains unchanged;
All other elements of the matrix are found using the rectangle method relative to the pivot element:
Zero the column containing the pivot element:
1
0
0
0
1
0
0
0
1
0
-2
3
0
1
-1
1
3
-5
a
0
1,4
=
1
0
0
0
1
0
1
5
3
5
1
3
5
-
1
5
3
-
1
5
2
5
-1
0
0
-5
=
a
0
1,4
*
a
0
3,3
- (
a
0
1,3
*
a
0
3,4
) =
3
5
*
1
- (
1
5
*
3
) =
0
;
a
0
1,5
=
1
0
0
0
1
0
1
5
3
5
1
0
-
1
5
3
-
1
5
2
5
-1
0
0
-5
=
a
0
1,5
*
a
0
3,3
- (
a
0
1,3
*
a
0
3,5
) =
-
1
5
*
1
- (
1
5
*
-1
) =
0
;
a
0
1,6
=
1
0
0
0
1
0
1
5
3
5
1
0
-
1
5
3
0
2
5
-1
0
0
-5
=
a
0
1,6
*
a
0
3,3
- (
a
0
1,3
*
a
0
3,6
) =
0
*
1
- (
1
5
*
-5
) =
1
;
a
0
2,4
=
1
0
0
0
1
0
1
5
3
5
1
0
-
1
5
3
0
2
5
-1
1
0
-5
=
a
0
2,4
*
a
0
3,3
- (
a
0
2,3
*
a
0
3,4
) =
-
1
5
*
1
- (
3
5
*
3
) =
-2
;
a
0
2,5
=
1
0
0
0
1
0
1
5
3
5
1
0
-2
3
0
2
5
-1
1
0
-5
=
a
0
2,5
*
a
0
3,3
- (
a
0
2,3
*
a
0
3,5
) =
2
5
*
1
- (
3
5
*
-1
) =
1
;
a
0
2,6
=
1
0
0
0
1
0
1
5
3
5
1
0
-2
3
0
1
-1
1
0
-5
=
a
0
2,6
*
a
0
3,3
- (
a
0
2,3
*
a
0
3,6
) =
0
*
1
- (
3
5
*
-5
) =
3
;
Hide description
Answer
B = A⁻¹
0
-2
3
0
1
-1
1
3
-5
SIZE3×3METHODGauss-Jordan

  Frequently asked questions

How do you find the inverse of a matrix?

Two common methods are Gauss-Jordan elimination — augment the matrix with the identity and row-reduce until the left block becomes the identity — and the adjugate method, which divides the transpose of the cofactor matrix by the determinant.

Which matrices have an inverse?

Only square matrices with a non-zero determinant (non-singular matrices) are invertible. If the determinant is 0, the matrix has no inverse.

What is the inverse of a 2×2 matrix?

For A = [[a, b], [c, d]], the inverse is 1/(ad − bc) × [[d, −b], [−c, a]], provided the determinant ad − bc is not zero.

Is the inverse of a matrix unique?

Yes. If a matrix is invertible, its inverse is unique and satisfies A·A⁻¹ = A⁻¹·A = I, where I is the identity matrix.

  Calculation methods

  Sources