home · Programs · How to check the inverse matrix for correctness. Inverse matrix online

How to check the inverse matrix for correctness. Inverse matrix online

The matrix $A^(-1)$ is called the inverse of the square matrix $A$ if the condition $A^(-1)\cdot A=A\cdot A^(-1)=E$ is satisfied, where $E $ is the identity matrix, the order of which is equal to the order of the matrix $A$.

A non-singular matrix is ​​a matrix whose determinant is not equal to zero. Accordingly, a singular matrix is ​​one whose determinant is equal to zero.

The inverse matrix $A^(-1)$ exists if and only if the matrix $A$ is non-singular. If the inverse matrix $A^(-1)$ exists, then it is unique.

There are several ways to find the inverse of a matrix, and we will look at two of them. This page will discuss the adjoint matrix method, which is considered standard in most higher mathematics courses. The second method of finding the inverse matrix (the method of elementary transformations), which involves using the Gauss method or the Gauss-Jordan method, is discussed in the second part.

Adjoint matrix method

Let the matrix $A_(n\times n)$ be given. In order to find the inverse matrix $A^(-1)$, three steps are required:

  1. Find the determinant of the matrix $A$ and make sure that $\Delta A\neq 0$, i.e. that matrix A is non-singular.
  2. Compose algebraic complements $A_(ij)$ of each element of the matrix $A$ and write the matrix $A_(n\times n)^(*)=\left(A_(ij) \right)$ from the found algebraic complements.
  3. Write the inverse matrix taking into account the formula $A^(-1)=\frac(1)(\Delta A)\cdot (A^(*))^T$.

The matrix $(A^(*))^T$ is often called adjoint (reciprocal, allied) to the matrix $A$.

If the solution is done manually, then the first method is good only for matrices of relatively small orders: second (), third (), fourth (). To find the inverse of a higher order matrix, other methods are used. For example, the Gaussian method, which is discussed in the second part.

Example No. 1

Find the inverse of matrix $A=\left(\begin(array) (cccc) 5 & -4 &1 & 0 \\ 12 &-11 &4 & 0 \\ -5 & 58 &4 & 0 \\ 3 & - 1 & -9 & 0 \end(array) \right)$.

Since all elements of the fourth column are equal to zero, then $\Delta A=0$ (i.e. the matrix $A$ is singular). Since $\Delta A=0$, there is no inverse matrix to matrix $A$.

Answer: matrix $A^(-1)$ does not exist.

Example No. 2

Find the inverse of matrix $A=\left(\begin(array) (cc) -5 & 7 \\ 9 & 8 \end(array)\right)$. Perform check.

We use the adjoint matrix method. First, let's find the determinant of the given matrix $A$:

$$ \Delta A=\left| \begin(array) (cc) -5 & 7\\ 9 & 8 \end(array)\right|=-5\cdot 8-7\cdot 9=-103. $$

Since $\Delta A \neq 0$, then the inverse matrix exists, therefore we will continue the solution. Finding algebraic complements

\begin(aligned) & A_(11)=(-1)^2\cdot 8=8; \; A_(12)=(-1)^3\cdot 9=-9;\\ & A_(21)=(-1)^3\cdot 7=-7; \; A_(22)=(-1)^4\cdot (-5)=-5.\\ \end(aligned)

We compose a matrix of algebraic additions: $A^(*)=\left(\begin(array) (cc) 8 & -9\\ -7 & -5 \end(array)\right)$.

We transpose the resulting matrix: $(A^(*))^T=\left(\begin(array) (cc) 8 & -7\\ -9 & -5 \end(array)\right)$ (the resulting matrix is ​​often is called the adjoint or allied matrix to the matrix $A$). Using the formula $A^(-1)=\frac(1)(\Delta A)\cdot (A^(*))^T$, we have:

$$ A^(-1)=\frac(1)(-103)\cdot \left(\begin(array) (cc) 8 & -7\\ -9 & -5 \end(array)\right) =\left(\begin(array) (cc) -8/103 & 7/103\\ 9/103 & 5/103 \end(array)\right) $$

