Systems of linear equations for dummies. Gaussian method for solving matrices

Two systems linear equations are called equivalent if the set of all their solutions coincide.

Elementary transformations of the system of equations are:

  1. Elimination of trivial equations from the system, i.e. those in which all coefficients are equal to zero;
  2. Multiplication of any equation by a number other than zero;
  3. Adding to any i -th equation of any j -th equation multiplied by any number.

A variable x i is called free if this variable is not allowed, and the whole system of equations is allowed.

Theorem. Elementary transformations transform the system of equations into an equivalent one.

The meaning of the Gauss method is to transform the original system of equations and obtain an equivalent resolved or equivalent inconsistent system.

So, the Gauss method consists of the following steps:

  1. Consider the first equation. Let's choose the first nonzero coefficient and divide the whole equation by it. Let's get an equation in which some variable x i enters with a coefficient of 1;
  2. Let us subtract this equation from all the others, multiplying it by such numbers that the coefficients of the variable x i in the remaining equations are zero. We obtain a system that is resolved with respect to the variable x i and is equivalent to the original one;
  3. If trivial equations arise (rarely, but it happens; for example, 0 = 0), we delete them from the system. As a result, the equations become one less;
  4. We repeat the previous steps no more than n times, where n is the number of equations in the system. Each time we select a new variable for "processing". If conflicting equations arise (for example, 0 = 8), the system is inconsistent.

As a result, after a few steps, we get either an allowed system (possibly with free variables) or an incompatible one. Permitted systems fall into two cases:

  1. The number of variables is equal to the number of equations. This means that the system is defined;
  2. Number of variables more numbers equations. We collect all the free variables on the right - we get formulas for the allowed variables. These formulas are written in the answer.

That's all! The system of linear equations is solved! This is a fairly simple algorithm, and to master it, you do not need to contact a high school math tutor. Let's consider an example:

Task. Solve the system of equations:

Description of steps:

  1. Subtract the first equation from the second and third - we get the allowed variable x 1;
  2. We multiply the second equation by (−1), and divide the third equation by (−3) - we get two equations in which the variable x 2 occurs with a coefficient of 1;
  3. We add the second equation to the first, and subtract from the third. Let's get the allowed variable x 2;
  4. Finally, we subtract the third equation from the first - we get the allowed variable x 3;
  5. We have received an authorized system, we write down the answer.

The general solution of a joint system of linear equations is new system, equivalent to the original one, in which all allowed variables are expressed in terms of free ones.

When you may need common decision? If you have to take fewer steps than k (k is how many equations there are). However, the reasons why the process ends at some step l< k , может быть две:

  1. After the l -th step, we got a system that does not contain the equation with the number (l + 1). This is actually good because the authorized system was received anyway - even a few steps earlier.
  2. After the l -th step, an equation was obtained in which all the coefficients for the variables are equal to zero, and the free coefficient is nonzero. This is a contradictory equation, and therefore the system is inconsistent.

It is important to understand that the occurrence of a contradictory Gaussian equation is a sufficient reason for inconsistency. At the same time, note that as a result of the l -th step, there can be no trivial equations left - all of them are deleted right in the process.

Description of steps:

  1. Subtract the first equation multiplied by 4 from the second. And also we add the first equation to the third - we get the allowed variable x 1;
  2. Subtracting the third equation, multiplied by 2, from the second, we get the contradictory equation 0 = −5.

So the system is inconsistent because a contradictory equation is found.

Task. Investigate compatibility and find a common solution to the system:


Description of steps:

  1. Subtract the first equation from the second (having previously multiplied by two) and the third - we get the allowed variable x 1;
  2. Subtract the second equation from the third. Since all the coefficients in these equations are the same, the third equation becomes trivial. At the same time, we multiply the second equation by (−1);
  3. Subtract the second from the first equation - we get the allowed variable x 2. The entire system of equations is now also resolved;
  4. Since the variables x 3 and x 4 are free, we move them to the right to express the permitted variables. This is the answer.

So, the system is compatible and indefinite, since there are two allowed variables (x 1 and x 2) and two free ones (x 3 and x 4).

Today we are dealing with the Gauss method for solving systems of linear algebraic equations... You can read about what kind of systems these are in the previous article devoted to solving the same SLAEs by Cramer's method. The Gauss method does not require any specific knowledge, only care and consistency are needed. Despite the fact that from the point of view of mathematics, school preparation is enough for its application, for students mastering this method often causes difficulties. In this article, we will try to nullify them!

Gauss method

M Gauss method- the most universal method solutions of the SLAE (except, well, very large systems). Unlike the one considered earlier, it is suitable not only for systems with only decision, but also for systems with an infinite number of solutions. There are three possibilities here.

  1. The system has a unique solution (the determinant of the main matrix of the system is not is zero);
  2. The system has an infinite number of solutions;
  3. There are no solutions, the system is incompatible.

So, we have a system (let it have one solution), and we are going to solve it using the Gaussian method. How it works?

Gauss's method consists of two stages - forward and backward.

Forward traverse of the Gaussian method

First, we write down the extended matrix of the system. To do this, add a column of free members to the main matrix.

The whole essence of the Gauss method is to bring a given matrix to a stepped (or, as they say, triangular) form by means of elementary transformations. In this form, there should be only zeroes under (or above) the main diagonal of the matrix.

What you can do:

  1. You can rearrange the rows of the matrix in places;
  2. If the matrix contains the same (or proportional) rows, you can delete all but one of them;
  3. You can multiply or divide a string by any number (except zero);
  4. Zero lines are removed;
  5. You can append to a string a string multiplied by a nonzero number.

Reverse the Gaussian method

After we transform the system in this way, one unknown Xn becomes known, and it is possible in reverse order find all the remaining unknowns by substituting the already known xes into the equations of the system, up to the first.

When the Internet is always at hand, you can solve the system of equations using the Gaussian method online. You just need to drive the coefficients into the online calculator. But you must admit, it is much more pleasant to realize that the example was solved not by a computer program, but by your own brain.

An example of solving a system of equations by the Gauss method

And now - an example to make everything clear and understandable. Let a system of linear equations be given, and you need to solve it by the Gauss method:

First, let's write the expanded matrix:

Now let's do the transformations. Remember that we need to achieve a triangular look for the matrix. Multiply the 1st row by (3). Multiply the 2nd row by (-1). Add the 2nd line to the 1st and get:

Then multiply the 3rd row by (-1). Let's add the 3rd line to the 2nd:

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

Voila - the system has been brought to the appropriate form. It remains to find unknowns:

System in this example has only one solution. We will consider the solution of systems with an infinite number of solutions in a separate article. Perhaps at first you will not know where to start transforming the matrix, but after the appropriate practice, you will get your hands on and click the SLAE using the Gaussian method like nuts. And if you suddenly come across a SLAE, which turns out to be too tough, contact our authors! you can by leaving an application in the correspondence course. Together we will solve any problem!

Let a system of linear algebraic equations be given, which must be solved (find such values ​​of the unknowns xi that turn each equation of the system into an equality).

We know that a system of linear algebraic equations can:

1) Have no solutions (be inconsistent).
2) Have infinitely many solutions.
3) Have a unique solution.

As we remember, Cramer's rule and the matrix method are inapplicable in cases where the system has infinitely many solutions or is inconsistent. Gauss methodmost powerful and universal tool to find a solution to any system of linear equations, which the in every case will lead us to the answer! The algorithm of the method itself works the same in all three cases. If the knowledge of determinants is required in the Cramer and matrix methods, then for the application of the Gauss method, knowledge of only arithmetic operations is necessary, which makes it accessible even for primary school students.

Extended matrix transformations ( this is the matrix of the system - a matrix composed only of the coefficients of the unknowns, plus a column of free terms) systems of linear algebraic equations in the Gauss method:

1) with strings matrices can rearrange places.

2) if the matrix contains (or is) proportional (as a special case - the same) rows, then it follows delete from the matrix all these rows except one.

3) if a zero row appeared in the matrix during the transformations, then it also follows delete.

4) the row of the matrix can be multiply (divide) to any number other than zero.

5) the row of the matrix can be add another string multiplied by a number nonzero.

In the Gauss method elementary transformations do not change the solution of the system of equations.

Gaussian method consists of two stages:

  1. “Direct move” - with the help of elementary transformations, reduce the extended matrix of the system of linear algebraic equations to a “triangular” stepped form: the elements of the extended matrix located below the main diagonal are equal to zero (“top-down” move). For example, to this form:

To do this, we will perform the following actions:

1) Suppose we consider the first equation of a system of linear algebraic equations and the coefficient at x 1 is K. The second, third, etc. the equations are transformed as follows: each equation (coefficients for unknowns, including free terms) is divided by the coefficient for the unknown x 1, standing in each equation, and multiplied by K. After that, we subtract the first from the second equation (coefficients for unknowns and free terms). We get the coefficient 0 for x 1 in the second equation. Subtract the first equation from the third transformed equation until all equations, except for the first, for unknown x 1 have a coefficient of 0.

2) Go to the next equation. Let this be the second equation and the coefficient at x 2 is equal to M. With all the "lower" equations, we proceed as described above. Thus, "under" the unknown x 2 in all equations will be zeros.

3) Go to the next equation and so on until there is one last unknown and the transformed free term.

  1. "Reverse" of the Gauss method - obtaining a solution to a system of linear algebraic equations ("bottom-up" move). From the last "lower" equation we get one first solution - the unknown x n. For this we decide elementary equation A * x n = B. In the example above, x 3 = 4. Substitute the found value into the "upper" next equation and solve it with respect to the next unknown. For example, x 2 - 4 = 1, i.e. x 2 = 5. And so on until we find all the unknowns.

Example.

Let's solve the system of linear equations by the Gauss method, as some authors advise:

Let us write down the extended matrix of the system and, using elementary transformations, bring it to a stepwise form:

We look at the upper left "step". We should have a unit there. The problem is that there are no ones in the first column at all, so rearranging the rows will not solve anything. In such cases, the unit needs to be organized using an elementary transformation. This can usually be done in several ways. Let's do this:
Step 1 ... To the first line, add the second line multiplied by –1. That is, we mentally multiplied the second line by –1 and added the first and second lines, while the second line did not change.

Now at the top left "minus one", which suits us perfectly. Anyone who wants to get +1 can perform an additional action: multiply the first line by –1 (change its sign).

Step 2 ... The first line multiplied by 5 was added to the second line. The first line multiplied by 3 was added to the third line.

Step 3 ... The first line was multiplied by -1, in principle, this is for beauty. We also changed the sign of the third line and moved it to the second place, thus, on the second “step, we have the required unit.

Step 4 ... The second row was added to the third line, multiplied by 2.

Step 5 ... The third line was split by 3.

A sign that indicates an error in calculations (less often - a typo) is the "bad" bottom line. That is, if at the bottom we got something like (0 0 11 | 23), and, accordingly, 11x 3 = 23, x 3 = 23/11, then with a high degree of probability it can be argued that an error was made during elementary transformations.

We carry out reverse, in the design of examples, they often do not rewrite the system itself, and the equations "are taken directly from the given matrix." The reverse move, I remind you, works "from the bottom up". In this example, we got a gift:

x 3 = 1
x 2 = 3
x 1 + x 2 - x 3 = 1, therefore x 1 + 3 - 1 = 1, x 1 = –1

Answer: x 1 = –1, x 2 = 3, x 3 = 1.

Let's solve the same system according to the proposed algorithm. We get

4 2 –1 1
5 3 –2 2
3 2 –3 0

Divide the second equation by 5, and the third by 3. We get:

4 2 –1 1
1 0.6 –0.4 0.4
1 0.66 –1 0

Multiplying the second and third equations by 4, we get:

4 2 –1 1
4 2,4 –1.6 1.6
4 2.64 –4 0

Subtracting the first equation from the second and third equations, we have:

4 2 –1 1
0 0.4 –0.6 0.6
0 0.64 –3 –1

Divide the third equation by 0.64:

4 2 –1 1
0 0.4 –0.6 0.6
0 1 –4.6875 –1.5625

Multiply the third equation by 0.4

4 2 –1 1
0 0.4 –0.6 0.6
0 0.4 –1.875 –0.625

Subtracting the second from the third equation, we get a "stepwise" extended matrix:

4 2 –1 1
0 0.4 –0.6 0.6
0 0 –1.275 –1.225

Thus, since the error accumulated during the calculations, we get x 3 = 0.96 or approximately 1.

x 2 = 3 and x 1 = –1.

Solving in this way, you will never get confused in the calculations and, despite the calculation errors, you will get the result.

This method of solving a system of linear algebraic equations is easily programmable and does not take into account the specific features of the coefficients for unknowns, because in practice (in economic and technical calculations) one has to deal with non-integer coefficients.

