Solving a system of 3 linear equations using a matrix method. Solving systems of linear equations using an inverse matrix. An example of solving a non-uniform slough

Purpose of the service. Using this online calculator, unknowns (x 1, x 2, ..., x n) are calculated in a system of equations. The decision is carried out method inverse matrix . Wherein:
  • the determinant of the matrix A is calculated;
  • through algebraic additions the inverse matrix A -1 is found;
  • a solution template is created in Excel;
The decision is carried out directly on the website (online) and is free. The calculation results are presented in a report in Word format.

Instructions. To obtain a solution using the inverse matrix method, you need to specify the dimension of the matrix. Next, in a new dialog box, fill in the matrix A and the vector of results B.

Recall that a solution to a system of linear equations is any set of numbers (x 1, x 2, ..., x n), the substitution of which into this system instead of the corresponding unknowns turns each equation of the system into an identity.
Linear system algebraic equations usually written as (for 3 variables): See also Solving matrix equations.

Solution algorithm

  1. The determinant of the matrix A is calculated. If the determinant is zero, then the solution is over. The system has an infinite number of solutions.
  2. When the determinant is different from zero, the inverse matrix A -1 is found through algebraic additions.
  3. The solution vector X =(x 1, x 2, ..., x n) is obtained by multiplying the inverse matrix by the result vector B.

Example No. 1. Find a solution to the system using the matrix method. Let's write the matrix in the form:


Algebraic additions.
A 1,1 = (-1) 1+1
1 2
0 -2
∆ 1,1 = (1 (-2)-0 2) = -2

A 1,2 = (-1) 1+2
3 2
1 -2
∆ 1,2 = -(3 (-2)-1 2) = 8

A 1.3 = (-1) 1+3
3 1
1 0
∆ 1,3 = (3 0-1 1) = -1

A 2,1 = (-1) 2+1
-2 1
0 -2
∆ 2,1 = -(-2 (-2)-0 1) = -4

A 2,2 = (-1) 2+2
2 1
1 -2
∆ 2,2 = (2 (-2)-1 1) = -5

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

A 3.1 = (-1) 3+1
-2 1
1 2
∆ 3,1 = (-2 2-1 1) = -5

A 3.2 = (-1) 3+2
2 1
3 2
∆ 3,2 = -(2 2-3 1) = -1

·
3
-2
-1

X T = (1,0,1)
x 1 = -21 / -21 = 1
x 2 = 0 / -21 = 0
x 3 = -21 / -21 = 1
Examination:
2 1+3 0+1 1 = 3
-2 1+1 0+0 1 = -2
1 1+2 0+-2 1 = -1

Example No. 2. 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

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

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

Example No. 5. A system of three linear equations with three unknowns is given. Required: 1) find its solution using Cramer's 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 - column matrix of unknowns; B - matrix-column of free members:

-1 3 0
3 -2 1
2 1 -1
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 the matrix A is non-degenerate (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, the determinant is 14 ≠ 0, so we continue the solution. To do this, we find the inverse matrix through algebraic additions.
Let us have a non-singular matrix A:
We calculate algebraic complements.
A 1,1 =(-1) 1+1
-2 1
1 -1
∆ 1,1 =(-2 (-1)-1 1)=1
A 1,2 =(-1) 1+2
3 1
0 -1
∆ 1,2 =-(3 (-1)-0 1)=3
A 1.3 =(-1) 1+3
3 -2
0 1
∆ 1,3 =(3 1-0 (-2))=3
A 2,1 =(-1) 2+1
3 2
1 -1
∆ 2,1 =-(3 (-1)-1 2)=5
A 2,2 =(-1) 2+2
-1 2
0 -1
∆ 2,2 =(-1 (-1)-0 2)=1
A 2,3 =(-1) 2+3
-1 3
0 1
∆ 2,3 =-(-1 1-0 3)=1
A 3.1 =(-1) 3+1
3 2
-2 1
∆ 3,1 =(3 1-(-2 2))=7
·
4
-3
-3
X=1/14
-3))
Main determinant
∆=4 (0 1-3 (-2))-2 (1 1-3 (-1))+0 (1 (-2)-0 (-1))=16
Transposed matrix
∆ 1,1 =(0 1-(-2 3))=6
A 1,2 =(-1) 1+2
1 3
-1 1
∆ 1,2 =-(1 1-(-1 3))=-4
A 1.3 =(-1) 1+3
1 0
-1 -2
∆ 1,3 =(1 (-2)-(-1 0))=-2
A 2,1 =(-1) 2+1
2 0
-2 1
∆ 2,1 =-(2 1-(-2 0))=-2
A 2,2 =(-1) 2+2
4 0
-1 1
∆ 2,2 =(4 1-(-1 0))=4
A 2,3 =(-1) 2+3
4 2
-1 -2
∆ 2,3 =-(4 (-2)-(-1 2))=6
A 3.1 =(-1) 3+1
2 0
0 3
∆ 3,1 =(2 3-0 0)=6
A 3.2 =(-1) 3+2
4 0
1 3
∆ 3,2 =-(4 3-1 0)=-12
A 3.3 =(-1) 3+3 1/16
6 -4 -2
-2 4 6
6 -12 -2
E=A*A -1 =
(4 6)+(1 (-2))+(-1 6) (4 (-4))+(1 4)+(-1 (-12)) (4 (-2))+(1 6)+(-1 (-2))
(2 6)+(0 (-2))+(-2 6) (2 (-4))+(0 4)+(-2 (-12)) (2 (-2))+(0 6)+(-2 (-2))
(0 6)+(3 (-2))+(1 6) (0 (-4))+(3 4)+(1 (-12)) (0 (-2))+(3 6)+(1 (-2))

