Solving the system in a matrix way. Solving systems of linear equations by the matrix method

(sometimes this method is also called the 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 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$ is the identity matrix), then the equality 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, the 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$.

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. IN Lately mathematical modeling has become especially popular 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 method solutions - 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-1 · 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 for the existence of a solution in general heterogeneous system linear equations with the number of equations equal to the number of unknowns) is the nondegeneracy of the matrix A. Necessary and sufficient condition this is the inequality zero of 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.

Matrix method for solving systems of linear equations

Consider a system of linear equations of the following form:

$\left\(\begin(array)(c) (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) ) \\ (...) \\ (a_ (n1) x_(1) +a_(n2) x_(2) +...+a_(nn) x_(n) =b_(n) ) \end(array)\right. .$

The numbers $a_(ij) (i=1..n,j=1..n)$ are the coefficients of the system, the numbers $b_(i) (i=1..n)$ are the free terms.

Definition 1

In the case when all free terms are equal to zero, the system is called homogeneous, otherwise - inhomogeneous.

Each SLAE can be associated with several matrices and the system can be written in the so-called matrix form.

Definition 2

The coefficient matrix of a system is called the system matrix and is usually denoted by the letter $A$.

The column of free members forms a column vector, which is usually denoted by the letter $B$ and is called the matrix of free members.

The unknown variables form a column vector, which, as a rule, is denoted by the letter $X$ and is called the matrix of unknowns.

The matrices described above are:

$A=\left(\begin(array)(cccc) (a_(11) ) & (a_(12) ) & (...) & (a_(1n) ) \\ (a_(21) ) & ( a_(22) ) & (...) & (a_(2n) ) \\ (...) & (...) & (...) & (...) \\ (a_(n1) ) & (a_(n2) ) & (...) & (a_(nn) ) \end(array)\right),B=\left(\begin(array)(c) (b_(1) ) \ \ (b_(2) ) \\ (...) \\ (b_(n) ) \end(array)\right),X=\left(\begin(array)(c) (x_(1) ) \\ (x_(2) ) \\ (...) \\ (x_(n) ) \end(array)\right).$

Using matrices, SLAE can be rewritten as $A\cdot X=B$. Such a notation is often called a matrix equation.

Generally speaking, any SLAE can be written in matrix form.

Examples of solving a system using an inverse matrix

Example 1

Dana SLAE: $\left\(\begin(array)(c) (3x_(1) -2x_(2) +x_(3) -x_(4) =3) \\ (x_(1) -12x_(2 ) -x_(3) -x_(4) =7) \\ (2x_(1) -3x_(2) +x_(3) -3x_(4) =5) \end(array)\right.$.Write system in matrix form.

Solution:

$A=\left(\begin(array)(cccc) (3) & (-2) & (1) & (-1) \\ (1) & (-12) & (-1) & (-1 ) \\ (2) & (-3) & (1) & (-3) \end(array)\right),B=\left(\begin(array)(c) (3) \\ (7) \\ (5) \end(array)\right),X=\left(\begin(array)(c) (x_(1) ) \\ (x_(2) ) \\ (x_(3) ) \ end(array)\right).$

$\left(\begin(array)(cccc) (3) & (-2) & (1) & (-1) \\ (1) & (-12) & (-1) & (-1) \ \ (2) & (-3) & (1) & (-3) \end(array)\right)\cdot \left(\begin(array)(c) (x_(1) ) \\ (x_( 2) ) \\ (x_(3) ) \end(array)\right)=\left(\begin(array)(c) (3) \\ (7) \\ (5) \end(array)\ right)$

In the case when the matrix of the system is square, the SLAE can solve the equations in a matrix way.

Given the matrix equation $A\cdot X=B$, we can express $X$ from it in the following way:

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

$A^(-1) \cdot A=E$ (matrix product property)

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

$E\cdot X=X$ (matrix product property)

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

Algorithm for solving a system of algebraic equations using an inverse matrix:

  • write the system in matrix form;
  • calculate the determinant of the matrix of the system;
  • if the determinant of the system matrix is ​​nonzero, then we find the inverse matrix;
  • the solution of the system is calculated by the formula $X=A^(-1) \cdot B$.

If the system matrix has a determinant that is not equal to zero, then this system has a unique solution that can be found in a matrix way.

If the matrix of the system has a determinant equal to zero, then this system cannot be solved by the matrix method.

Example 2

Dana SLAE: $\left\(\begin(array)(c) (x_(1) +3x_(3) =26) \\ (-x_(1) +2x_(2) +x_(3) =52) \\ (3x_(1) +2x_(2) =52) \end(array)\right.$ Solve the SLAE using the inverse matrix method, if possible.

Solution:

$A=\left(\begin(array)(ccc) (1) & (0) & (3) \\ (-1) & (2) & (1) \\ (3) & (2) & ( 0) \end(array)\right),B=\left(\begin(array)(c) (26) \\ (52) \\ (52) \end(array)\right),X=\left (\begin(array)(c) (x_(1) ) \\ (x_(2) ) \\ (x_(3) ) \end(array)\right). $

Finding the determinant of the matrix of the system:

$\begin(array)(l) (\det A=\left|\begin(array)(ccc) (1) & (0) & (3) \\ (-1) & (2) & (1) \\ (3) & (2) & (0) \end(array)\right|=1\cdot 2\cdot 0+0\cdot 1\cdot 3+2\cdot (-1)\cdot 3-3 \cdot 2\cdot 3-2\cdot 1\cdot 1-0\cdot (-1)\cdot 0=0+0-6-18-2-0=-26\ne 0) \end(array)$ Since the determinant is not equal to zero, the matrix of the system has an inverse matrix and, therefore, the system of equations can be solved by the inverse matrix method. The resulting solution will be unique.

We solve the system of equations using the inverse matrix:

$A_(11) =(-1)^(1+1) \cdot \left|\begin(array)(cc) (2) & (1) \\ (2) & (0) \end(array) \right|=0-2=-2; A_(12) =(-1)^(1+2) \cdot \left|\begin(array)(cc) (-1) & (1) \\ (3) & (0) \end(array) \right|=-(0-3)=3;$

$A_(13) =(-1)^(1+3) \cdot \left|\begin(array)(cc) (-1) & (2) \\ (3) & (2) \end(array )\right|=-2-6=-8; A_(21) =(-1)^(2+1) \cdot \left|\begin(array)(cc) (0) & (3) \\ (2) & (0) \end(array)\ right|=-(0-6)=6; $

$A_(22) =(-1)^(2+2) \cdot \left|\begin(array)(cc) (1) & (3) \\ (3) & (0) \end(array) \right|=0-9=-9; A_(23) =(-1)^(2+3) \cdot \left|\begin(array)(cc) (1) & (0) \\ (3) & (2) \end(array)\ right|=-(2-0)=-2;$

$A_(31) =(-1)^(3+1) \cdot \left|\begin(array)(cc) (0) & (3) \\ (2) & (1) \end(array) \right|=0-6=-6; A_(32) =(-1)^(3+2) \cdot \left|\begin(array)(cc) (1) & (3) \\ (-1) & (1) \end(array) \right|=-(1+3)=-4;$

$A_(33) =(-1)^(3+3) \cdot \left|\begin(array)(cc) (1) & (0) \\ (-1) & (2) \end(array )\right|=2-0=2$

The desired inverse matrix:

$A^(-1) =\frac(1)(-26) \cdot \left(\begin(array)(ccc) (-2) & (6) & (-6) \\ (3) & ( -9) & (-4) \\ (-8) & (-2) & (2) \end(array)\right)=\frac(1)(26) \cdot \left(\begin(array) (ccc) (2) & (-6) & (6) \\ (-3) & (9) & (4) \\ (8) & (2) & (-2) \end(array)\right )=\left(\begin(array)(ccc) (\frac(2)(26) ) & (\frac(-6)(26) ) & (\frac(6)(26) ) \\ (\ frac(-3)(26) ) & (\frac(9)(26) ) & (\frac(4)(26) ) \\ (\frac(8)(26) ) & (\frac(2) (26) ) & (\frac(-2)(26) ) \end(array)\right)=\left(\begin(array)(ccc) (\frac(1)(13) ) & (-\ frac(3)(13) ) & (\frac(3)(13) ) \\ (-\frac(3)(26) ) & (\frac(9)(26) ) & (\frac(2) (13) ) \\ (\frac(4)(13) ) & (\frac(1)(13) ) & (-\frac(1)(13) ) \end(array)\right).$

Find a solution to the system:

$X=\left(\begin(array)(ccc) (\frac(1)(13) ) & (-\frac(3)(13) ) & (\frac(3)(13) ) \\ ( -\frac(3)(26) ) & (\frac(9)(26) ) & (\frac(2)(13) ) \\ (\frac(4)(13) ) & (\frac(1 )(13) ) & (-\frac(1)(13) ) \end(array)\right)\cdot \left(\begin(array)(c) (26) \\ (52) \\ (52 ) \end(array)\right)=\left(\begin(array)(c) (\frac(1)(13) \cdot 26-\frac(3)(13) \cdot 52+\frac(3 )(13) \cdot 52) ​​\\ (-\frac(3)(26) \cdot 26+\frac(9)(26) \cdot 52+\frac(2)(13) \cdot 52) ​​\\ (\frac(4)(13) \cdot 26+\frac(1)(13) \cdot 52-\frac(1)(13) \cdot 52) ​​\end(array)\right)=\left(\ begin(array)(c) (2-12+12) \\ (-3+18+8) \\ (8+4-4) \end(array)\right)=\left(\begin(array) (c) (2) \\ (23) \\ (8) \end(array)\right)$

$X=\left(\begin(array)(c) (2) \\ (23) \\ (8) \end(array)\right)$ - desired solution of the system of equations.

In the first part, we considered some theoretical material, the substitution method, as well as the method of term-by-term addition of system equations. To everyone who came to the site through this page, I recommend that you read the first part. Perhaps, some visitors will find the material too simple, but in the course of solving systems of linear equations, I made a number of very important remarks and conclusions regarding the solution math problems generally.

And now we will analyze Cramer's rule, as well as the solution of a system of linear equations using the inverse matrix (matrix method). All materials are presented simply, in detail and clearly, almost all readers will be able to learn how to solve systems using the above methods.

We first consider Cramer's rule in detail for a system of two linear equations in two unknowns. For what? “After all, the simplest system can be solved by the school method, by term-by-term addition!

The fact is that even if sometimes, but there is such a task - to solve a system of two linear equations with two unknowns using Cramer's formulas. Secondly, a simpler example will help you understand how to use Cramer's rule for a more complex case - a system of three equations with three unknowns.

In addition, there are systems of linear equations with two variables, which it is advisable to solve exactly according to Cramer's rule!

Consider the system of equations

At the first step, we calculate the determinant , it is called the main determinant of the system.

Gauss method.

If , then the system has a unique solution, and to find the roots, we must calculate two more determinants:
And

In practice, the above qualifiers can also be denoted by the Latin letter.

The roots of the equation are found by the formulas:
,

Example 7

Solve a system of linear equations

Solution: We see that the coefficients of the equation are quite large, on the right side there are decimals with a comma. The comma is a rather rare guest in practical tasks in mathematics, I took this system from an econometric problem.

How to solve such a system? You can try to express one variable in terms of another, but in this case you will surely get terrible fancy fractions, which are extremely inconvenient to work with, and the design of the solution will look just awful. You can multiply the second equation by 6 and subtract term by term, but the same fractions will appear here.

What to do? In such cases, Cramer's formulas come to the rescue.

;

;

Answer: ,

Both roots have infinite tails and are found approximately, which is quite acceptable (and even commonplace) for econometrics problems.

Comments are not needed here, since the task is solved according to ready-made formulas, however, there is one caveat. When using this method, compulsory The fragment of the assignment is the following fragment: "so the system has a unique solution". Otherwise, the reviewer may punish you for disrespecting Cramer's theorem.

It will not be superfluous to check, which is convenient to carry out on a calculator: we substitute the approximate values ​​\u200b\u200bin the left side of each equation of the system. As a result, with a small error, numbers that are on the right side should be obtained.

Example 8

Express your answer in ordinary improper fractions. Make a check.

This is an example for independent solution(example of finishing and answer at the end of the lesson).

We turn to the consideration of Cramer's rule for a system of three equations with three unknowns:

We find the main determinant of the system:

If , then the system has infinitely many solutions or is inconsistent (has no solutions). In this case, Cramer's rule will not help, you need to use the Gauss method.

If , then the system has a unique solution, and to find the roots, we must calculate three more determinants:
, ,

And finally, the answer is calculated by the formulas:

As you can see, the “three by three” case is fundamentally no different from the “two by two” case, the column of free terms sequentially “walks” from left to right along the columns of the main determinant.

Example 9

Solve the system using Cramer's formulas.

Solution: Let's solve the system using Cramer's formulas.

, so the system has a unique solution.

Answer: .

Actually, there is nothing special to comment here again, in view of the fact that the decision is made according to ready-made formulas. But there are a couple of notes.

It happens that as a result of calculations, “bad” irreducible fractions are obtained, for example: .
I recommend the following "treatment" algorithm. If there is no computer at hand, we do this:

1) There may be a mistake in the calculations. As soon as you encounter a “bad” shot, you must immediately check whether is the condition rewritten correctly. If the condition is rewritten without errors, then you need to recalculate the determinants using the expansion in another row (column).

2) If no errors were found as a result of the check, then most likely a typo was made in the condition of the assignment. In this case, calmly and CAREFULLY solve the task to the end, and then make sure to check and draw it up on a clean copy after the decision. Of course, checking a fractional answer is an unpleasant task, but it will be a disarming argument for the teacher, who, well, really likes to put a minus for any bad thing like. How to deal with fractions is detailed in the answer for Example 8.

If you have a computer at hand, then use an automated program to check it, which can be downloaded for free at the very beginning of the lesson. By the way, it is most advantageous to use the program right away (even before starting the solution), you will immediately see the intermediate step at which you made a mistake! The same calculator automatically calculates the solution of the system using the matrix method.

Second remark. From time to time there are systems in the equations of which some variables are missing, for example:

Here in the first equation there is no variable , in the second there is no variable . In such cases, it is very important to correctly and CAREFULLY write down the main determinant:
– zeros are put in place of missing variables.
By the way, it is rational to open determinants with zeros according to the row (column) in which zero is located, since there are noticeably fewer calculations.

Example 10

Solve the system using Cramer's formulas.

This is an example for self-decision (finishing sample and answer at the end of the lesson).

For the case of a system of 4 equations with 4 unknowns, Cramer's formulas are written according to similar principles. You can see a live example in the Determinant Properties lesson. Reducing the order of the determinant - five 4th order determinants are quite solvable. Although the task is already very reminiscent of a professor's shoe on the chest of a lucky student.

Solution of the system using the inverse matrix

The inverse matrix method is essentially a special case matrix equation(See Example No. 3 of the specified lesson).

To study this section, you need to be able to expand the determinants, find the inverse matrix and perform matrix multiplication. Relevant links will be given as the explanation progresses.

Example 11

Solve the system with the matrix method

Solution: We write the system in matrix form:
, Where

Please look at the system of equations and the matrices. By what principle we write elements into matrices, I think everyone understands. The only comment: if some variables were missing in the equations, then zeros would have to be put in the corresponding places in the matrix.

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

First, let's deal with the determinant:

Here the determinant is expanded by the first line.

Attention! If , then the inverse matrix does not exist, and it is impossible to solve the system by the matrix method. In this case, the system is solved by the elimination of unknowns (Gauss method).

Now you need to calculate 9 minors and write them into the matrix of minors

Reference: It is useful to know the meaning of double subscripts in linear algebra. The first digit is the line number on which the given element. The second digit is the number of the column in which the element is located:

That is, a double subscript indicates that the element is in the first row, third column, while, for example, the element is in the 3rd row, 2nd column

System of m linear equations with n unknowns called a system of the form

Where aij And b i (i=1,…,m; b=1,…,n) are some known numbers, and x 1 ,…,x n- unknown. In the notation of the coefficients aij first index i denotes the number of the equation, and the second j is the number of the unknown at which this coefficient stands.

The coefficients for the unknowns will be written in the form of a matrix , which we will call system matrix.

The numbers on the right sides of the equations b 1 ,…,b m called free members.

Aggregate n numbers c 1 ,…,c n called decision of this system, if each equation of the system becomes an equality after substituting numbers into it c 1 ,…,c n instead of the corresponding unknowns x 1 ,…,x n.

Our task will be to find solutions to the system. In this case, three situations may arise:

A system of linear equations that has at least one solution is called joint. Otherwise, i.e. if the system has no solutions, then it is called incompatible.

Consider ways to find solutions to the system.


MATRIX METHOD FOR SOLVING SYSTEMS OF LINEAR EQUATIONS

Matrices make it possible to briefly write down a system of linear equations. Let a system of 3 equations with three unknowns be given:

Consider the matrix of the system and matrix columns of unknown and free members

Let's find the product

those. as a result of the product, we obtain the left-hand sides of the equations of this system. Then, using the definition of matrix equality, this system can be written as

or shorter AX=B.

Here matrices A And B are known, and the matrix X unknown. She needs to be found, because. its elements are the solution of this system. This equation is called matrix equation.

Let the matrix determinant be different from zero | A| ≠ 0. Then the matrix equation is solved as follows. Multiply both sides of the equation on the left by the matrix A-1, the inverse of the matrix A: . Because the A -1 A = E And EX=X, then we obtain the solution of the matrix equation in the form X = A -1 B .

Note that since the inverse matrix can only be found for square matrices, the matrix method can only solve those systems in which the number of equations is the same as the number of unknowns. However, the matrix notation of the system is also possible in the case when the number of equations is not equal to the number of unknowns, then the matrix A is not square and therefore it is impossible to find a solution to the system in the form X = A -1 B.

Examples. Solve systems of equations.

CRAMER'S RULE

Consider a system of 3 linear equations with three unknowns:

Third-order determinant corresponding to the matrix of the system, i.e. composed of coefficients at unknowns,

called system determinant.

We compose three more determinants as follows: we replace successively 1, 2 and 3 columns in the determinant D with a column of free members

Then we can prove the following result.

Theorem (Cramer's rule). If the determinant of the system is Δ ≠ 0, then the system under consideration has one and only one solution, and

Proof. So, consider a system of 3 equations with three unknowns. Multiply the 1st equation of the system by the algebraic complement A 11 element a 11, 2nd equation - on A21 and 3rd - on A 31:

Let's add these equations:

Consider each of the brackets and the right side of this equation. By the theorem on the expansion of the determinant in terms of the elements of the 1st column

Similarly, it can be shown that and .

Finally, it is easy to see that

Thus, we get the equality: .

Hence, .

The equalities and are derived similarly, whence the assertion of the theorem follows.

Thus, we note that if the determinant of the system is Δ ≠ 0, then the system has a unique solution and vice versa. If the determinant of the system is equal to zero, then the system either has an infinite set of solutions or has no solutions, i.e. incompatible.

Examples. Solve a system of equations


GAUSS METHOD

The previously considered methods can be used to solve only those systems in which the number of equations coincides with the number of unknowns, and the determinant of the system must be different from zero. The Gaussian method is more universal and is suitable for systems with any number of equations. It consists in the successive elimination of unknowns from the equations of the system.

Consider again a system of three equations with three unknowns:

.

We leave the first equation unchanged, and from the 2nd and 3rd we exclude the terms containing x 1. To do this, we divide the second equation by A 21 and multiply by - A 11 and then add with the 1st equation. Similarly, we divide the third equation into A 31 and multiply by - A 11 and then add it to the first one. As a result, the original system will take the form:

Now, from the last equation, we eliminate the term containing x2. To do this, divide the third equation by , multiply by and add it to the second. Then we will have a system of equations:

Hence from the last equation it is easy to find x 3, then from the 2nd equation x2 and finally from the 1st - x 1.

When using the Gaussian method, the equations can be interchanged if necessary.

Often instead of writing new system equations are limited to writing out the extended matrix of the system:

and then bring it to a triangular or diagonal form using elementary transformations.

TO elementary transformations matrices include the following transformations:

  1. permutation of rows or columns;
  2. multiplying a string by a non-zero number;
  3. adding to one line other lines.

Examples: Solve systems of equations using the Gauss method.


Thus, the system has an infinite number of solutions.