Wish you success! See you in class! Tutor Dmitry Aistrakhanov.

site, with full or partial copying of the material, a link to the source is required.


Gauss method perfect for solving systems of linear algebraic equations (SLAE). It has several advantages over other methods:

  • firstly, there is no need to first investigate the system of equations for compatibility;
  • second, the Gauss method can solve not only SLAEs in which the number of equations coincides with the number of unknown variables and the main matrix of the system is non-degenerate, but also systems of equations in which the number of equations does not coincide with the number of unknown variables or the determinant of the main matrix is ​​zero;
  • thirdly, the Gauss method leads to a result with a relatively small number of computational operations.

Brief overview of the article.

First, we give the necessary definitions and introduce the notation.

Next, we describe the Gauss method algorithm for the simplest case, that is, for systems of linear algebraic equations, the number of equations in which coincides with the number of unknown variables and the determinant of the main matrix of the system is not equal to zero. When solving such systems of equations, the essence of the Gauss method is most clearly visible, which consists in the successive elimination of unknown variables. Therefore, the Gaussian method is also called the method successive elimination unknown. Let's show detailed solutions a few examples.

In conclusion, let us consider the solution by the Gauss method of systems of linear algebraic equations, the main matrix of which is either rectangular or degenerate. The solution of such systems has some features, which we will analyze in detail with examples.

Page navigation.

Basic definitions and notation.

Consider a system of p linear equations with n unknowns (p can be equal to n):

Where are unknown variables, are numbers (real or complex), and are free members.

If , then the system of linear algebraic equations is called homogeneous, otherwise - heterogeneous.

The set of values ​​of unknown variables for which all equations of the system turn into identities is called decision of the SLAE.

If there is at least one solution to a system of linear algebraic equations, then it is called joint, otherwise - inconsistent.

If the SLAE has a unique solution, then it is called certain... If there is more than one solution, then the system is called undefined.

The system is said to be written in coordinate form if it has the form
.

This system in matrix form record has the form, where - the main matrix of the SLAE, - the matrix of the column of unknown variables, - the matrix of free terms.

If we add to the matrix A as the (n + 1) th column the matrix-column of free terms, then we get the so-called expanded matrix systems of linear equations. Usually, the expanded matrix is ​​denoted by the letter T, and the column of free members is separated by a vertical line from the rest of the columns, that is,

The square matrix A is called degenerate if its determinant is zero. If, then the matrix A is called non-degenerate.

The next point should be discussed.

If you perform the following actions with a system of linear algebraic equations

  • swap two equations,
  • multiply both sides of an equation by an arbitrary nonzero real (or complex) number k,
  • to both sides of any equation add the corresponding parts of the other equation, multiplied by an arbitrary number k,

then we get an equivalent system that has the same solutions (or, like the original one, has no solutions).

For an extended matrix of a system of linear algebraic equations, these actions will mean performing elementary transformations with rows:

  • permutation of two lines in places,
  • multiplication of all elements of any row of the matrix T by a nonzero number k,
  • adding to the elements of any row of the matrix the corresponding elements of another row, multiplied by an arbitrary number k.

Now you can proceed to the description of the Gauss method.

The solution of systems of linear algebraic equations, in which the number of equations is equal to the number of unknowns and the main matrix of the system is non-degenerate, by the Gauss method.

What would we do at school if we were given the task of finding a solution to the system of equations .

Some would do that.

Note that by adding the left side of the first to the left side of the second equation, and the right side to the right side, we can get rid of the unknown variables x 2 and x 3 and immediately find x 1:

Substitute the found value x 1 = 1 into the first and third equations of the system:

If we multiply both sides of the third equation of the system by -1 and add them to the corresponding parts of the first equation, then we get rid of the unknown variable x 3 and we can find x 2:

Substitute the resulting value x 2 = 2 into the third equation to find the remaining unknown variable x 3:

Others would have done otherwise.

Let us solve the first equation of the system with respect to the unknown variable x 1 and substitute the resulting expression into the second and third equations of the system in order to exclude this variable from them:

Now let's solve the second equation of the system with respect to x 2 and substitute the result obtained in the third equation to exclude the unknown variable x 2 from it:

It can be seen from the third equation of the system that x 3 = 3. From the second equation we find , and from the first equation we obtain.

Familiar solutions, isn't it?

The most interesting thing here is that the second solution is essentially the method of successive elimination of unknowns, that is, the Gauss method. When we expressed unknown variables (first x 1, at the next stage x 2) and substituted them into the rest of the equations of the system, we thereby excluded them. We carried out the exclusion until the moment when there was only one unknown variable left in the last equation. The process of successive elimination of unknowns is called by the direct course of the Gauss method... After completing the direct move, we have the opportunity to calculate the unknown variable found in the last equation. With its help, from the penultimate equation, we find the next unknown variable, and so on. The process of sequentially finding unknown variables as we move from the last equation to the first is called backward Gaussian method.

It should be noted that when we express x 1 through x 2 and x 3 in the first equation, and then substitute the resulting expression in the second and third equations, then the following actions lead to the same result:

Indeed, such a procedure also makes it possible to eliminate the unknown variable x 1 from the second and third equations of the system:

Nuances with the elimination of unknown variables by the Gauss method arise when the equations of the system do not contain some variables.

For example, in SLAE the first equation does not contain the unknown variable x 1 (in other words, the coefficient in front of it is equal to zero). Therefore, we cannot solve the first equation of the system with respect to x 1 in order to exclude this unknown variable from the rest of the equations. The way out of this situation is to rearrange the equations of the system. Since we are considering systems of linear equations, the determinants of the main matrices of which are nonzero, then there is always an equation in which the variable we need is present, and we can rearrange this equation to the position we need. For our example, it is enough to swap the first and second equations of the system , then you can solve the first equation with respect to x 1 and exclude it from the rest of the equations of the system (although x 1 is already absent in the second equation).

We hope you get the gist.

Let's describe Gaussian method algorithm.

Suppose we need to solve a system of n linear algebraic equations with n unknown variables of the form , and let the determinant of its main matrix be nonzero.

We will assume that, since we can always achieve this by rearranging the equations of the system. Eliminate the unknown variable x 1 from all equations of the system, starting with the second. To do this, to the second equation of the system we add the first, multiplied by, to the third equation we add the first, multiplied by, and so on, to the n-th equation we add the first, multiplied by. The system of equations after such transformations takes the form

where, and .

We would come to the same result if we expressed x 1 in terms of other unknown variables in the first equation of the system and substituted the resulting expression in all other equations. Thus, the variable x 1 is excluded from all equations, starting with the second.

Next, we act in a similar way, but only with a part of the resulting system, which is marked in the figure

To do this, to the third equation of the system we add the second multiplied by, to the fourth equation we add the second multiplied by, and so on, to the n-th equation we add the second multiplied by. The system of equations after such transformations takes the form

where, and ... Thus, the variable x 2 is excluded from all equations, starting with the third.

Next, we proceed to the elimination of the unknown x 3, while we act similarly with the part of the system marked in the figure

So we continue the direct course of the Gauss method until the system takes the form

From this moment, we begin the reverse course of the Gauss method: we calculate x n from the last equation as, using the obtained value of x n, we find x n-1 from the penultimate equation, and so on, we find x 1 from the first equation.

Let's analyze the algorithm using an example.

Example.

by the Gauss method.

Solution.

The coefficient a 11 is nonzero, so we proceed to the direct course of the Gauss method, that is, to the elimination of the unknown variable x 1 from all equations of the system, except for the first one. To do this, add the left and right sides of the first equation to the left and right sides of the second, third and fourth equations, multiplied by, respectively, and :

The unknown variable x 1 has been eliminated, go to the exception x 2. To the left and right sides of the third and fourth equations of the system, we add the left and right sides of the second equation, multiplied, respectively, by and :

To complete the direct course of the Gauss method, it remains for us to exclude the unknown variable x 3 from the last equation of the system. Add to the left and right sides of the fourth equation, respectively, the left and right side third equation multiplied by :

You can start the reverse of the Gaussian method.

From the last equation we have ,
from the third equation we obtain
from the second,
from the first.

For verification, you can substitute the obtained values ​​of the unknown variables into the original system of equations. All equations turn into identities, which indicates that the solution by the Gauss method is found correctly.

Answer:

And now we will give the solution of the same example by the Gauss method in matrix notation.

Example.

Find the solution to the system of equations by the Gauss method.

Solution.

The extended matrix of the system has the form ... Above each column are written unknown variables, which correspond to the elements of the matrix.

The direct course of the Gauss method here involves reducing the extended matrix of the system to a trapezoidal form using elementary transformations. This process is similar to the elimination of unknown variables, which we carried out with a coordinate system. Now you will be convinced of this.

Let's transform the matrix so that all elements in the first column, starting from the second, become zero. To do this, add to the elements of the second, third and fourth lines the corresponding elements of the first line multiplied by, and on, respectively:

Next, we transform the resulting matrix so that in the second column all elements starting from the third become zero. This will match the elimination of the unknown variable x 2. To do this, add to the elements of the third and fourth rows the corresponding elements of the first row of the matrix, multiplied, respectively, by and :

It remains to eliminate the unknown variable x 3 from the last equation of the system. To do this, to the elements of the last row of the resulting matrix, we add the corresponding elements of the penultimate row, multiplied by :

It should be noted that this matrix corresponds to the system of linear equations

which was obtained earlier after the direct move.

It's time to go back. In matrix notation, the inverse of the Gaussian method presupposes such a transformation of the resulting matrix so that the matrix marked in the figure

became diagonal, that is, took the form

where are some numbers.

These transformations are similar to the Gaussian forward transforms, but they are performed not from the first line to the last, but from the last to the first.

Add to the elements of the third, second and first lines the corresponding elements of the last line, multiplied by , on and on respectively:

Now add to the elements of the second and first lines the corresponding elements of the third line, multiplied by and by, respectively:

At the last step of the reverse step of the Gaussian method, add the corresponding elements of the second row, multiplied by:

The resulting matrix corresponds to the system of equations , whence we find unknown variables.

Answer:

NOTE.

When using the Gauss method to solve systems of linear algebraic equations, approximate calculations should be avoided, as this can lead to completely incorrect results. We recommend not rounding decimals. Better from decimal fractions go to ordinary fractions.

Example.

Solve a system of three equations using the Gaussian method .

Solution.

Note that in this example the unknown variables have a different notation (not x 1, x 2, x 3, but x, y, z). Let's move on to common fractions:

Eliminate the unknown x from the second and third equations of the system:

In the resulting system, in the second equation there is no unknown variable y, and in the third equation y is present, therefore, we will interchange the second and third equations:

This completes the direct run of the Gauss method (it is not necessary to exclude y from the third equation, since this unknown variable no longer exists).

We proceed to the reverse move.

From the last equation we find ,
from the penultimate


from the first equation we have

Answer:

X = 10, y = 5, z = -20.

The solution of systems of linear algebraic equations, in which the number of equations does not coincide with the number of unknowns or the basic matrix of the system is degenerate, by the Gauss method.

Systems of equations, the main matrix of which is rectangular or square degenerate, may not have solutions, may have a unique solution, or may have an infinite set of solutions.

Now we will figure out how the Gauss method allows us to establish the compatibility or incompatibility of a system of linear equations, and in the case of its compatibility, to determine all solutions (or one single solution).

In principle, the process of eliminating unknown variables in the case of such SLAEs remains the same. However, you should dwell in detail on some situations that may arise.

We pass to the most important stage.

So, let us assume that the system of linear algebraic equations after the completion of the direct course of the Gauss method took the form and not a single equation was reduced to (in this case, we would conclude that the system is incompatible). A logical question arises: "What to do next?"

Let us write out the unknown variables, which are in the first place of all equations of the resulting system:

In our example, these are x 1, x 4 and x 5. In the left-hand sides of the equations of the system, we leave only those terms that contain the written out unknown variables x 1, x 4 and x 5, the remaining terms are transferred to the right-hand side of the equations with the opposite sign:

Let us assign arbitrary values ​​to the unknown variables that are in the right-hand sides of the equations, where - arbitrary numbers:

After that, numbers are found in the right-hand sides of all the equations of our SLAE, and we can go over to the reverse of the Gauss method.

From the last equations of the system we have, from the penultimate equation we find, from the first equation we get

The solution to the system of equations is a set of values ​​of unknown variables

Giving numbers different meanings, we will receive different solutions systems of equations. That is, our system of equations has infinitely many solutions.

Answer:

where - arbitrary numbers.

To consolidate the material, we will analyze in detail the solutions of several more examples.

Example.

Solve a homogeneous system of linear algebraic equations by the Gauss method.

Solution.

Eliminate the unknown variable x from the second and third equations of the system. To do this, to the left and right sides of the second equation, we add, respectively, the left and right sides of the first equation, multiplied by, and to the left and right sides of the third equation, the left and right sides of the first equation, multiplied by:

Now we exclude y from the third equation of the resulting system of equations:

The resulting SLAE is equivalent to the system .

We leave on the left side of the equations of the system only the terms containing the unknown variables x and y, and we transfer the terms with the unknown variable z to the right side:

One of the simplest ways to solve a system of linear equations is a technique based on calculating determinants ( Cramer's rule). Its advantage is that it allows you to immediately record the solution, it is especially convenient in cases where the coefficients of the system are not numbers, but some kind of parameters. Its disadvantage is the cumbersome calculations in the case a large number equations; moreover, Cramer's rule is not directly applicable to systems for which the number of equations does not coincide with the number of unknowns. In such cases, usually apply Gauss method.

Systems of linear equations that have the same set of solutions are called equivalent... Obviously, the set of solutions linear system will not change if any equations are swapped, or one of the equations is multiplied by some nonzero number, or if one equation is added to the other.

Gauss method (method of successive elimination of unknowns) lies in the fact that with the help of elementary transformations the system is reduced to an equivalent system of a step type. First, with the help of the 1st equation, the x 1 of all subsequent equations of the system. Then, with the help of the 2nd equation, x 2 of the 3rd and all subsequent equations. This process, called by the direct course of the Gauss method, continues until only one unknown remains on the left side of the last equation x n... After that, it is produced backward Gaussian method- solving the last equation, we find x n; after that, using this value, from the penultimate equation we calculate x n–1, etc. We find the last x 1 from the first equation.

It is convenient to carry out Gaussian transformations by performing transformations not with the equations themselves, but with the matrices of their coefficients. Consider the matrix:

called expanded system matrix, because in it, in addition to the main matrix of the system, a column of free terms is included. Gauss's method is based on reducing the main matrix of the system to a triangular form (or trapezoidal form in the case of non-square systems) using elementary transformations of the rows (!) Of the extended matrix of the system.

Example 5.1. Solve the system using the Gaussian method:

Solution... Let us write out the extended matrix of the system and, using the first row, after that we will zero out the rest of the elements:

we get zeros in the 2nd, 3rd and 4th rows of the first column:


Now you need all the elements in the second column below the 2nd row to be equal to zero. To do this, you can multiply the second row by –4/7 and add to the 3rd row. However, in order not to deal with fractions, we will create a unit in the 2nd row of the second column and only

Now, to get a triangular matrix, you need to zero out the element of the fourth row of the 3rd column, for this you can multiply the third row by 8/54 and add it to the fourth. However, in order not to deal with fractions, we will swap the positions of the 3rd and 4th rows and the 3rd and 4th columns, and only after that we will zero out the specified element. Note that when the columns are rearranged, the corresponding variables are swapped and you need to remember this; other elementary transformations with columns (addition and multiplication by a number) cannot be performed!


The last simplified matrix corresponds to a system of equations equivalent to the original one:

Hence, using the reverse course of the Gauss method, we find from the fourth equation x 3 = -1; from the third x 4 = –2, from the second x 2 = 2 and from the first equation x 1 = 1. In matrix form, the answer is written as

We have considered the case when the system is definite, i.e. when there is only one solution. Let's see what happens if the system is inconsistent or uncertain.

Example 5.2. Investigate the system using the Gaussian method:

Solution... Write out and transform the extended matrix of the system

We write down a simplified system of equations:

Here, in the last equation, it turned out that 0 = 4, i.e. contradiction. Therefore, the system has no solution, i.e. she inconsistent. à

Example 5.3. Investigate and solve the system using the Gaussian method:

Solution... We write out and transform the extended matrix of the system:

As a result of the transformations, the last line contains only zeros. This means that the number of equations has decreased by one:

Thus, after simplifications, there are two equations, and there are four unknowns, i.e. two unknown "extra". Let it be "superfluous", or, as they say, free variables will be x 3 and x 4 . Then

Assuming x 3 = 2a and x 4 = b, we get x 2 = 1–a and x 1 = 2ba; or in matrix form

A solution written in this way is called common, since by giving the parameters a and b different meanings, all can be described possible solutions systems. a