=1/16
16 0 0
0 16 0
0 0 16
A*A -1 =
1 0 0
0 1 0
0 0 1

Example No. 7. Solving matrix equations.
Let's denote:

A=
3 0 5
2 1 4
-1 3 0
Algebraic additions
A 1,1 = (-1) 1+1
1 3
4 0
∆ 1,1 = (1*0 - 4*3) = -12
A 1,2 = (-1) 1+2
0 3
5 0
∆ 1,2 = -(0*0 - 5*3) = 15
A 1.3 = (-1) 1+3
0 1
5 4
∆ 1,3 = (0*4 - 5*1) = -5
A 2,1 = (-1) 2+1
2 -1
4 0
∆ 2,1 = -(2*0 - 4*(-1)) = -4
A 2,2 = (-1) 2+2
3 -1
5 0
∆ 2,2 = (3*0 - 5*(-1)) = 5
A 2,3 = (-1) 2+3
3 2
5 4
∆ 2,3 = -(3*4 - 5*2) = -2
A 3.1 = (-1) 3+1
2 -1
1 3
∆ 3,1 = (2*3 - 1*(-1)) = 7
· 1/-1
-12 15 -5
-4 5 -2
7 -9 3
= Vector B:
B T =(31,13,10)

X T =(4.05,6.13,7.54)
x 1 = 158 / 39 =4.05
x 2 = 239 / 39 =6.13
x 3 = 294 / 39 =7.54
Examination.
-2 4.05+-1 6.13+6 7.54=31
1 4.05+-1 6.13+2 7.54=13
2 4.05+4 6.13+-3 7.54=10

Example No. 9. Let us denote by A the matrix of coefficients for unknowns; X - column matrix of unknowns; B - matrix-column of free members:

-2 1 6
1 -1 2
2 4 -3
Vector B:
B T =(31,13,10)

X T =(5.21,4.51,6.15)
x 1 = 276 / 53 =5.21
x 2 = 239 / 53 =4.51
x 3 = 326 / 53 =6.15
Examination.
-2 5.21+1 4.51+6 6.15=31
1 5.21+-1 4.51+2 6.15=13
2 5.21+4 4.51+-3 6.15=10

Example No. 10. Solving matrix equations.
Let's denote:

Algebraic additions
A 11 = (-1) 1+1 ·-3 = -3; A 12 = (-1) 1+2 ·3 = -3; A 21 = (-1) 2+1 ·1 = -1; A 22 = (-1) 2+2 ·2 = 2;
Inverse matrix A -1 .
· 1/-9
-3 -3
-1 2
=
1 -2
1 1
Answer:
X =
1 -2
1 1

In this article we will talk about the matrix method for solving a system of linear algebraic equations, find its definition and give examples of solutions.

Definition 1

Inverse matrix method is a method used to solve SLAEs if the number of unknowns is equal to the number of equations.

Example 1

Find a solution to a system of n linear equations with n unknowns:

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

Matrix recording type : A × X = B

where A = a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋯ ⋯ ⋯ ⋯ a n 1 a n 2 ⋯ a n n is the matrix of the system.

X = x 1 x 2 ⋮ x n - column of unknowns,

