Matrix method definition. Solving systems of linear equations using an inverse matrix

(sometimes this method is also called matrix method or the inverse matrix method) requires prior familiarization with such a concept as the matrix form of writing SLAE. The inverse matrix method is designed to solve those systems of linear algebraic equations, for which the determinant of the matrix of the system is different from zero. Naturally, this implies that the matrix of the system is square (the concept of a determinant exists only for square matrices). The essence of the inverse matrix method can be expressed in three points:

  1. Write down three matrices: the system matrix $A$, the matrix of unknowns $X$, the matrix of free terms $B$.
  2. Find the inverse matrix $A^(-1)$.
  3. Using the equality $X=A^(-1)\cdot B$ get the solution of the given SLAE.

Any SLAE can be written in matrix form as $A\cdot X=B$, where $A$ is the matrix of the system, $B$ is the matrix of free terms, $X$ is the matrix of unknowns. Let the matrix $A^(-1)$ exist. Multiply both sides of the equality $A\cdot X=B$ by the matrix $A^(-1)$ on the left:

$$A^(-1)\cdot A\cdot X=A^(-1)\cdot B.$$

Since $A^(-1)\cdot A=E$ ($E$ - identity matrix), then the equation written above becomes:

$$E\cdot X=A^(-1)\cdot B.$$

Since $E\cdot X=X$, then:

$$X=A^(-1)\cdot B.$$

Example #1

