Biographies Characteristics Analysis

Is there an inverse matrix? Higher mathematics

Let's continue the conversation about actions with matrices. Namely, during the study of this lecture you will learn how to find the inverse matrix. Learn. Even if math is difficult.

What is an inverse matrix? Here we can draw an analogy with inverse numbers: consider, for example, the optimistic number 5 and its inverse number. The product of these numbers is equal to one: . Everything is similar with matrices! The product of a matrix and its inverse matrix is ​​equal to – identity matrix, which is the matrix analogue of the numerical unit. However, first things first – let’s first solve an important practical issue, namely, learn how to find this very inverse matrix.

What do you need to know and be able to do to find the inverse matrix? You must be able to decide qualifiers. You must understand what it is matrix and be able to perform some actions with them.

There are two main methods for finding the inverse matrix:
by using algebraic additions And using elementary transformations.

Today we will study the first, simpler method.

Let's start with the most terrible and incomprehensible. Let's consider square matrix. The inverse matrix can be found using the following formula:

Where is the determinant of the matrix, is the transposed matrix of algebraic complements of the corresponding elements of the matrix.

The concept of an inverse matrix exists only for square matrices, matrices “two by two”, “three by three”, etc.

Designations: As you may have already noticed, the inverse matrix is ​​denoted by a superscript

Let's start with the simplest case - a two-by-two matrix. Most often, of course, “three by three” is required, but, nevertheless, I strongly recommend studying a simpler task in order to understand the general principle of the solution.

Example:

Find the inverse of a matrix

Let's decide. It is convenient to break down the sequence of actions point by point.

1) First we find the determinant of the matrix.

If your understanding of this action is not good, read the material How to calculate the determinant?

Important! If the determinant of the matrix is ​​equal to ZERO– inverse matrix DOES NOT EXIST.

In the example under consideration, as it turned out, , which means everything is in order.

2) Find the matrix of minors.

To solve our problem, it is not necessary to know what a minor is, however, it is advisable to read the article How to calculate the determinant.

The matrix of minors has the same dimensions as the matrix, that is, in this case.
The only thing left to do is find four numbers and put them instead of asterisks.

Let's return to our matrix
Let's look at the top left element first:

How to find it minor?
And this is done like this: MENTALLY cross out the row and column in which this element is located:

The remaining number is minor of this element, which we write in our matrix of minors:

Consider the following matrix element:

Mentally cross out the row and column in which this element appears:

What remains is the minor of this element, which we write in our matrix:

Similarly, we consider the elements of the second row and find their minors:


Ready.

It's simple. In the matrix of minors you need CHANGE SIGNS two numbers:

These are the numbers that I circled!

– matrix of algebraic additions of the corresponding elements of the matrix.

And just...

4) Find the transposed matrix of algebraic additions.

– transposed matrix of algebraic complements of the corresponding elements of the matrix.

5) Answer.

Let's remember our formula
Everything has been found!

So the inverse matrix is:

It is better to leave the answer as is. NO NEED divide each element of the matrix by 2, since the result is fractional numbers. This nuance is discussed in more detail in the same article. Actions with matrices.

How to check the solution?

You need to perform matrix multiplication or

Examination:

Received already mentioned identity matrix is a matrix with ones by main diagonal and zeros in other places.

Thus, the inverse matrix is ​​found correctly.

If you carry out the action, the result will also be an identity matrix. This is one of the few cases where matrix multiplication is commutative, more details can be found in the article Properties of operations on matrices. Matrix Expressions. Also note that during the check, the constant (fraction) is brought forward and processed at the very end - after the matrix multiplication. This is a standard technique.

Let's move on to a more common case in practice - the three-by-three matrix:

Example:

Find the inverse of a matrix

The algorithm is exactly the same as for the “two by two” case.

We find the inverse matrix using the formula: , where is the transposed matrix of algebraic complements of the corresponding elements of the matrix.

1) Find the determinant of the matrix.


Here the determinant is revealed on the first line.

Also, don’t forget that, which means everything is fine - inverse matrix exists.

2) Find the matrix of minors.

The matrix of minors has a dimension of “three by three” , and we need to find nine numbers.

I'll take a closer look at a couple of minors:

Consider the following matrix element:

MENTALLY cross out the row and column in which this element is located:

We write the remaining four numbers in the “two by two” determinant.