B = b 1 b 2 ⋮ b n - column of free coefficients.

From the equation we received, it is necessary to express X. To do this, you need to multiply both sides of the matrix equation on the left by A - 1:

A - 1 × A × X = A - 1 × B.

Since A - 1 × A = E, then E × X = A - 1 × B or X = A - 1 × B.

Comment

The inverse matrix to matrix A has the right to exist only if the condition d e t A is not equal to zero is satisfied. Therefore, when solving SLAEs using the inverse matrix method, first of all, d e t A is found.

In the event that d e t A is not equal to zero, the system has only one solution option: using the inverse matrix method. If d e t A = 0, then the system cannot be solved by this method.

An example of solving a system of linear equations using the inverse matrix method

Example 2

We solve the SLAE using the inverse matrix method:

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

How to solve?

  • We write the system in the form of a matrix equation A X = B, where

A = 2 - 4 3 1 - 2 4 3 - 1 5, X = x 1 x 2 x 3, B = 1 3 2.

  • We express X from this equation:
  • Find the determinant of matrix A:

d e t A = 2 - 4 3 1 - 2 4 3 - 1 5 = 2 × (- 2) × 5 + 3 × (- 4) × 4 + 3 × (- 1) × 1 - 3 × (- 2) × 3 - - 1 × (- 4) × 5 - 2 × 4 - (- 1) = - 20 - 48 - 3 + 18 + 20 + 8 = - 25

d e t A does not equal 0, therefore the inverse matrix solution method is suitable for this system.

  • We find the inverse matrix A - 1 using the allied matrix. We calculate the algebraic complements A i j to the corresponding elements of the matrix A:

A 11 = (- 1) (1 + 1) - 2 4 - 1 5 = - 10 + 4 = - 6,

A 12 = (- 1) 1 + 2 1 4 3 5 = - (5 - 12) = 7,

A 13 = (- 1) 1 + 3 1 - 2 3 - 1 = - 1 + 6 = 5,

A 21 = (- 1) 2 + 1 - 4 3 - 1 5 = - (- 20 + 3) = 17,

A 22 = (- 1) 2 + 2 2 3 3 5 - 10 - 9 = 1,

A 23 = (- 1) 2 + 3 2 - 4 3 - 1 = - (- 2 + 12) = - 10,

A 31 = (- 1) 3 + 1 - 4 3 - 2 4 = - 16 + 6 = - 10,

A 32 = (- 1) 3 + 2 2 3 1 4 = - (8 - 3) = - 5,

A 33 = (- 1) 3 + 3 2 - 4 1 - 2 = - 4 + 4 = 0.

  • We write down the allied matrix A *, which is composed of algebraic complements of the matrix A:

A * = - 6 7 5 17 1 - 10 - 10 - 5 0

  • We write the inverse matrix according to the formula:

A - 1 = 1 d e t A (A *) T: A - 1 = - 1 25 - 6 17 - 10 7 1 - 5 5 - 10 0 ,

  • We multiply the inverse matrix A - 1 by the column of free terms B and obtain a solution to the system:

X = A - 1 × B = - 1 25 - 6 17 - 10 7 1 - 5 5 - 10 0 1 3 2 = - 1 25 - 6 + 51 - 20 7 + 3 - 10 5 - 30 + 0 = - 1 0 1

Answer : x 1 = - 1 ; x 2 = 0 ; x 3 = 1

If you notice an error in the text, please highlight it and press Ctrl+Enter

Inverse matrix method is not difficult if you know general principles work with matrix equations and, of course, be able to perform elementary algebraic operations.

Solving a system of equations using the inverse matrix method. Example.

The most convenient way to understand the inverse matrix method is with a clear example. Let's take a system of equations:

The first step to solve this system of equations is to find the determinant. Therefore, we transform our system of equations into the following matrix:

And we find the necessary determinant:

The formula used to solve matrix equations is as follows:

Thus, to calculate X, we need to determine the value of the matrix A-1 and multiply it by b. Another formula will help us with this:

At in this case it will be transposed matrix- that is, the same original one, but written not in rows, but in columns.

We should not forget that inverse matrix method, like Cramer's method, is only suitable for systems in which the determinant is greater or less than zero. If the determinant is equal to zero, you need to use the Gaussian method.

The next step is to compile a matrix of minors, which is the following scheme:

As a result, we received three matrices - minors, algebraic additions and a transposed matrix of algebraic additions. Now you can proceed to the actual compilation of the inverse matrix. We already know the formula. For our example it will look like this.

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