Solve the SLAE $ \left \( \begin(aligned) & -5x_1+7x_2=29;\\ & 9x_1+8x_2=-11. \end(aligned) \right.$ using the inverse matrix.

$$ A=\left(\begin(array) (cc) -5 & 7\\ 9 & 8 \end(array)\right);\; B=\left(\begin(array) (c) 29\\ -11 \end(array)\right);\; X=\left(\begin(array) (c) x_1\\ x_2 \end(array)\right). $$

Let's find the inverse matrix to the matrix of the system, i.e. calculate $A^(-1)$. In example #2

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

Now let's substitute all three matrices ($X$, $A^(-1)$, $B$) into the equation $X=A^(-1)\cdot B$. Then we perform matrix multiplication

$$ \left(\begin(array) (c) x_1\\ x_2 \end(array)\right)= -\frac(1)(103)\cdot\left(\begin(array)(cc) 8 & -7\\ -9 & -5\end(array)\right)\cdot \left(\begin(array) (c) 29\\ -11 \end(array)\right)=\\ =-\frac (1)(103)\cdot \left(\begin(array) (c) 8\cdot 29+(-7)\cdot (-11)\\ -9\cdot 29+(-5)\cdot (- 11) \end(array)\right)= -\frac(1)(103)\cdot \left(\begin(array) (c) 309\\ -206 \end(array)\right)=\left( \begin(array) (c) -3\\ 2\end(array)\right). $$

So we got $\left(\begin(array) (c) x_1\\ x_2 \end(array)\right)=\left(\begin(array) (c) -3\\ 2\end(array )\right)$. From this equality we have: $x_1=-3$, $x_2=2$.

Answer: $x_1=-3$, $x_2=2$.

Example #2

Solve SLAE $ \left\(\begin(aligned) & x_1+7x_2+3x_3=-1;\\ & -4x_1+9x_2+4x_3=0;\\ & 3x_2+2x_3=6. \end(aligned)\right .$ by the inverse matrix method.

Let us write down the matrix of the system $A$, the matrix of free terms $B$ and the matrix of unknowns $X$.

$$ A=\left(\begin(array) (ccc) 1 & 7 & 3\\ -4 & 9 & 4 \\0 & 3 & 2\end(array)\right);\; B=\left(\begin(array) (c) -1\\0\\6\end(array)\right);\; X=\left(\begin(array) (c) x_1\\ x_2 \\ x_3 \end(array)\right). $$

Now it's time to find the inverse matrix of the system matrix, i.e. find $A^(-1)$. In example #3 on the page dedicated to finding inverse matrices, inverse matrix has already been found. Let's use the finished result and write $A^(-1)$:

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

Now we substitute all three matrices ($X$, $A^(-1)$, $B$) into the equality $X=A^(-1)\cdot B$, after which we perform matrix multiplication on the right side of this equality.

$$ \left(\begin(array) (c) x_1\\ x_2 \\ x_3 \end(array)\right)= \frac(1)(26)\cdot \left(\begin(array) (ccc) 6 & -5 & 1 \\ 8 & 2 & -16 \\ -12 & -3 & 37\end(array) \right)\cdot \left(\begin(array) (c) -1\\0\ \6\end(array)\right)=\\ =\frac(1)(26)\cdot \left(\begin(array) (c) 6\cdot(-1)+(-5)\cdot 0 +1\cdot 6 \\ 8\cdot (-1)+2\cdot 0+(-16)\cdot 6 \\ -12\cdot (-1)+(-3)\cdot 0+37\cdot 6 \end(array)\right)=\frac(1)(26)\cdot \left(\begin(array) (c) 0\\-104\\234\end(array)\right)=\left( \begin(array) (c) 0\\-4\\9\end(array)\right) $$

So we got $\left(\begin(array) (c) x_1\\ x_2 \\ x_3 \end(array)\right)=\left(\begin(array) (c) 0\\-4\ \9\end(array)\right)$. From this equality we have: $x_1=0$, $x_2=-4$, $x_3=9$.

Consider system of linear algebraic equations(SLOW) regarding n unknown x 1 , x 2 , ..., x n :

This system in a "folded" form can be written as follows:

S n i=1 a ij x j = b i , i=1,2, ..., n.

In accordance with the rule of matrix multiplication, the considered system linear equations can be written in matrix form ax=b, where

, ,.

Matrix A, whose columns are the coefficients for the corresponding unknowns, and the rows are the coefficients for the unknowns in the corresponding equation is called system matrix. column matrix b, whose elements are the right parts of the equations of the system, is called the matrix of the right part or simply right side of the system. column matrix x , whose elements are unknown unknowns, is called system solution.

The system of linear algebraic equations written as ax=b, is an matrix equation.

If the matrix of the system non-degenerate, then it has an inverse matrix, and then the solution to the system ax=b is given by the formula:

x=A -1 b.

Example Solve the system matrix method.

Decision find the inverse matrix for the coefficient matrix of the system

Calculate the determinant by expanding over the first row:

Because the Δ ≠ 0 , then A -1 exist.

The inverse matrix is ​​found correctly.

Let's find a solution to the system

Consequently, x 1 = 1, x 2 = 2, x 3 = 3 .

Examination:

7. The Kronecker-Capelli theorem on the compatibility of a system of linear algebraic equations.

System of linear equations looks like:

a 21 x 1 + a 22 x 2 +... + a 2n x n = b 2 , (5.1)

a m1 x 1 + a m1 x 2 +... + a mn x n = b m .

Here a i j and b i (i = ; j = ) are given, and x j are unknown real numbers. Using the concept of a product of matrices, we can rewrite system (5.1) in the form:

where A = (a i j) is the matrix consisting of the coefficients of the unknowns of the system (5.1), which is called system matrix, X = (x 1 , x 2 ,..., x n) T , B = (b 1 , b 2 ,..., b m) T - column vectors composed respectively of unknown x j and free terms b i .

Ordered collection n real numbers (c 1 , c 2 ,..., c n) is called system solution(5.1) if as a result of substitution of these numbers instead of the corresponding variables x 1 , x 2 ,..., x n each equation of the system turns into an arithmetic identity; in other words, if there exists a vector C= (c 1 , c 2 ,..., c n) T such that AC  B.

System (5.1) is called joint, or solvable if it has at least one solution. The system is called incompatible, or insoluble if it has no solutions.

,

formed by assigning a column of free terms to the matrix A on the right, is called extended matrix system.

The question of the compatibility of system (5.1) is solved by the following theorem.

Kronecker-Capelli theorem . The system of linear equations is consistent if and only if the ranks of the matrices A and A coincide, i.e. r(A) = r(A) = r.

For the set M of solutions to system (5.1), there are three possibilities:

1) M =  (in this case the system is inconsistent);

2) M consists of one element, i.e. the system has only decision(in this case the system is called certain);

3) M consists of more than one element (then the system is called uncertain). In the third case, system (5.1) has an infinite number of solutions.

The system has a unique solution only if r(A) = n. In this case, the number of equations is not less than the number of unknowns (mn); if m>n, then m-n equations are consequences of the others. If 0