This two-by-two determinant and is the minor of this element. It needs to be calculated:


That’s it, the minor has been found, we write it in our matrix of minors:

As you probably guessed, you need to calculate nine two-by-two determinants. The process, of course, is tedious, but the case is not the most severe, it can be worse.

Well, to consolidate – finding another minor in the pictures:

Try to calculate the remaining minors yourself.

Final result:
– matrix of minors of the corresponding elements of the matrix.

The fact that all the minors turned out to be negative is purely an accident.

3) Find the matrix of algebraic additions.

In the matrix of minors it is necessary CHANGE SIGNS strictly for the following elements:

In this case:

We do not consider finding the inverse matrix for a “four by four” matrix, since such a task can only be given by a sadistic teacher (for the student to calculate one “four by four” determinant and 16 “three by three” determinants). In my practice, there was only one such case, and the customer of the test paid quite dearly for my torment =).

In a number of textbooks and manuals you can find a slightly different approach to finding the inverse matrix, but I recommend using the solution algorithm outlined above. Why? Because the likelihood of getting confused in calculations and signs is much less.

Finding the inverse matrix.

In this article we will understand the concept of an inverse matrix, its properties and methods of finding. Let us dwell in detail on solving examples in which it is necessary to construct an inverse matrix for a given one.

Page navigation.

    Inverse matrix - definition.

    Finding the inverse matrix using a matrix from algebraic complements.

    Properties of an inverse matrix.

    Finding the inverse matrix using the Gauss-Jordan method.

    Finding the elements of the inverse matrix by solving the corresponding systems of linear algebraic equations.

Inverse matrix - definition.

The concept of an inverse matrix is ​​introduced only for square matrices whose determinant is nonzero, that is, for non-singular square matrices.

Definition.

Matrixcalled the inverse of a matrix, whose determinant is different from zero if the equalities are true , Where E– unit order matrix n on n.

Finding the inverse matrix using a matrix from algebraic complements.

How to find the inverse matrix for a given one?

First, we need the concepts transposed matrix, matrix minor and algebraic complement of a matrix element.

Definition.

Minorkth order matrices A order m on n is the determinant of the order matrix k on k, which is obtained from the matrix elements A located in the selected k lines and k columns. ( k does not exceed the smallest number m or n).

Minor (n-1)th order, which is composed of elements of all rows except i-th, and all columns except jth, square matrix A order n on n let's denote it as .

In other words, the minor is obtained from a square matrix A order n on n by crossing out elements i-th lines and jth column.

For example, let's write, minor 2nd order, which is obtained from the matrix selecting elements of its second, third rows and first, third columns . We will also show the minor, which is obtained from the matrix by crossing out the second line and third column . Let us illustrate the construction of these minors: and .

Definition.

Algebraic complement element of a square matrix is ​​called minor (n-1)th order, which is obtained from the matrix A, crossing out elements of it i-th lines and jth column multiplied by .

The algebraic complement of an element is denoted as . Thus, .

For example, for the matrix the algebraic complement of an element is .

Secondly, we will need two properties of the determinant, which we discussed in the section calculating the determinant of a matrix:

Based on these properties of the determinant, the definition operations of multiplying a matrix by a number and the concept of an inverse matrix is ​​true: , where is a transposed matrix whose elements are algebraic complements.

Matrix is indeed the inverse of the matrix A, since the equalities are satisfied . Let's show it

Let's compose algorithm for finding the inverse matrix using equality .

Let's look at the algorithm for finding the inverse matrix using an example.

Example.

Given a matrix . Find the inverse matrix.

Solution.

Let's calculate the determinant of the matrix A, decomposing it into the elements of the third column:

The determinant is nonzero, so the matrix A reversible.

Let's find a matrix of algebraic additions:

That's why

Let's transpose the matrix from algebraic additions:

Now we find the inverse matrix as :

Let's check the result:

Equalities are satisfied, therefore, the inverse matrix is ​​found correctly.

Properties of an inverse matrix.

The concept of an inverse matrix, equality , definitions of operations on matrices and properties of the determinant of a matrix make it possible to justify the following properties of inverse matrix:

Finding the elements of the inverse matrix by solving the corresponding systems of linear algebraic equations.

Let's consider another way to find the inverse matrix for a square matrix A order n on n.

This method is based on the solution n systems of linear inhomogeneous algebraic equations with n unknown. The unknown variables in these systems of equations are the elements of the inverse matrix.

The idea is very simple. Let us denote the inverse matrix as X, that is, . Since by definition of the inverse matrix, then

Equating the corresponding elements by columns, we get n systems of linear equations

We solve them in any way and form an inverse matrix from the found values.

Let's look at this method with an example.

Example.

Given a matrix . Find the inverse matrix.

Solution.

Let's accept . Equality gives us three systems of linear inhomogeneous algebraic equations:

We will not describe the solution to these systems; if necessary, refer to the section solving systems of linear algebraic equations.

From the first system of equations we have, from the second - , from the third - . Therefore, the required inverse matrix has the form . We recommend checking it to make sure the result is correct.

Summarize.

We looked at the concept of an inverse matrix, its properties, and three methods for finding it.

Example of solutions using the inverse matrix method

Exercise 1. Solve SLAE using the inverse matrix method. 2 x 1 + 3x 2 + 3x 3 + x 4 = 1 3 x 1 + 5x 2 + 3x 3 + 2x 4 = 2 5 x 1 + 7x 2 + 6x 3 + 2x 4 = 3 4 x 1 + 4x 2 + 3x 3 + x 4 = 4

Beginning of the form

End of form

Solution. Let's write the matrix in the form: Vector B: B T = (1,2,3,4) Main determinant Minor for (1,1): = 5 (6 1-3 2)-7 (3 1-3 2)+4 ( 3 2-6 2) = -3 Minor for (2,1): = 3 (6 1-3 2)-7 (3 1-3 1)+4 (3 2-6 1) = 0 Minor for (3 ,1): = 3 (3 1-3 2)-5 (3 1-3 1)+4 (3 2-3 1) = 3 Minor for (4,1): = 3 (3 2-6 2) -5 (3 2-6 1)+7 (3 2-3 1) = 3 Determinant of minor ∆ = 2 (-3)-3 0+5 3-4 3 = -3

Transposed matrix Algebraic additions ∆ 1,1 = 5 (6 1-2 3)-3 (7 1-2 4)+2 (7 3-6 4) = -3 ∆ 1,2 = -3 (6 1-2 3) -3 (7 1-2 4)+1 (7 3-6 4) = 0 ∆ 1.3 = 3 (3 1-2 3)-3 (5 1-2 4)+1 (5 3-3 4 ) = 3 ∆ 1.4 = -3 (3 2-2 6)-3 (5 2-2 7)+1 (5 6-3 7) = -3 ∆ 2.1 = -3 (6 1-2 3)-3 (5 1-2 4)+2 (5 3-6 4) = 9 ∆ 2.2 = 2 (6 1-2 3)-3 (5 1-2 4)+1 (5 3- 6 4) = 0 ∆ 2.3 = -2 (3 1-2 3)-3 (3 1-2 4)+1 (3 3-3 4) = -6 ∆ 2.4 = 2 (3 2- 2 6)-3 (3 2-2 5)+1 (3 6-3 5) = 3 ∆ 3.1 = 3 (7 1-2 4)-5 (5 1-2 4)+2 (5 4 -7 4) = -4 ∆ 3.2 = -2 (7 1-2 4)-3 (5 1-2 4)+1 (5 4-7 4) = 1 ∆ 3.3 = 2 (5 1 -2 4)-3 (3 1-2 4)+1 (3 4-5 4) = 1 ∆ 3.4 = -2 (5 2-2 7)-3 (3 2-2 5)+1 ( 3 7-5 5) = 0 ∆ 4.1 = -3 (7 3-6 4)-5 (5 3-6 4)+3 (5 4-7 4) = -12 ∆ 4.2 = 2 ( 7 3-6 4)-3 (5 3-6 4)+3 (5 4-7 4) = -3 ∆ 4.3 = -2 (5 3-3 4)-3 (3 3-3 4) +3 (3 4-5 4) = 9 ∆ 4.4 = 2 (5 6-3 7)-3 (3 6-3 5)+3 (3 7-5 5) = -3 Inverse matrix Results vector X X = A -1 ∙ B X T = (2,-1,-0.33,1) x 1 = 2 x 2 = -1 x 3 = -0.33 x 4 = 1

see also solutions of SLAEs using the inverse matrix method online. To do this, enter your data and receive a solution with detailed comments.

Task 2. Write the system of equations in matrix form and solve it using the inverse matrix. Check the resulting solution. Solution:xml:xls

Example 2. Write the system of equations in matrix form and solve using the inverse matrix. Solution:xml:xls

Example. A system of three linear equations with three unknowns is given. Required: 1) find its solution using Cramer formulas; 2) write the system in matrix form and solve it using matrix calculus. Guidelines. After solving by Cramer's method, find the "Solving by inverse matrix method for source data" button. You will receive the appropriate solution. Thus, you will not have to fill in the data again. Solution. Let us denote by A the matrix of coefficients for unknowns; X - matrix-column of unknowns; B - matrix-column of free members:

Vector B: B T =(4,-3,-3) Taking into account these notations, this system of equations takes the following matrix form: A*X = B. If matrix A is non-singular (its determinant is non-zero, then it has an inverse matrix A -1... Multiplying both sides of the equation by A -1, we get: A -1 *A*X = A -1 *B, A -1 *A = E. This equality is called matrix notation of the solution to a system of linear equations. To find a solution to the system of equations, it is necessary to calculate the inverse matrix A -1. The system will have a solution if the determinant of the matrix A is nonzero. Let's find the main determinant. ∆=-1 (-2 (-1)-1 1)-3 (3 (-1)-1 0)+2 (3 1-(-2 0))=14 So, determinant 14 ≠ 0, so we continue solution. To do this, we find the inverse matrix through algebraic additions. Let us have a non-singular matrix A:

We calculate algebraic complements.

∆ 1,1 =(-2 (-1)-1 1)=1

∆ 1,2 =-(3 (-1)-0 1)=3

∆ 1,3 =(3 1-0 (-2))=3

∆ 2,1 =-(3 (-1)-1 2)=5

∆ 2,2 =(-1 (-1)-0 2)=1

∆ 2,3 =-(-1 1-0 3)=1

∆ 3,1 =(3 1-(-2 2))=7

∆ 3,2 =-(-1 1-3 2)=7

X T =(-1,1,2) x 1 = -14 / 14 =-1 x 2 = 14 / 14 =1 x 3 = 28 / 14 =2 Examination. -1 -1+3 1+0 2=4 3 -1+-2 1+1 2=-3 2 -1+1 1+-1 2=-3 doc:xml:xls Answer: -1,1,2.

In order to find the inverse matrix online, you will need to indicate the size of the matrix itself. To do this, click on the “+” or “-” icons until you are satisfied with the number of columns and rows. Next, enter the required elements in the fields. Below is the “Calculate” button - by clicking it, you will receive an answer on the screen with a detailed solution.

In linear algebra, quite often one has to deal with the process of calculating the inverse matrix. It exists only for unexpressed matrices and for square matrices provided that the determinant is nonzero. In principle, calculating it is not particularly difficult, especially if you are dealing with a small matrix. But if you need more complex calculations or a thorough double-check of your decision, it is better to use this online calculator. With its help, you can quickly and accurately solve an inverse matrix.

Using this online calculator, you can make your calculations much easier. In addition, it helps to consolidate the material obtained in theory - it is a kind of simulator for the brain. It should not be considered as a replacement for manual calculations; it can give you much more, making it easier to understand the algorithm itself. Besides, it never hurts to double-check yourself.

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$.

Example No. 2

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

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)$:

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)$.

Let's start by calculating the determinant of the matrix $A$. So, the determinant of the 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:

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)$:

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 by decomposing 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.

Similar to the inverse in many properties.

Encyclopedic YouTube

    1 / 5

    ✪ How to find the inverse of a matrix - bezbotvy

    ✪ Inverse matrix (2 ways to find)

    ✪ Inverse matrix #1

    ✪ 2015-01-28. Inverse 3x3 matrix

    ✪ 2015-01-27. Inverse matrix 2x2

    Subtitles

Properties of an inverse matrix

  • det A − 1 = 1 det A (\displaystyle \det A^(-1)=(\frac (1)(\det A))), Where det (\displaystyle \\det ) denotes the determinant.
  • (A B) − 1 = B − 1 A − 1 (\displaystyle \ (AB)^(-1)=B^(-1)A^(-1)) for two square invertible matrices A (\displaystyle A) And B (\displaystyle B).
  • (A T) − 1 = (A − 1) T (\displaystyle \ (A^(T))^(-1)=(A^(-1))^(T)), Where (. . .) T (\displaystyle (...)^(T)) denotes a transposed matrix.
  • (k A) − 1 = k − 1 A − 1 (\displaystyle \ (kA)^(-1)=k^(-1)A^(-1)) for any coefficient k ≠ 0 (\displaystyle k\not =0).
  • E − 1 = E (\displaystyle \E^(-1)=E).
  • If it is necessary to solve a system of linear equations, (b is a non-zero vector) where x (\displaystyle x) is the desired vector, and if A − 1 (\displaystyle A^(-1)) exists, then x = A − 1 b (\displaystyle x=A^(-1)b). Otherwise, either the dimension of the solution space is greater than zero, or there are no solutions at all.

Methods for finding the inverse matrix

If the matrix is ​​invertible, then to find the inverse matrix you can use one of the following methods:

Exact (direct) methods

Gauss-Jordan method

Let's take two matrices: the A and single E. Let's present the matrix A to the identity matrix using the Gauss-Jordan method, applying transformations along the rows (you can also apply transformations along the columns, but not intermixed). After applying each operation to the first matrix, apply the same operation to the second. When the reduction of the first matrix to unit form is completed, the second matrix will be equal to A−1.

When using the Gaussian method, the first matrix will be multiplied on the left by one of the elementary matrices Λ i (\displaystyle \Lambda _(i))(transvection or diagonal matrix with ones on the main diagonal, except for one position):

Λ 1 ⋅ ⋯ ⋅ Λ n ⋅ A = Λ A = E ⇒ Λ = A − 1 (\displaystyle \Lambda _(1)\cdot \dots \cdot \Lambda _(n)\cdot A=\Lambda A=E \Rightarrow \Lambda =A^(-1)). Λ m = [ 1 … 0 − a 1 m / a m m 0 … 0 … 0 … 1 − a m − 1 m / a m m 0 … 0 0 … 0 1 / a m m 0 … 0 0 … 0 − a m + 1 m / a m m 1 … 0 … 0 … 0 − a n m / a m m 0 … 1 ] (\displaystyle \Lambda _(m)=(\begin(bmatrix)1&\dots &0&-a_(1m)/a_(mm)&0&\dots &0\\ &&&\dots &&&\\0&\dots &1&-a_(m-1m)/a_(mm)&0&\dots &0\\0&\dots &0&1/a_(mm)&0&\dots &0\\0&\dots &0&-a_( m+1m)/a_(mm)&1&\dots &0\\&&&\dots &&&\\0&\dots &0&-a_(nm)/a_(mm)&0&\dots &1\end(bmatrix))).

The second matrix after applying all operations will be equal to Λ (\displaystyle \Lambda), that is, it will be the desired one. Algorithm complexity - O (n 3) (\displaystyle O(n^(3))).

Using the algebraic complement matrix

Matrix inverse of matrix A (\displaystyle A), can be represented in the form

A − 1 = adj (A) det (A) (\displaystyle (A)^(-1)=(((\mbox(adj))(A)) \over (\det(A))))

Where adj (A) (\displaystyle (\mbox(adj))(A))- adjoint matrix;

The complexity of the algorithm depends on the complexity of the algorithm for calculating the determinant O det and is equal to O(n²)·O det.

Using LU/LUP Decomposition

Matrix equation A X = I n (\displaystyle AX=I_(n)) for the inverse matrix X (\displaystyle X) can be considered as a collection n (\displaystyle n) systems of the form A x = b (\displaystyle Ax=b). Let's denote i (\displaystyle i) th column of the matrix X (\displaystyle X) through X i (\displaystyle X_(i)); Then A X i = e i (\displaystyle AX_(i)=e_(i)), i = 1 , … , n (\displaystyle i=1,\ldots ,n),because the i (\displaystyle i) th column of the matrix I n (\displaystyle I_(n)) is the unit vector e i (\displaystyle e_(i)). in other words, finding the inverse matrix comes down to solving n equations with the same matrix and different right-hand sides. After performing the LUP decomposition (O(n³) time), solving each of the n equations takes O(n²) time, so this part of the work also requires O(n³) time.

If the matrix A is non-singular, then the LUP decomposition can be calculated for it P A = L U (\displaystyle PA=LU). Let P A = B (\displaystyle PA=B), B − 1 = D (\displaystyle B^(-1)=D). Then from the properties of the inverse matrix we can write: D = U − 1 L − 1 (\displaystyle D=U^(-1)L^(-1)). If you multiply this equality by U and L, you can get two equalities of the form U D = L − 1 (\displaystyle UD=L^(-1)) And D L = U − 1 (\displaystyle DL=U^(-1)). The first of these equalities is a system of n² linear equations for n (n + 1) 2 (\displaystyle (\frac (n(n+1))(2))) from which the right-hand sides are known (from the properties of triangular matrices). The second also represents a system of n² linear equations for n (n − 1) 2 (\displaystyle (\frac (n(n-1))(2))) from which the right-hand sides are known (also from the properties of triangular matrices). Together they represent a system of n² equalities. Using these equalities, we can recursively determine all n² elements of the matrix D. Then from the equality (PA) −1 = A −1 P −1 = B −1 = D. we obtain the equality A − 1 = D P (\displaystyle A^(-1)=DP).

In the case of using the LU decomposition, no permutation of the columns of the matrix D is required, but the solution may diverge even if the matrix A is nonsingular.

The complexity of the algorithm is O(n³).

Iterative methods

Schultz methods

( Ψ k = E − A U k , U k + 1 = U k ∑ i = 0 n Ψ k i (\displaystyle (\begin(cases)\Psi _(k)=E-AU_(k),\\U_( k+1)=U_(k)\sum _(i=0)^(n)\Psi _(k)^(i)\end(cases)))

Error estimate

Selecting an Initial Approximation

The problem of choosing an initial approximation in the iterative matrix inversion processes considered here does not allow us to treat them as independent universal methods that compete with direct inversion methods based, for example, on the LU decomposition of matrices. There are some recommendations for choosing U 0 (\displaystyle U_(0)), ensuring the fulfillment of the condition ρ (Ψ 0) < 1 {\displaystyle \rho (\Psi _{0})<1} (spectral radius of the matrix is ​​less than unity), which is necessary and sufficient for the convergence of the process. However, in this case, firstly, it is required to know from above the estimate for the spectrum of the invertible matrix A or the matrix A A T (\displaystyle AA^(T))(namely, if A is a symmetric positive definite matrix and ρ (A) ≤ β (\displaystyle \rho (A)\leq \beta ), then you can take U 0 = α E (\displaystyle U_(0)=(\alpha )E), Where ; if A is an arbitrary non-singular matrix and ρ (A A T) ≤ β (\displaystyle \rho (AA^(T))\leq \beta ), then they believe U 0 = α A T (\displaystyle U_(0)=(\alpha )A^(T)), where also α ∈ (0 , 2 β) (\displaystyle \alpha \in \left(0,(\frac (2)(\beta ))\right)); You can, of course, simplify the situation and take advantage of the fact that ρ (A A T) ≤ k A A T k (\displaystyle \rho (AA^(T))\leq (\mathcal (k))AA^(T)(\mathcal (k))), put U 0 = A T ‖ A A T ‖ (\displaystyle U_(0)=(\frac (A^(T))(\|AA^(T)\|)))). Secondly, when specifying the initial matrix in this way, there is no guarantee that ‖ Ψ 0 ‖ (\displaystyle \|\Psi _(0)\|) will be small (perhaps it will even turn out to be ‖ Ψ 0 ‖ > 1 (\displaystyle \|\Psi _(0)\|>1)), and a high order of convergence rate will not be revealed immediately.

Examples

Matrix 2x2

A − 1 = [ a b c d ] − 1 = 1 det (A) [ d − b − c a ] = 1 a d − b c [ d − b − c a ] . (\displaystyle \mathbf (A) ^(-1)=(\begin(bmatrix)a&b\\c&d\\\end(bmatrix))^(-1)=(\frac (1)(\det(\mathbf (A))))(\begin(bmatrix)\,\,\,d&\!\!-b\\-c&\,a\\\end(bmatrix))=(\frac (1)(ad- bc))(\begin(bmatrix)\,\,\,d&\!\!-b\\-c&\,a\\\end(bmatrix)).)

Inversion of a 2x2 matrix is ​​possible only under the condition that a d − b c = det A ≠ 0 (\displaystyle ad-bc=\det A\neq 0).