Determination of the solution of a system of linear equations. System of linear algebraic equations

Matrix method for solving systems of linear algebraic equations - formula derivation.

Let for the matrix BUT order n on the n there is an inverse matrix . Multiply both sides of the matrix equation on the left by (matrix orders A⋅X and AT allow to perform such an operation, see the article operations on matrices, properties of operations). We have . Since the operation of multiplying matrices of suitable orders is characterized by the associativity property, the last equality can be rewritten as , and by definition of the inverse matrix ( E is the identity matrix of order n on the n), That's why

Thus, the solution of a system of linear algebraic equations by the matrix method is determined by the formula. In other words, the SLAE solution is found using the inverse matrix .

We know that a square matrix BUT order n on the n has an inverse matrix only if its determinant is non-zero. Therefore, the SYSTEM n LINEAR ALGEBRAIC EQUATIONS WITH n UNKNOWN CAN BE SOLVED BY THE MATRIX METHOD ONLY WHEN THE DETERMINANT OF THE MAIN MATRIX OF THE SYSTEM IS NON-ZERO.

Top of page

Examples of solving systems of linear algebraic equations by the matrix method.

Consider the matrix method with examples. In some examples, we will not describe in detail the process of calculating the determinants of matrices, if necessary, refer to the article calculating the determinant of a matrix.

Example.

Using the inverse matrix, find the solution to the system of linear equations .

Decision.

In matrix form, the original system can be written as , where . Let's calculate the determinant of the main matrix and make sure that it is different from zero. Otherwise, we will not be able to solve the system by the matrix method. We have , therefore, for the matrix BUT the inverse matrix can be found. Thus, if we find the inverse matrix, then the desired solution of the SLAE will be defined as . So, the task was reduced to the construction of the inverse matrix . Let's find her.

We know that for the matrix the inverse matrix can be found as , where are the algebraic complements of the elements .



In our case

Then

Let's check the obtained solution , substituting it into the matrix form of the original system of equations . This equality must turn into an identity, otherwise a mistake was made somewhere.

Therefore, the solution is correct.

Answer:

or in another entry .

Example.

Solve SLAE by matrix method.

Decision.

The first equation of the system does not contain an unknown variable x2, the second - x 1, third - x 3. That is, the coefficients in front of these unknown variables are equal to zero. We rewrite the system of equations as . From this form it is easier to switch to the matrix form of the SLAE notation . Let us make sure that this system of equations can be solved using the inverse matrix. In other words, we will show that:

Let's build an inverse matrix using a matrix of algebraic additions:

then,

It remains to find the solution to the SLAE:

Answer:

.

When passing from the usual form of a system of linear algebraic equations to its matrix form, one should be careful with the order of the unknown variables in the equations of the system. For example, SLAU CANNOT be written as . You must first order all unknown variables in all equations of the system, and then proceed to matrix notation:

or

Also, be careful with the notation of unknown variables, instead of x 1 , x 2 , …, x n can be any other letters. For example, SLAU in matrix form is written as .

Let's take an example.

Example.

using an inverse matrix.

Decision.

Having ordered the unknown variables in the equations of the system, we write it in the matrix form
. Calculate the determinant of the main matrix:

It is non-zero, so the solution to the system of equations can be found using the inverse matrix as . Find the inverse matrix by the formula :

We get the desired solution:

Answer:

x=0, y=-2, z=3.

Example.

Find a solution to a system of linear algebraic equations matrix method.

Decision.

The determinant of the main matrix of the system is equal to zero

therefore, we cannot apply the matrix method.

Finding a solution to such systems is described in the section on solving systems of linear algebraic equations.

Example.

Solve SLAE matrix method, is some real number.

Decision.

The system of equations in matrix form has the form . Let's calculate the determinant of the main matrix of the system and make sure that it is different from zero:

The square trinomial does not vanish for any real values, since its discriminant is negative, so the determinant of the main matrix of the system is not equal to zero for any real ones. By the matrix method, we have . Let's construct the inverse matrix by the formula :

Then

Answer:

.Back to top

Summarize.

The matrix method is suitable for solving SLAEs in which the number of equations coincides with the number of unknown variables and the determinant of the main matrix of the system is nonzero. If the system contains more than three equations, then finding the inverse matrix requires significant computational effort, therefore, in this case, it is advisable to use the Gauss method for solving.

Even at school, each of us studied equations and, for sure, systems of equations. But not many people know that there are several ways to solve them. Today we will analyze in detail all the methods for solving a system of linear algebraic equations, which consist of more than two equalities.

Story

Today it is known that the art of solving equations and their systems originated in ancient Babylon and Egypt. However, equalities in their usual form appeared after the appearance of the equal sign "=", which was introduced in 1556 by the English mathematician Record. By the way, this sign was chosen for a reason: it means two parallel equal segments. Indeed, there is no better example of equality.

The founder of modern letter designations of unknowns and signs of degrees is a French mathematician. However, his designations differed significantly from today's. For example, he denoted the square of an unknown number with the letter Q (lat. "quadratus"), and the cube with the letter C (lat. "cubus"). These notations seem awkward now, but back then it was the most understandable way to write systems of linear algebraic equations.

However, a drawback in the then methods of solution was that mathematicians considered only positive roots. Perhaps this is due to the fact that negative values ​​had no practical use. One way or another, it was the Italian mathematicians Niccolo Tartaglia, Gerolamo Cardano and Rafael Bombelli who were the first to consider negative roots in the 16th century. And the modern view, the main solution method (through the discriminant) was created only in the 17th century thanks to the work of Descartes and Newton.

In the mid-18th century, the Swiss mathematician Gabriel Cramer found a new way to make solving systems of linear equations easier. This method was subsequently named after him and to this day we use it. But we will talk about Cramer's method a little later, but for now we will discuss linear equations and methods for solving them separately from the system.

Linear equations

Linear equations are the simplest equalities with variable(s). They are classified as algebraic. write in general form as follows: a 1 * x 1 + a 2 * x 2 + ... and n * x n \u003d b. We will need their representation in this form when compiling systems and matrices further.

Systems of linear algebraic equations

The definition of this term is as follows: it is a set of equations that have common unknowns and a common solution. As a rule, at school, everything was solved by systems with two or even three equations. But there are systems with four or more components. Let's first figure out how to write them down so that it is convenient to solve them later. First, systems of linear algebraic equations will look better if all variables are written as x with the appropriate index: 1,2,3, and so on. Secondly, all equations should be brought to the canonical form: a 1 * x 1 + a 2 * x 2 + ... a n * x n =b.

After all these actions, we can begin to talk about how to find a solution to systems of linear equations. Matrices are very useful for this.

matrices

A matrix is ​​a table that consists of rows and columns, and at their intersection are its elements. These can either be specific values ​​or variables. Most often, to designate elements, subscripts are placed under them (for example, a 11 or a 23). The first index means the row number and the second one the column number. On matrices, as well as on any other mathematical element, you can perform various operations. Thus, you can:

2) Multiply a matrix by some number or vector.

3) Transpose: turn matrix rows into columns and columns into rows.

4) Multiply matrices if the number of rows of one of them is equal to the number of columns of the other.

We will discuss all these techniques in more detail, as they will be useful to us in the future. Subtracting and adding matrices is very easy. Since we take matrices of the same size, each element of one table corresponds to each element of another. Thus, we add (subtract) these two elements (it is important that they are in the same places in their matrices). When multiplying a matrix by a number or vector, you simply need to multiply each element of the matrix by that number (or vector). Transposition is a very interesting process. It is very interesting sometimes to see it in real life, for example, when changing the orientation of a tablet or phone. The icons on the desktop are a matrix, and when you change the position, it transposes and becomes wider, but decreases in height.

Let's analyze such a process as Although it will not be useful to us, it will still be useful to know it. You can multiply two matrices only if the number of columns in one table is equal to the number of rows in the other. Now let's take the elements of a row of one matrix and the elements of the corresponding column of another. We multiply them by each other and then add them (that is, for example, the product of the elements a 11 and a 12 by b 12 and b 22 will be equal to: a 11 * b 12 + a 12 * b 22). Thus, one element of the table is obtained, and it is filled further by a similar method.

Now we can begin to consider how the system of linear equations is solved.

Gauss method

This topic starts at school. We know well the concept of "system of two linear equations" and know how to solve them. But what if the number of equations is more than two? This will help us

Of course, this method is convenient to use if you make a matrix out of the system. But you can not transform it and solve it in its pure form.

So, how is the system of linear Gaussian equations solved by this method? By the way, although this method is named after him, it was discovered in ancient times. Gauss proposes the following: to carry out operations with equations in order to eventually reduce the entire set to a stepped form. That is, it is necessary that from top to bottom (if placed correctly) from the first equation to the last, one unknown decreases. In other words, we need to make sure that we get, say, three equations: in the first - three unknowns, in the second - two, in the third - one. Then from the last equation we find the first unknown, substitute its value into the second or first equation, and then find the remaining two variables.

Cramer method

To master this method, it is vital to master the skills of addition, subtraction of matrices, and you also need to be able to find determinants. Therefore, if you do all this poorly or do not know how at all, you will have to learn and practice.

What is the essence of this method, and how to make it so that a system of linear Cramer equations is obtained? Everything is very simple. We have to construct a matrix from numerical (almost always) coefficients of a system of linear algebraic equations. To do this, we simply take the numbers in front of the unknowns and put them in the table in the order they are written in the system. If the number is preceded by a "-" sign, then we write down a negative coefficient. So, we have compiled the first matrix from the coefficients of the unknowns, not including the numbers after the equal signs (naturally, the equation should be reduced to the canonical form, when only the number is on the right, and all the unknowns with coefficients on the left). Then you need to create several more matrices - one for each variable. To do this, in the first matrix, in turn, we replace each column with coefficients with a column of numbers after the equal sign. Thus, we obtain several matrices and then find their determinants.

After we have found the determinants, the matter is small. We have an initial matrix, and there are several resulting matrices that correspond to different variables. To get the solutions of the system, we divide the determinant of the resulting table by the determinant of the initial table. The resulting number is the value of one of the variables. Similarly, we find all the unknowns.

Other Methods

There are several more methods for obtaining a solution to systems of linear equations. For example, the so-called Gauss-Jordan method, which is used to find solutions to a system of quadratic equations and is also associated with the use of matrices. There is also a Jacobi method for solving a system of linear algebraic equations. It is the easiest to adapt to a computer and is used in computer technology.

Difficult cases

Complexity usually arises when the number of equations is less than the number of variables. Then we can say for sure that either the system is inconsistent (that is, it has no roots), or the number of its solutions tends to infinity. If we have the second case, then we need to write down the general solution of the system of linear equations. It will contain at least one variable.

Conclusion

Here we come to the end. Let's summarize: we have analyzed what a system and a matrix are, learned how to find a general solution to a system of linear equations. In addition, other options were considered. We found out how a system of linear equations is solved: the Gauss method and We talked about difficult cases and other ways to find solutions.

In fact, this topic is much more extensive, and if you want to better understand it, then we advise you to read more specialized literature.

Systems of linear equations. Lecture 6

Systems of linear equations.

Basic concepts.

view system

called system - linear equations with unknowns.

Numbers , , are called system coefficients.

Numbers are called free members of the system, – system variables. Matrix

called the main matrix of the system, and the matrix

expanded matrix system. Matrices - columns

And correspondingly matrices of free members and unknowns of the system. Then, in matrix form, the system of equations can be written as . System solution is called the values ​​of the variables, when substituting which, all the equations of the system turn into true numerical equalities. Any solution of the system can be represented as a matrix-column. Then the matrix equality is true.

The system of equations is called joint if it has at least one solution and incompatible if it has no solution.

To solve a system of linear equations means to find out whether it is compatible and, if it is compatible, to find its general solution.

The system is called homogeneous if all its free terms are equal to zero. A homogeneous system is always compatible because it has a solution

The Kronecker-Kopelli theorem.

The answer to the question of the existence of solutions of linear systems and their uniqueness allows us to obtain the following result, which can be formulated as the following statements about a system of linear equations with unknowns

(1)

Theorem 2. The system of linear equations (1) is consistent if and only if the rank of the main matrix is ​​equal to the rank of the extended one (.

Theorem 3. If the rank of the main matrix of a joint system of linear equations is equal to the number of unknowns, then the system has a unique solution.

Theorem 4. If the rank of the main matrix of a joint system is less than the number of unknowns, then the system has an infinite number of solutions.

Rules for solving systems.

3. Find the expression of the main variables in terms of the free ones and get the general solution of the system.

4. By giving arbitrary values ​​to free variables, all values ​​of the main variables are obtained.

Methods for solving systems of linear equations.

Inverse matrix method.

and , i.e., the system has a unique solution. We write the system in matrix form

where , , .

Multiply both sides of the matrix equation on the left by the matrix

Since , we obtain , from which we obtain equality for finding unknowns

Example 27. Using the inverse matrix method, solve the system of linear equations

Decision. Denote by the main matrix of the system

.

Let , then we find the solution by the formula .

Let's calculate .

Since , then the system has a unique solution. Find all algebraic additions

, ,

, ,

, ,

, ,

Thus

.

Let's check

.

The inverse matrix is ​​found correctly. From here, using the formula , we find the matrix of variables .

.

Comparing the values ​​of the matrices, we get the answer: .

Cramer's method.

Let a system of linear equations with unknowns be given

and , i.e., the system has a unique solution. We write the solution of the system in matrix form or

Denote

. . . . . . . . . . . . . . ,

Thus, we obtain formulas for finding the values ​​of the unknowns, which are called Cramer's formulas.

Example 28. Solve the following system of linear equations using Cramer's method .

Decision. Find the determinant of the main matrix of the system

.

Since , then , the system has a unique solution.

Find the remaining determinants for Cramer's formulas

,

,

.

Using Cramer's formulas, we find the values ​​of the variables

Gauss method.

The method consists in sequential exclusion of variables.

Let a system of linear equations with unknowns be given.

The Gaussian solution process consists of two steps:

At the first stage, the extended matrix of the system is reduced to the stepwise form with the help of elementary transformations

,

where , which corresponds to the system

After that the variables are considered free and in each equation are transferred to the right side.

At the second stage, the variable is expressed from the last equation, the resulting value is substituted into the equation. From this equation

variable is expressed. This process continues until the first equation. The result is an expression of the principal variables in terms of the free variables .

Example 29. Solve the following system using the Gaussian method

Decision. Let us write out the extended matrix of the system and reduce it to the step form

.

As is greater than the number of unknowns, then the system is compatible and has an infinite number of solutions. Let us write down the system for the step matrix

The determinant of the extended matrix of this system, composed of the first three columns, is not equal to zero, so we consider it to be basic. Variables

Will be basic and the variable will be free. Let's move it in all equations to the left side

From the last equation we express

Substituting this value into the penultimate second equation, we get

where . Substituting the values ​​of the variables and into the first equation, we find . We write the answer in the following form

Example 1. Find a general solution and some particular solution of the system

Decision do it with a calculator. We write out the extended and main matrices:

The dotted line separates the main matrix A. We write the unknown systems from above, bearing in mind the possible permutation of the terms in the equations of the system. Determining the rank of the extended matrix, we simultaneously find the rank of the main one. In matrix B, the first and second columns are proportional. Of the two proportional columns, only one can fall into the basic minor, so let's move, for example, the first column beyond the dashed line with the opposite sign. For the system, this means the transfer of terms from x 1 to the right side of the equations.

We bring the matrix to a triangular form. We will work only with rows, since multiplying a row of a matrix by a non-zero number and adding it to another row for the system means multiplying the equation by the same number and adding it to another equation, which does not change the solution of the system. Working with the first row: multiply the first row of the matrix by (-3) and add to the second and third rows in turn. Then we multiply the first row by (-2) and add it to the fourth one.

The second and third lines are proportional, therefore, one of them, for example the second, can be crossed out. This is equivalent to deleting the second equation of the system, since it is a consequence of the third one.

Now we work with the second line: multiply it by (-1) and add it to the third.

The dashed minor has the highest order (of all possible minors) and is non-zero (it is equal to the product of the elements on the main diagonal), and this minor belongs to both the main matrix and the extended one, hence rangA = rangB = 3 .
Minor is basic. It includes coefficients for unknown x 2, x 3, x 4, which means that the unknown x 2, x 3, x 4 are dependent, and x 1, x 5 are free.
We transform the matrix, leaving only the basic minor on the left (which corresponds to point 4 of the above solution algorithm).

The system with coefficients of this matrix is ​​equivalent to the original system and has the form

By the method of elimination of unknowns we find:
x 4 =3-4x 5 , x 3 =3-4x 5 -2x 4 =3-4x 5 -6+8x 5 =-3+4x 5
x 2 =x 3 +2x 4 -2+2x 1 +3x 5 = -3+4x 5 +6-8x 5 -2+2x 1 +3x 5 = 1+2x 1 -x 5
We got relations expressing dependent variables x 2, x 3, x 4 through free x 1 and x 5, that is, we found a general solution:

Giving arbitrary values ​​to the free unknowns, we obtain any number of particular solutions. Let's find two particular solutions:
1) let x 1 = x 5 = 0, then x 2 = 1, x 3 = -3, x 4 = 3;
2) put x 1 = 1, x 5 = -1, then x 2 = 4, x 3 = -7, x 4 = 7.
Thus, we found two solutions: (0.1, -3,3,0) - one solution, (1.4, -7.7, -1) - another solution.

Example 2. Investigate compatibility, find a general and one particular solution of the system

Decision. Let's rearrange the first and second equations to have a unit in the first equation and write the matrix B.

We get zeros in the fourth column, operating on the first row:

Now get the zeros in the third column using the second row:

The third and fourth rows are proportional, so one of them can be crossed out without changing the rank:
Multiply the third row by (-2) and add to the fourth:

We see that the ranks of the main and extended matrices are 4, and the rank coincides with the number of unknowns, therefore, the system has a unique solution:
-x 1 \u003d -3 → x 1 \u003d 3; x 2 \u003d 3-x 1 → x 2 \u003d 0; x 3 \u003d 1-2x 1 → x 3 \u003d 5.
x 4 \u003d 10- 3x 1 - 3x 2 - 2x 3 \u003d 11.

Example 3. Examine the system for compatibility and find a solution if it exists.

Decision. We compose the extended matrix of the system.

Rearrange the first two equations so that there is a 1 in the upper left corner:
Multiplying the first row by (-1), we add it to the third:

Multiply the second line by (-2) and add to the third:

The system is inconsistent, since the main matrix received a row consisting of zeros, which is crossed out when the rank is found, and the last row remains in the extended matrix, that is, r B > r A .

Exercise. Investigate this system of equations for compatibility and solve it by means of matrix calculus.
Decision

Example. Prove the compatibility of a system of linear equations and solve it in two ways: 1) by the Gauss method; 2) Cramer's method. (enter the answer in the form: x1,x2,x3)
Solution :doc :doc :xls
Answer: 2,-1,3.

Example. A system of linear equations is given. Prove its compatibility. Find a general solution of the system and one particular solution.
Decision
Answer: x 3 \u003d - 1 + x 4 + x 5; x 2 \u003d 1 - x 4; x 1 = 2 + x 4 - 3x 5

Exercise. Find general and particular solutions for each system.
Decision. We study this system using the Kronecker-Capelli theorem.
We write out the extended and main matrices:

1 1 14 0 2 0
3 4 2 3 0 1
2 3 -3 3 -2 1
x 1x2x 3x4x5

Here matrix A is in bold type.
We bring the matrix to a triangular form. We will work only with rows, since multiplying a row of a matrix by a non-zero number and adding it to another row for the system means multiplying the equation by the same number and adding it to another equation, which does not change the solution of the system.
Multiply the 1st row by (3). Multiply the 2nd row by (-1). Let's add the 2nd line to the 1st:
0 -1 40 -3 6 -1
3 4 2 3 0 1
2 3 -3 3 -2 1

Multiply the 2nd row by (2). Multiply the 3rd row by (-3). Let's add the 3rd line to the 2nd:
0 -1 40 -3 6 -1
0 -1 13 -3 6 -1
2 3 -3 3 -2 1

Multiply the 2nd row by (-1). Let's add the 2nd line to the 1st:
0 0 27 0 0 0
0 -1 13 -3 6 -1
2 3 -3 3 -2 1

The selected minor has the highest order (of all possible minors) and is different from zero (it is equal to the product of the elements on the reciprocal diagonal), and this minor belongs to both the main matrix and the extended one, therefore rang(A) = rang(B) = 3 Since the rank of the main matrix is ​​equal to the rank of the extended one, then the system is collaborative.
This minor is basic. It includes coefficients for unknown x 1, x 2, x 3, which means that the unknown x 1, x 2, x 3 are dependent (basic), and x 4, x 5 are free.
We transform the matrix, leaving only the basic minor on the left.
0 0 27 0 0 0
0 -1 13 -1 3 -6
2 3 -3 1 -3 2
x 1x2x 3 x4x5
The system with the coefficients of this matrix is ​​equivalent to the original system and has the form:
27x3=
- x 2 + 13x 3 = - 1 + 3x 4 - 6x 5
2x 1 + 3x 2 - 3x 3 = 1 - 3x 4 + 2x 5
By the method of elimination of unknowns we find:
We got relations expressing dependent variables x 1, x 2, x 3 through free x 4, x 5, that is, we found common decision:
x 3 = 0
x2 = 1 - 3x4 + 6x5
x 1 = - 1 + 3x 4 - 8x 5
uncertain, because has more than one solution.

Exercise. Solve the system of equations.
Answer:x 2 = 2 - 1.67x 3 + 0.67x 4
x 1 = 5 - 3.67x 3 + 0.67x 4
Giving arbitrary values ​​to the free unknowns, we obtain any number of particular solutions. The system is uncertain

Systems of linear algebraic equations


1. Systems of linear algebraic equations


A system of linear algebraic equations (SLAE) is a system of the form

(4.1)

A solution of system (4.1) is such a collection n numbers

When substituting which, each equation of the system turns into a true equality.

To solve a system means to find all its solutions or to prove that there is no solution.

A SLAE is called consistent if it has at least one solution, and inconsistent if it has no solutions.

If a consistent system has only one solution, then it is called definite, and indefinite if it has more than one solution.

For example, the system of equations consistent and definite, since it has a unique solution ; system

incompatible, and the system joint and indefinite, since it has more than one solution.

Two systems of equations are said to be equivalent or equivalent if they have the same set of solutions. In particular, two incompatible systems are considered equivalent.

The main matrix of SLAE (4.1) is the matrix A of size, whose elements are the coefficients of the unknowns of the given system, i.e.

.

The matrix of unknown SLAE (4.1) is the column matrix X, whose elements are the unknown systems (4.1):

The matrix of free members of the SLAE (4.1) is the column matrix B, whose elements are the free members of the given SLAE:

Taking into account the introduced concepts, SLAE (4.1) can be written in matrix form or

.(4.2)

2. Solution of systems of linear equations. Inverse matrix method

Let us turn to the study of SLAE (4.1), which corresponds to the matrix equation (4.2). First, consider a special case when the number of unknowns is equal to the number of equations of the given system () and , that is, the main matrix of the system is nondegenerate. In this case, according to the previous point, there is a unique inverse matrix for the matrix . It is clear that it is consistent with the matrices and . Let's show it. To do this, we multiply both sides of the matrix equation (4.2) on the left by the matrix :

Therefore, taking into account the properties of matrix multiplication, we obtain

Since, well, then

.(4.3)

Let's make sure that the found value is the solution of the original system. Substituting (4.3) into equation (4.2), we obtain , whence we have .

Let us show that this solution is unique. Let the matrix equation (4.2) have another solution that satisfies the equality

Let us show that the matrix is ​​equal to the matrix

To this end, we multiply the previous equality on the left by the matrix .

As a result, we get

Such a solution of a system of equations with unknowns is called the solution of system (4.1) by the inverse matrix method.

Example. Find a solution to the system

.

We write the system matrix:

,

For this matrix earlier (lesson 1) we have already found the inverse:

or

Here we have taken out the common factor, since we will need the product in the future.

We are looking for a solution according to the formula: .

3. Cramer's rule and formulas

Consider a system of linear equations with unknowns

We pass from the matrix form (4.3) to formulas that are more convenient and, in some cases, simpler in solving applied problems for finding solutions to a system of linear algebraic equations.

Given equality, or expanded

.

Thus, after multiplying the matrices, we get:

or

.

Note that the sum is the expansion of the determinant

over the elements of the first column, which is obtained from the determinant by replacing the first column of coefficients with a column of free terms.

Thus, it can be concluded that

Similarly: , where is obtained from by replacing the second column of coefficients with a column of free terms, .

Therefore, we have found a solution to the given system by the equalities

, , ,

also known as Cramer's formulas.

To find the solution to the SLAE, the last equalities can be written in general form as follows:

.(4.4)

According to these formulas, we have the Cramer rule for solving the SLAE:

- the determinant of the system is calculated from the matrix of the system;

- if , then in the matrix of the system each column is successively replaced by a column of free members and the determinants are calculated the resulting matrices;

- the solution of the system is found by Cramer's formulas (4.4).

Example. Using Cramer's formulas, solve the system of equations

Decision. The determinant of this system

.

Since , then Cramer's formulas make sense, that is, the system has a unique solution. Finding determinants:

, , .

Therefore, by formulas (4.4) we obtain:

, , .

We substitute the found values ​​of the variables into the equations of the system and make sure that they are its solution.

An exercise. Check this fact yourself.

SLAE compatibility criterion (Kronecker-Capelli theorem)

The extended matrix of system (4.1) is the matrix obtained by adding a column of free terms to the main matrix A on the right and separating it with a vertical bar, that is, the matrix

.

Note that when new columns appear in the matrix, the rank may increase, therefore . The extended matrix plays a very important role in the issue of compatibility (solvability) of the system of equations. An exhaustive answer to this question is given by the Kronecker-Capelli theorem.

Let's formulate Kronecker-Capelli theorem(no proof).

The system of linear algebraic equations (4.1) is consistent if and only if the rank of the matrix of the system is equal to the rank of the extended matrix . If a is the number of unknowns in the system, then the system has a unique solution, and if , then the system has an infinite number of solutions.

Based on the Kronecker-Capelli theorem, we formulate an algorithm for solving an arbitrary system of linear equations:

1. The ranks of the main and extended SLAE matrices are calculated. If a , then the system has no solutions (is inconsistent).

2. If a , the system is compatible. In this case, any non-zero minor of the main order matrix is ​​taken and equations are considered whose coefficients are included in this basic minor, and the remaining equations are discarded. Unknown coefficients that are included in this basic minor are declared main or basic, and the rest are free (non-main). The new system is rewritten, leaving in the left parts of the equations only the terms containing the basic unknowns, and all other terms of the equations containing the unknowns are transferred to the right parts of the equations.

3. Find the expressions of the basic unknowns in terms of the free ones. The obtained solutions of the new system with basic unknowns are called the general solution of the SLAE (4.1).

4. By giving some numerical values ​​to the free unknowns, the so-called partial solutions are found.

Let us illustrate the application of the Kronecker-Capelli theorem and the above algorithm with specific examples.

Example. Determine the compatibility of the system of equations

Decision. Let us write down the matrix of the system and determine its rank.

We have:

Since the matrix has order , the highest order of the minors is 3. The number of different minors of the third order It is easy to see that they are all equal to zero (check it yourself). Means, . The rank of the main matrix is ​​equal to two, since there is a non-zero minor of the second order of this matrix, for example,

The rank of the augmented matrix of this system is three, since there is a distinct third-order minor of this matrix, for example,

Thus, according to the Kronecker-Capelli criterion, the system is inconsistent, that is, it has no solutions.

Example. Investigate the compatibility of the system of equations

Decision. The rank of the main matrix of this system is equal to two, since, for example, the second-order minor is equal to

and all third-order minors of the main matrix are equal to zero. The rank of the augmented matrix is ​​also two, for example,

and all third-order minors of the extended matrix are equal to zero (see for yourself). Therefore, the system is consistent.

Let's take for the basic minor, for example. This basic minor does not include elements of the third equation, so we discard it.

The unknowns and are declared basic, since their coefficients are included in the basic minor, the unknown is declared free.

In the first two equations, the terms containing the variable will be moved to the right-hand side. Then we get the system

We solve this system using Cramer's formulas.

,

.

Thus, the general solution of the original system is an infinite set of sets of the form ,

where is any real number.

A particular solution to this equation will be, for example, the set , resulting at .

4. Solution of systems of linear algebraic equations by the Gauss method

One of the most effective and universal methods for solving SLAE is the Gauss method. The Gaussian method consists of cycles of the same type, which make it possible to sequentially eliminate unknown SLAEs. The first cycle is aimed at zeroing all coefficients at . Let's describe the first cycle. Assuming that in the system the coefficient(if this is not the case, then the equation with a non-zero coefficient at x 1 and redefine the coefficients), we transform system (4.1) as follows: we leave the first equation unchanged, and exclude the unknown from all other equations x 1 using elementary transformations. To do this, multiply both sides of the first equation by and add term by term with the second equation of the system. Then multiply both sides of the first equation by and add it to the third equation of the system. Continuing this process, at the last step of the cycle, we multiply both sides of the first equation byand add it to the last equation of the system. The first cycle is completed, as a result we obtain an equivalent system

(4.5)

Comment.For convenience of notation, an extended matrix system is usually used. After the first cycle, this matrix takes the following form:

(4.6)

The second cycle is a repetition of the first cycle. Let's assume that the coefficient . If this is not the case, then by interchanging the equations in places we will achieve that . We rewrite the first and second equations of system (4.5) into a new system (in what follows, we will operate only with the extended matrix).

We multiply the second equation (4.5) or the second row of matrix (4.6) by , add with the third equation of the system (4.5) or the third row of the matrix (4.6). We proceed similarly with the remaining equations of the system. As a result, we obtain an equivalent system:

(4.7)

Continuing the process of sequential elimination of unknowns, after step, we get the augmented matrix


(4.8)

Latest equations for the consistent system (4.1) are the identities. If at least one of the numbers is not equal to zero, then the corresponding equality is inconsistent; therefore, system (4.1) is inconsistent. In a joint system, when solving it, the last equations can be ignored. Then the resulting equivalent system (4.9) and the corresponding extended matrix (4.10) have the form

(4.9)


(4.10)

After discarding equations that are identities, the number of remaining equations can be either equal to the number of variables, or be less than the number of variables. In the first case, the matrix has a triangular form, and in the second, it has a stepped one. The transition from system (4.1) to its equivalent system (4.9) is called the forward pass of the Gauss method, and finding the unknowns from system (4.9) is called the reverse move.

Example. Solve the system using the Gauss method:

.

Decision. The extended matrix of this system has the form

.

Let us carry out the following transformations of the extended matrix of the system: multiply the first row byand add with the second row, and also multiply the first row byand add it to the third line. The result will be the expanded matrix of the first cycle (in the future, we will depict all transformations in the form of a diagram)

.