To solve an arbitrary system of linear equations, one must be able to solve systems in which the number of equations is equal to the number of unknowns, the so-called Cramer type systems:

a 11 x 1 + a 12 x 2 +... + a 1n x n = b 1 ,

a 21 x 1 + a 22 x 2 +... + a 2n x n = b 2 , (5.3)

... ... ... ... ... ...

a n1 x 1 + a n1 x 2 +... + a nn x n = b n .

Systems (5.3) are solved in one of the following ways: 1) by the Gauss method, or by the method of eliminating unknowns; 2) according to Cramer's formulas; 3) by the matrix method.

Example 2.12. Investigate the system of equations and solve it if it is compatible:

5x 1 - x 2 + 2x 3 + x 4 = 7,

2x1 + x2 + 4x3 - 2x4 = 1,

x 1 - 3x 2 - 6x 3 + 5x 4 = 0.

Decision. We write out the extended matrix of the system:

.

Let us calculate the rank of the main matrix of the system. It is obvious that, for example, the second-order minor in the upper left corner = 7  0; the third-order minors containing it are equal to zero:

Therefore, the rank of the main matrix of the system is 2, i.e. r(A) = 2. To calculate the rank of the extended matrix A, consider the bordering minor

hence, the rank of the extended matrix is ​​r(A) = 3. Since r(A)  r(A), the system is inconsistent.

Equations in general, linear algebraic equations and their systems, as well as methods for solving them, occupy a special place in mathematics, both theoretical and applied.

This is due to the fact that the vast majority of physical, economic, technical and even pedagogical problems can be described and solved using a variety of equations and their systems. Recently, mathematical modeling has gained particular popularity among researchers, scientists and practitioners in almost all subject areas, which is explained by its obvious advantages over other well-known and proven methods for studying objects of various nature, in particular, the so-called complex systems. There is a great variety of different definitions of a mathematical model given by scientists at different times, but in our opinion, the most successful is the following statement. A mathematical model is an idea expressed by an equation. Thus, the ability to compose and solve equations and their systems is an integral characteristic of a modern specialist.

To solve systems of linear algebraic equations, the most commonly used methods are: Cramer, Jordan-Gauss and the matrix method.

Matrix solution method - a method of solving systems of linear algebraic equations with a non-zero determinant using an inverse matrix.

If we write out the coefficients for unknown values ​​xi into the matrix A, collect the unknown values ​​into the column X vector, and the free terms into the column B vector, then the system of linear algebraic equations can be written in the form of the following matrix equation A X = B, which has a unique solution only when the determinant of the matrix A is not equal to zero. In this case, the solution of the system of equations can be found in the following way X = A-one · B, where A-1 - inverse matrix.

The matrix solution method is as follows.

Let a system of linear equations be given with n unknown:

It can be rewritten in matrix form: AX = B, where A- the main matrix of the system, B and X- columns of free members and solutions of the system, respectively:

Multiply this matrix equation on the left by A-1 - matrix inverse to matrix A: A -1 (AX) = A -1 B

Because A -1 A = E, we get X= A -1 B. The right hand side of this equation will give a column of solutions to the original system. The condition for the applicability of this method (as well as the general existence of a solution to an inhomogeneous system of linear equations with the number of equations equal to the number of unknowns) is the nondegeneracy of the matrix A. A necessary and sufficient condition for this is that the determinant of the matrix A: det A≠ 0.

For a homogeneous system of linear equations, that is, when the vector B = 0 , indeed the opposite rule: the system AX = 0 has a non-trivial (that is, non-zero) solution only if det A= 0. Such a connection between the solutions of homogeneous and inhomogeneous systems of linear equations is called the Fredholm alternative.

Example solutions of an inhomogeneous system of linear algebraic equations.

Let us make sure that the determinant of the matrix, composed of the coefficients of the unknowns of the system of linear algebraic equations, is not equal to zero.

The next step is to calculate the algebraic complements for the elements of the matrix consisting of the coefficients of the unknowns. They will be needed to find the inverse matrix.

This online calculator solves a system of linear equations using the matrix method. A very detailed solution is given. To solve a system of linear equations, select the number of variables. Choose a method for calculating the inverse matrix. Then enter the data in the cells and click on the "Calculate" button.

×

A warning

Clear all cells?

Close Clear

Data entry instruction. Numbers are entered as whole numbers (examples: 487, 5, -7623, etc.), decimal numbers (eg. 67., 102.54, etc.) or fractions. The fraction must be typed as a/b, where a and b are whole or decimal numbers. Examples 45/5, 6.6/76.4, -7/6.7, etc.

Matrix method for solving systems of linear equations

Consider the following system of linear equations:

Taking into account the definition of the inverse matrix, we have A −1 A=E, where E is the identity matrix. Therefore, (4) can be written as follows:

Thus, to solve the system of linear equations (1) (or (2)), it suffices to multiply the inverse to A matrix per constraint vector b.

Examples of solving a system of linear equations by the matrix method

Example 1. Solve the following system of linear equations using the matrix method:

Let's find the inverse to the matrix A by the Jordan-Gauss method. On the right side of the matrix A write the identity matrix:

Let's exclude the elements of the 1st column of the matrix below the main diagonal. To do this, add rows 2,3 with row 1, multiplied by -1/3, -1/3, respectively:

Let's exclude the elements of the 2nd column of the matrix below the main diagonal. To do this, add line 3 with line 2 multiplied by -24/51:

Let's exclude the elements of the 2nd column of the matrix above the main diagonal. To do this, add row 1 with row 2, multiplied by -3/17:

Separate the right side of the matrix. The resulting matrix is ​​the inverse of A :

Matrix form of writing a system of linear equations: ax=b, where

Compute all algebraic complements of the matrix A:

,
,
,
,
,
,
,
,
.

The inverse matrix is ​​calculated from the following expression.

Equations in general, linear algebraic equations and their systems, as well as methods for solving them, occupy a special place in mathematics, both theoretical and applied.

This is due to the fact that the vast majority of physical, economic, technical and even pedagogical problems can be described and solved using a variety of equations and their systems. Recently, mathematical modeling has gained particular popularity among researchers, scientists and practitioners in almost all subject areas, which is explained by its obvious advantages over other well-known and proven methods for studying objects of various nature, in particular, the so-called complex systems. There is a great variety of different definitions of a mathematical model given by scientists at different times, but in our opinion, the most successful is the following statement. A mathematical model is an idea expressed by an equation. Thus, the ability to compose and solve equations and their systems is an integral characteristic of a modern specialist.

To solve systems of linear algebraic equations, the most commonly used methods are: Cramer, Jordan-Gauss and the matrix method.

Matrix solution method - a method of solving systems of linear algebraic equations with a non-zero determinant using an inverse matrix.

If we write out the coefficients for unknown values ​​xi into the matrix A, collect the unknown values ​​into the column X vector, and the free terms into the column B vector, then the system of linear algebraic equations can be written in the form of the following matrix equation A X = B, which has a unique solution only when the determinant of the matrix A is not equal to zero. In this case, the solution of the system of equations can be found in the following way X = A-one · B, where A-1 - inverse matrix.

The matrix solution method is as follows.

Let a system of linear equations be given with n unknown:

It can be rewritten in matrix form: AX = B, where A- the main matrix of the system, B and X- columns of free members and solutions of the system, respectively:

Multiply this matrix equation on the left by A-1 - matrix inverse to matrix A: A -1 (AX) = A -1 B

Because A -1 A = E, we get X= A -1 B. The right hand side of this equation will give a column of solutions to the original system. The condition for the applicability of this method (as well as the general existence of a solution to an inhomogeneous system of linear equations with the number of equations equal to the number of unknowns) is the nondegeneracy of the matrix A. A necessary and sufficient condition for this is that the determinant of the matrix A: det A≠ 0.

For a homogeneous system of linear equations, that is, when the vector B = 0 , indeed the opposite rule: the system AX = 0 has a non-trivial (that is, non-zero) solution only if det A= 0. Such a connection between the solutions of homogeneous and inhomogeneous systems of linear equations is called the Fredholm alternative.

Example solutions of an inhomogeneous system of linear algebraic equations.

Let us make sure that the determinant of the matrix, composed of the coefficients of the unknowns of the system of linear algebraic equations, is not equal to zero.

The next step is to calculate the algebraic complements for the elements of the matrix consisting of the coefficients of the unknowns. They will be needed to find the inverse matrix.