So, the inverse matrix is ​​found: $A^(-1)=\left(\begin(array) (cc) -8/103 & 7/103\\ 9/103 & 5/103 \end(array)\right) $. To check the truth of the result, it is enough to check the truth of one of the equalities: $A^(-1)\cdot A=E$ or $A\cdot A^(-1)=E$. Let's check the equality $A^(-1)\cdot A=E$. In order to work less with fractions, we will substitute the matrix $A^(-1)$ not in the form $\left(\begin(array) (cc) -8/103 & 7/103\\ 9/103 & 5/103 \ end(array)\right)$, and in the form $-\frac(1)(103)\cdot \left(\begin(array) (cc) 8 & -7\\ -9 & -5 \end(array )\right)$:

$$ A^(-1)\cdot(A) =-\frac(1)(103)\cdot \left(\begin(array) (cc) 8 & -7\\ -9 & -5 \end( array)\right)\cdot\left(\begin(array) (cc) -5 & 7 \\ 9 & 8 \end(array)\right) =-\frac(1)(103)\cdot\left( \begin(array) (cc) -103 & 0 \\ 0 & -103 \end(array)\right) =\left(\begin(array) (cc) 1 & 0 \\ 0 & 1 \end(array )\right) =E $$

Answer: $A^(-1)=\left(\begin(array) (cc) -8/103 & 7/103\\ 9/103 & 5/103 \end(array)\right)$.

Example No. 3

Find the inverse matrix for the matrix $A=\left(\begin(array) (ccc) 1 & 7 & 3 \\ -4 & 9 & 4 \\ 0 & 3 & 2\end(array) \right)$. Perform check.

Let's start by calculating the determinant of the matrix $A$. So, the determinant of matrix $A$ is:

$$ \Delta A=\left| \begin(array) (ccc) 1 & 7 & 3 \\ -4 & 9 & 4 \\ 0 & 3 & 2\end(array) \right| = 18-36+56-12=26. $$

Since $\Delta A\neq 0$, then the inverse matrix exists, therefore we will continue the solution. We find the algebraic complements of each element of a given matrix:

$$ \begin(aligned) & A_(11)=(-1)^(2)\cdot\left|\begin(array)(cc) 9 & 4\\ 3 & 2\end(array)\right| =6;\; A_(12)=(-1)^(3)\cdot\left|\begin(array)(cc) -4 &4 \\ 0 & 2\end(array)\right|=8;\; A_(13)=(-1)^(4)\cdot\left|\begin(array)(cc) -4 & 9\\ 0 & 3\end(array)\right|=-12;\\ & A_(21)=(-1)^(3)\cdot\left|\begin(array)(cc) 7 & 3\\ 3 & 2\end(array)\right|=-5;\; A_(22)=(-1)^(4)\cdot\left|\begin(array)(cc) 1 & 3\\ 0 & 2\end(array)\right|=2;\; A_(23)=(-1)^(5)\cdot\left|\begin(array)(cc) 1 & 7\\ 0 & 3\end(array)\right|=-3;\\ & A_ (31)=(-1)^(4)\cdot\left|\begin(array)(cc) 7 & 3\\ 9 & 4\end(array)\right|=1;\; A_(32)=(-1)^(5)\cdot\left|\begin(array)(cc) 1 & 3\\ -4 & 4\end(array)\right|=-16;\; A_(33)=(-1)^(6)\cdot\left|\begin(array)(cc) 1 & 7\\ -4 & 9\end(array)\right|=37. \end(aligned) $$

We compose a matrix of algebraic additions and transpose it:

$$ A^*=\left(\begin(array) (ccc) 6 & 8 & -12 \\ -5 & 2 & -3 \\ 1 & -16 & 37\end(array) \right); \; (A^*)^T=\left(\begin(array) (ccc) 6 & -5 & 1 \\ 8 & 2 & -16 \\ -12 & -3 & 37\end(array) \right) . $$

Using the formula $A^(-1)=\frac(1)(\Delta A)\cdot (A^(*))^T$, we get:

$$ A^(-1)=\frac(1)(26)\cdot \left(\begin(array) (ccc) 6 & -5 & 1 \\ 8 & 2 & -16 \\ -12 & - 3 & 37\end(array) \right)= \left(\begin(array) (ccc) 3/13 & -5/26 & 1/26 \\ 4/13 & 1/13 & -8/13 \ \ -6/13 & -3/26 & 37/26 \end(array) \right) $$

So $A^(-1)=\left(\begin(array) (ccc) 3/13 & -5/26 & 1/26 \\ 4/13 & 1/13 & -8/13 \\ - 6/13 & -3/26 & 37/26 \end(array) \right)$. To check the truth of the result, it is enough to check the truth of one of the equalities: $A^(-1)\cdot A=E$ or $A\cdot A^(-1)=E$. Let's check the equality $A\cdot A^(-1)=E$. In order to work less with fractions, we will substitute the matrix $A^(-1)$ not in the form $\left(\begin(array) (ccc) 3/13 & -5/26 & 1/26 \\ 4/13 & 1/13 & -8/13 \\ -6/13 & -3/26 & 37/26 \end(array) \right)$, and in the form $\frac(1)(26)\cdot \left( \begin(array) (ccc) 6 & -5 & 1 \\ 8 & 2 & -16 \\ -12 & -3 & 37\end(array) \right)$:

$$ A\cdot(A^(-1)) =\left(\begin(array)(ccc) 1 & 7 & 3 \\ -4 & 9 & 4\\ 0 & 3 & 2\end(array) \right)\cdot \frac(1)(26)\cdot \left(\begin(array) (ccc) 6 & -5 & 1 \\ 8 & 2 & -16 \\ -12 & -3 & 37\ end(array) \right) =\frac(1)(26)\cdot\left(\begin(array) (ccc) 26 & 0 & 0 \\ 0 & 26 & 0 \\ 0 & 0 & 26\end (array) \right) =\left(\begin(array) (ccc) 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end(array) \right) =E $$

The check was successful, the inverse matrix $A^(-1)$ was found correctly.

Answer: $A^(-1)=\left(\begin(array) (ccc) 3/13 & -5/26 & 1/26 \\ 4/13 & 1/13 & -8/13 \\ -6 /13 & -3/26 & 37/26 \end(array) \right)$.

Example No. 4

Find the matrix inverse of matrix $A=\left(\begin(array) (cccc) 6 & -5 & 8 & 4\\ 9 & 7 & 5 & 2 \\ 7 & 5 & 3 & 7\\ -4 & 8 & -8 & -3 \end(array) \right)$.

For a fourth-order matrix, finding the inverse matrix using algebraic additions is somewhat difficult. However, such examples do occur in test papers.

To find the inverse of a matrix, you first need to calculate the determinant of the matrix $A$. The best way to do this in this situation is to expand the determinant along a row (column). We select any row or column and find the algebraic complements of each element of the selected row or column.

For example, for the first line we get:

$$ A_(11)=\left|\begin(array)(ccc) 7 & 5 & 2\\ 5 & 3 & 7\\ 8 & -8 & -3 \end(array)\right|=556; \; A_(12)=-\left|\begin(array)(ccc) 9 & 5 & 2\\ 7 & 3 & 7 \\ -4 & -8 & -3 \end(array)\right|=-300 ; $$ $$ A_(13)=\left|\begin(array)(ccc) 9 & 7 & 2\\ 7 & 5 & 7\\ -4 & 8 & -3 \end(array)\right|= -536;\; A_(14)=-\left|\begin(array)(ccc) 9 & 7 & 5\\ 7 & 5 & 3\\ -4 & 8 & -8 \end(array)\right|=-112. $$

The determinant of the matrix $A$ is calculated using the following formula:

$$ \Delta(A)=a_(11)\cdot A_(11)+a_(12)\cdot A_(12)+a_(13)\cdot A_(13)+a_(14)\cdot A_(14 )=6\cdot 556+(-5)\cdot(-300)+8\cdot(-536)+4\cdot(-112)=100. $$

$$ \begin(aligned) & A_(21)=-77;\;A_(22)=50;\;A_(23)=87;\;A_(24)=4;\\ & A_(31) =-93;\;A_(32)=50;\;A_(33)=83;\;A_(34)=36;\\ & A_(41)=473;\;A_(42)=-250 ;\;A_(43)=-463;\;A_(44)=-96. \end(aligned) $$

Matrix of algebraic complements: $A^*=\left(\begin(array)(cccc) 556 & -300 & -536 & -112\\ -77 & 50 & 87 & 4 \\ -93 & 50 & 83 & 36\\ 473 & -250 & -463 & -96\end(array)\right)$.

Adjoint matrix: $(A^*)^T=\left(\begin(array) (cccc) 556 & -77 & -93 & 473\\ -300 & 50 & 50 & -250 \\ -536 & 87 & 83 & -463\\ -112 & 4 & 36 & -96\end(array)\right)$.

Inverse matrix:

$$ A^(-1)=\frac(1)(100)\cdot \left(\begin(array) (cccc) 556 & -77 & -93 & 473\\ -300 & 50 & 50 & -250 \\ -536 & 87 & 83 & -463\\ -112 & 4 & 36 & -96 \end(array) \right)= \left(\begin(array) (cccc) 139/25 & -77/100 & -93/100 & 473/100 \\ -3 & 1/2 & 1/2 & -5/2 \\ -134/25 & 87/100 & 83/100 & -463/100 \\ -28/ 25 & 1/25 & 9/25 & -24/25 \end(array) \right) $$

The check, if desired, can be done in the same way as in the previous examples.

Answer: $A^(-1)=\left(\begin(array) (cccc) 139/25 & -77/100 & -93/100 & 473/100 \\ -3 & 1/2 & 1/2 & -5/2 \\ -134/25 & 87/100 & 83/100 & -463/100 \\ -28/25 & 1/25 & 9/25 & -24/25 \end(array) \right) $.

In the second part, we will consider another way to find the inverse matrix, which involves the use of transformations of the Gaussian method or the Gauss-Jordan method.

For any non-singular matrix A there is a unique matrix A -1 such that

A*A -1 =A -1 *A = E,

where E is the identity matrix of the same orders as A. The matrix A -1 is called the inverse of matrix A.

In case someone forgot, in the identity matrix, except for the diagonal filled with ones, all other positions are filled with zeros, an example of an identity matrix:

Finding the inverse matrix using the adjoint matrix method

The inverse matrix is ​​defined by the formula:

where A ij - elements a ij.

Those. To calculate the inverse matrix, you need to calculate the determinant of this matrix. Then find the algebraic complements for all its elements and compose a new matrix from them. Next you need to transport this matrix. And divide each element of the new matrix by the determinant of the original matrix.

Let's look at a few examples.

Find A -1 for a matrix

Solution. Let's find A -1 using the adjoint matrix method. We have det A = 2. Let us find the algebraic complements of the elements of matrix A. In this case, the algebraic complements of the matrix elements will be the corresponding elements of the matrix itself, taken with a sign in accordance with the formula

We have A 11 = 3, A 12 = -4, A 21 = -1, A 22 = 2. We form the adjoint matrix

We transport the matrix A*:

We find the inverse matrix using the formula:

We get:

Using the adjoint matrix method, find A -1 if

Solution. First of all, we calculate the definition of this matrix to verify the existence of the inverse matrix. We have

Here we added to the elements of the second row the elements of the third row, previously multiplied by (-1), and then expanded the determinant for the second row. Since the definition of this matrix is ​​nonzero, its inverse matrix exists. To construct the adjoint matrix, we find the algebraic complements of the elements of this matrix. We have

According to the formula

transport matrix A*:

Then according to the formula

Finding the inverse matrix using the method of elementary transformations

In addition to the method of finding the inverse matrix, which follows from the formula (adjoint matrix method), there is a method for finding the inverse matrix, called the method of elementary transformations.

Elementary matrix transformations

The following transformations are called elementary matrix transformations:

1) rearrangement of rows (columns);

2) multiplying a row (column) by a number other than zero;

3) adding to the elements of a row (column) the corresponding elements of another row (column), previously multiplied by a certain number.

To find the matrix A -1, we construct a rectangular matrix B = (A|E) of orders (n; 2n), assigning to matrix A on the right the identity matrix E through a dividing line:

Let's look at an example.

Using the method of elementary transformations, find A -1 if

Solution. We form matrix B:

Let us denote the rows of matrix B by α 1, α 2, α 3. Let us perform the following transformations on the rows of matrix B.

Typically, inverse operations are used to simplify complex algebraic expressions. For example, if the problem involves the operation of dividing by a fraction, you can replace it with the operation of multiplying by the reciprocal of a fraction, which is the inverse operation. Moreover, matrices cannot be divided, so you need to multiply by the inverse matrix. Calculating the inverse of a 3x3 matrix is ​​quite tedious, but you need to be able to do it manually. You can also find the reciprocal using a good graphing calculator.

Steps

Using the adjoint matrix

Transpose the original matrix. Transposition is the replacement of rows with columns relative to the main diagonal of the matrix, that is, you need to swap elements (i,j) and (j,i). In this case, the elements of the main diagonal (starts in the upper left corner and ends in the lower right corner) do not change.

  • To change rows to columns, write the elements of the first row in the first column, the elements of the second row in the second column, and the elements of the third row in the third column. The order of changing the position of the elements is shown in the figure, in which the corresponding elements are circled with colored circles.
  • Find the definition of each 2x2 matrix. Every element of any matrix, including a transposed one, is associated with a corresponding 2x2 matrix. To find a 2x2 matrix that corresponds to a specific element, cross out the row and column in which the given element is located, that is, you need to cross out five elements of the original 3x3 matrix. Four elements will remain uncrossed, which are elements of the corresponding 2x2 matrix.

    • For example, to find a 2x2 matrix for the element that is located at the intersection of the second row and the first column, cross out the five elements that are in the second row and first column. The remaining four elements are elements of the corresponding 2x2 matrix.
    • Find the determinant of each 2x2 matrix. To do this, subtract the product of the elements of the secondary diagonal from the product of the elements of the main diagonal (see figure).
    • Detailed information about 2x2 matrices corresponding to specific elements of a 3x3 matrix can be found on the Internet.
  • Create a cofactor matrix. Write the results obtained earlier in the form of a new cofactor matrix. To do this, write the found determinant of each 2x2 matrix where the corresponding element of the 3x3 matrix was located. For example, if you are considering a 2x2 matrix for element (1,1), write its determinant in position (1,1). Then change the signs of the corresponding elements according to a certain scheme, which is shown in the figure.

    • Scheme for changing signs: the sign of the first element of the first line does not change; the sign of the second element of the first line is reversed; the sign of the third element of the first line does not change, and so on line by line. Please note that the “+” and “-” signs that are shown in the diagram (see figure) do not indicate that the corresponding element will be positive or negative. In this case, the “+” sign indicates that the sign of the element does not change, and the “-” sign indicates a change in the sign of the element.
    • Detailed information about cofactor matrices can be found on the Internet.
    • This way you will find the adjoint matrix of the original matrix. It is sometimes called a complex conjugate matrix. Such a matrix is ​​denoted as adj(M).
  • Divide each element of the adjoint matrix by its determinant. The determinant of the matrix M was calculated at the very beginning to check that the inverse matrix exists. Now divide each element of the adjoint matrix by this determinant. Write the result of each division operation where the corresponding element is located. This way you will find the matrix inverse to the original one.

    • The determinant of the matrix which is shown in the figure is 1. Thus, here the adjoint matrix is ​​the inverse matrix (because when any number is divided by 1, it does not change).
    • In some sources, the division operation is replaced by the operation of multiplication by 1/det(M). However, the final result does not change.
  • Write the inverse matrix. Write the elements located on the right half of the large matrix as a separate matrix, which is the inverse matrix.

    Using a calculator

      Choose a calculator that works with matrices. It is not possible to find the inverse of a matrix using simple calculators, but it can be done on a good graphing calculator such as the Texas Instruments TI-83 or TI-86.

      Enter the original matrix into the calculator's memory. To do this, click the Matrix button, if available. For a Texas Instruments calculator, you may need to press the 2nd and Matrix buttons.

      Select the Edit menu. Do this using the arrow buttons or the appropriate function button located at the top of the calculator's keyboard (the location of the button varies depending on the calculator model).

      Enter the matrix notation. Most graphic calculators can work with 3-10 matrices, which can be designated by the letters A-J. Typically, just select [A] to designate the original matrix. Then press the Enter button.

      Enter the matrix size. This article talks about 3x3 matrices. But graphic calculators can work with large matrices. Enter the number of rows, press Enter, then enter the number of columns and press Enter again.

      Enter each matrix element. A matrix will be displayed on the calculator screen. If you have previously entered a matrix into the calculator, it will appear on the screen. The cursor will highlight the first element of the matrix. Enter the value for the first element and press Enter. The cursor will automatically move to the next matrix element.

    The original one according to the formula: A^-1 = A*/detA, where A* is the associated matrix, detA is the original matrix. The adjoint matrix is ​​a transposed matrix of additions to the elements of the original matrix.

    First of all, find the determinant of the matrix; it must be different from zero, since later the determinant will be used as a divisor. Let, for example, be given a matrix of the third (consisting of three rows and three columns). As you can see, the determinant of the matrix is ​​not equal to zero, so there is an inverse matrix.

    Find the complements to each element of the matrix A. The complement to A is the determinant of the submatrix obtained from the original by deleting the i-th row and j-th column, and this determinant is taken with a sign. The sign is determined by multiplying the determinant by (-1) to the i+j power. Thus, for example, the complement of A will be the determinant considered in the figure. The sign turned out like this: (-1)^(2+1) = -1.

    As a result you will get matrix additions, now transpose it. Transpose is an operation that is symmetrical about the main diagonal of a matrix; the columns and rows are swapped. Thus, you have found the adjoint matrix A*.

    www.site allows you to find inverse matrix online. The site performs the calculation inverse matrix online. In a few seconds the server will provide an accurate solution. Inverse matrix will be like this matrix, multiplication of the original matrices for which gives unit matrix, provided that the determinant of the initial matrices not equal to zero, otherwise inverse matrix does not exist for her. In problems when we calculate inverse matrix online, it is necessary that the determinant matrices was nonzero, otherwise www.site will display a corresponding message about the impossibility of calculating inverse matrix online. like this matrix also called degenerate. Find inverse matrix in mode online only possible for square matrices. Finding operation inverse matrix online reduces to calculating the determinant matrices, then an intermediate matrix according to a well-known rule, and at the end of the operation - multiplying the previously found determinant by the transposed intermediate matrix. The exact result from the definition inverse matrix online can be achieved by studying the theory in this course. This operation occupies a special place in the theory matrices and linear algebra, allows you to solve systems of linear equations using the so-called matrix method. The task of finding inverse matrix online occurs already at the beginning of the study of higher mathematics and is present in almost every mathematical discipline as a basic concept of algebra, being a mathematical tool in applied problems. www.site finds inverse matrix given dimension in mode online instantly. Calculation inverse matrix online given its dimension, this is finding matrices the same dimension in its numerical value, as well as in its symbolic value, found according to the calculation rule inverse matrix. Finding inverse matrix online widely accepted in theory matrices. Finding result inverse matrix online used when solving a linear system of equations using the matrix method. If the determinant matrices will be equal to zero, then inverse matrix, for which the zero determinant is found, does not exist. In order to calculate inverse matrix or find for several at once matrices corresponding to them reverse, you need to spend a lot of time and effort, while our server will find in a matter of seconds inverse matrix online. In this case, the answer to finding inverse matrix will be correct and with sufficient accuracy, even if the numbers when finding inverse matrix online will be irrational. On the site www.site character entries are allowed in elements matrices, that is inverse matrix online can be represented in general symbolic form when calculating inverse matrix online. It is useful to check the answer obtained when solving the problem of finding inverse matrix online using the site www.site. When performing a calculation operation inverse matrix online you need to be careful and extremely focused when solving this problem. In turn, our site will help you check your decision on the topic inverse matrix online. If you do not have time for long checks of solved problems, then www.site will certainly be a convenient tool for checking when finding and calculating inverse matrix online.