We will assume that the main matrix non-degenerate. Then, by Theorem 3.1, there exists an inverse matrix
Multiplying the matrix equation
to the matrix
on the left, using Definition 3.2, as well as statement 8) of Theorem 1.1, we obtain the formula on which the matrix method for solving systems of linear equations is based:

Comment. Note that the matrix method for solving systems of linear equations, in contrast to the Gauss method, has limited application: this method can only solve systems of linear equations for which, firstly, the number of unknowns is equal to the number of equations, and secondly, the main matrix is ​​non-singular .

Example. Solve a system of linear equations using the matrix method.

A system of three linear equations with three unknowns is given
Where

The main matrix of the system of equations is non-singular, since its determinant is non-zero:

Inverse matrix
Let's compose using one of the methods described in paragraph 3.

Using the formula of the matrix method for solving systems of linear equations, we obtain

5.3. Cramer method

This method, like the matrix method, is applicable only for systems of linear equations in which the number of unknowns coincides with the number of equations. Cramer's method is based on the theorem of the same name:

Theorem 5.2. System linear equations with unknown

whose main matrix is ​​non-singular, has a unique solution that can be obtained using the formulas

Where
determinant of a matrix derived from the base matrix system of equations by replacing it
th column with a column of free members.

Example. Let's find the solution to the system of linear equations considered in the previous example using Cramer's method. The main matrix of the system of equations is non-degenerate, since
Let's calculate the determinants



Using the formulas presented in Theorem 5.2, we calculate the values ​​of the unknowns:

6. Study of systems of linear equations.

Basic solution

To study a system of linear equations means to determine whether this system is compatible or incompatible, and if it is compatible, to find out whether this system is definite or indefinite.

The compatibility condition for a system of linear equations is given by the following theorem

Theorem 6.1 (Kronecker–Capelli).

A system of linear equations is consistent if and only if the rank of the main matrix of the system is equal to the rank of its extended matrix:

For a simultaneous system of linear equations, the question of its definiteness or uncertainty is solved using the following theorems.

Theorem 6.2. If the rank of the main matrix of a joint system is equal to the number of unknowns, then the system is definite

Theorem 6.3. If the rank of the main matrix of a joint system is less than the number of unknowns, then the system is uncertain.

Thus, from the formulated theorems follows a method for studying systems of linear algebraic equations. Let n– number of unknowns,

Then:


Definition 6.1. The basic solution of an indefinite system of linear equations is a solution in which all free unknowns are equal to zero.

Example. Explore a system of linear equations. If the system is uncertain, find its basic solution.

Let's calculate the ranks of the main and extended matrices of this system of equations, for which we bring the extended (and at the same time the main) matrix of the system to a stepwise form:

Add the second row of the matrix to its first row, multiplied by third line - with the first line multiplied by
and the fourth line - with the first, multiplied by we get a matrix

To the third row of this matrix we add the second row multiplied by
and to the fourth line – the first, multiplied by
As a result, we get the matrix

removing the third and fourth rows from which we get a step matrix

Thus,

Consequently, this system of linear equations is consistent, and since the rank value is less than the number of unknowns, the system is uncertain. The step matrix obtained as a result of elementary transformations corresponds to the system of equations

Unknown And are the main ones, and the unknowns And
free. By assigning zero values ​​to the free unknowns, we obtain a basic solution to this system of linear equations.

The online calculator solves a system of linear equations using the matrix method. It is given very detailed solution. 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.

×

Warning

Clear all cells?

Close Clear

Data entry instructions. Numbers are entered as integers (examples: 487, 5, -7623, etc.), decimals (ex. 67., 102.54, etc.) or fractions. The fraction must be entered in the form a/b, where a and b are integers or decimals. 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:

Given the definition of an inverse matrix, we have A −1 A=E, Where E- identity matrix. Therefore (4) can be written as follows:

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

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

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

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

Let's exclude the elements of the 1st column of the matrix below the main diagonal. To do this, add lines 2,3 with line 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 line 1 with line 2 multiplied by -3/17:

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

Matrix form of writing a system of linear equations: Ax=b, Where

Let's calculate all algebraic complements of the matrix A:

,
,
,
,
,

Where A ij − algebraic complement of a matrix element A, located at the intersection i-th line and j-th column, and Δ is the determinant of the matrix A.

Using the inverse matrix formula, we get: