How to check the gauss method. Reverse Gauss method

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

Systems of linear equations that have the same set of solutions are called equivalent. Obviously, the set of solutions of a linear system will not change if any equations are interchanged, or if one of the equations is multiplied by some non-zero number, or if one equation is added to another.

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 stepwise system. First, with the help of the 1st equation, x 1 of all subsequent equations of the system. Then, using the 2nd equation, we eliminate x 2 of the 3rd and all subsequent equations. This process, called direct Gauss method, continues until only one unknown remains on the left side of the last equation x n. After that, it is made Gaussian reverse– solving the last equation, we find x n; after that, using this value, from the penultimate equation we calculate x n-1 etc. Last we find 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 extended matrix system, because in addition to the main matrix of the system, it includes a column of free members. The Gauss method is based on bringing the main matrix of the system to a triangular form (or trapezoidal form in the case of non-square systems) using elementary row transformations (!) of the extended matrix of the system.

Example 5.1. Solve the system using the Gauss method:

Decision. Let's write out the augmented matrix of the system and, using the first row, after that we will set the rest of the elements to zero:

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


Now we 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 line by -4/7 and add to the 3rd line. 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 3rd and 4th rows and the 3rd and 4th columns, and only after that we will reset the specified element. Note that when the columns are rearranged, the corresponding variables are swapped, and this must be remembered; 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:

From here, 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 indeterminate.

Example 5.2. Explore the system using the Gaussian method:

Decision. We write out and transform the augmented matrix of the system

We write 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 is incompatible. à

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

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

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

Thus, after simplifications, two equations remain, and four unknowns, i.e. two unknown "extra". Let "superfluous", or, as they say, free variables, will 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 general, since, by giving the parameters a and b different values, it is possible to describe all possible solutions of the system. a

Today we deal with the Gauss method for solving systems of linear algebraic equations. You can read about what these systems are in the previous article devoted to solving the same SLAE by the Cramer 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, mastering this method often causes difficulties for students. In this article, we will try to reduce them to nothing!

Gauss method

M Gauss method is the most universal method for solving SLAE (with the exception of very large systems). Unlike the one discussed earlier, it is suitable not only for systems that have a unique solution, but also for systems that have an infinite number of solutions. There are three options here.

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

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

The Gaussian method consists of two stages - direct and inverse.

Direct Gauss method

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

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

What can be done:

  1. You can rearrange the rows of the matrix;
  2. If there are identical (or proportional) rows in the matrix, 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 add a string multiplied by a non-zero number to a string.

Reverse Gauss method

After we transform the system in this way, one unknown xn becomes known, and it is possible to find all the remaining unknowns in reverse order, substituting the already known x's 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 Gauss method online . All you have to do is enter the odds 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 using the Gauss method

And now - an example, so that everything becomes clear and understandable. Let a system of linear equations be given, and it is necessary to solve it by the Gauss method:

First, let's write the augmented matrix:

Now let's take a look at the transformations. Remember that we need to achieve a triangular form of the matrix. Multiply the 1st row by (3). Multiply the 2nd row by (-1). Let's add the 2nd row 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 is brought to the appropriate form. It remains to find the unknowns:

The system in this example has a unique solution. We will consider the solution of systems with an infinite set of solutions in a separate article. Perhaps at first you will not know where to start with matrix transformations, but after appropriate practice you will get your hands on it and will click the Gaussian SLAE like nuts. And if you suddenly come across a SLAU, which turns out to be too tough a nut to crack, contact our authors! you can by leaving an application in the Correspondence. Together we will solve any problem!

This online calculator finds a solution to a system of linear equations (SLE) using the Gaussian method. A detailed solution is given. To calculate, choose the number of variables and the number of equations. Then enter the data in the cells and click on the "Calculate."

x 1

+x2

+x 3

x 1

+x2

+x 3

x 1

+x2

+x 3

=

=

=

Number representation:

Integers and/or Common Fractions
Integers and/or Decimals

Number of digits after decimal separator

×

A warning

Clear all cells?

Close Clear

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

Gauss method

The Gauss method is a method of transition from the original system of linear equations (using equivalent transformations) to a system that is easier to solve than the original system.

The equivalent transformations of the system of linear equations are:

  • swapping two equations in the system,
  • multiplication of any equation in the system by a non-zero real number,
  • adding to one equation another equation multiplied by an arbitrary number.

Consider a system of linear equations:

(1)

We write system (1) in matrix form:

ax=b (2)
(3)

A is called the coefficient matrix of the system, b− right side of constraints, x− vector of variables to be found. Let rank( A)=p.

Equivalent transformations do not change the rank of the coefficient matrix and the rank of the augmented matrix of the system. The set of solutions of the system also does not change under equivalent transformations. The essence of the Gauss method is to bring the matrix of coefficients A to diagonal or stepped.

Let's build the extended matrix of the system:

At the next stage, we reset all elements of column 2, below the element. If the given element is null, then this row is interchanged with the row lying below the given row and having a non-zero element in the second column. Next, we zero out all the elements of column 2 below the leading element a 22. To do this, add rows 3, ... m with row 2 multiplied by − a 32 /a 22 , ..., −a m2 / a 22, respectively. Continuing the procedure, we obtain a matrix of a diagonal or stepped form. Let the resulting augmented matrix look like:

(7)

As rankA=rank(A|b), then the set of solutions (7) is ( n−p) is a variety. Hence n−p unknowns can be chosen arbitrarily. The remaining unknowns from system (7) are calculated as follows. From the last equation we express x p through the rest of the variables and insert into the previous expressions. Next, from the penultimate equation, we express x p−1 through the rest of the variables and insert into the previous expressions, etc. Consider the Gauss method on specific examples.

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

Example 1. Find the general solution of a system of linear equations using the Gauss method:

Denote by a ij elements i-th line and j-th column.

a eleven . To do this, add rows 2,3 with row 1, multiplied by -2/3, -1/2, respectively:

Matrix record type: ax=b, where

Denote by a ij elements i-th line and j-th column.

Exclude the elements of the 1st column of the matrix below the element a eleven . To do this, add rows 2,3 with row 1, multiplied by -1/5, -6/5, respectively:

We divide each row of the matrix by the corresponding leading element (if the leading element exists):

where x 3 , x

Substituting the upper expressions into the lower ones, we obtain the solution.

Then the vector solution can be represented as follows:

where x 3 , x 4 are arbitrary real numbers.

1. System of linear algebraic equations

1.1 The concept of a system of linear algebraic equations

A system of equations is a condition consisting in the simultaneous execution of several equations in several variables. A system of linear algebraic equations (hereinafter referred to as SLAE) containing m equations and n unknowns is a system of the form:

where the numbers a ij are called the coefficients of the system, the numbers b i are free members, 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 the first index i denotes the number of the equation, and the second index j is the number of the unknown at which this coefficient stands. Subject to finding the number x n . It is convenient to write such a system in a compact matrix form: AX=B. Here A is the matrix of coefficients of the system, called the main matrix;

is a column vector of unknown xj.
is a column vector of free members bi.

The product of matrices A * X is defined, since there are as many columns in matrix A as there are rows in matrix X (n pieces).

The extended matrix of the system is the matrix A of the system, supplemented by a column of free members

1.2 Solution of a system of linear algebraic equations

The solution of a system of equations is an ordered set of numbers (values ​​of variables), when substituting them instead of variables, each of the equations of the system turns into a true equality.

The solution of the system is n values ​​of the unknowns x1=c1, x2=c2,…, xn=cn, substituting which all equations of the system turn into true equalities. Any solution of the system can be written as a matrix-column

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

A joint system is called definite if it has a unique solution, and indefinite if it has more than one solution. In the latter case, each of its solutions is called a particular solution of the system. The set of all particular solutions is called the general solution.

To solve a system means to find out whether it is consistent or inconsistent. If the system is compatible, find its general solution.

Two systems are called equivalent (equivalent) if they have the same general solution. In other words, systems are equivalent if every solution to one of them is a solution to the other, and vice versa.

A transformation, the application of which turns a system into a new system equivalent to the original one, is called an equivalent or equivalent transformation. The following transformations can serve as examples of equivalent transformations: swapping two equations of the system, swapping two unknowns together with the coefficients of all equations, multiplying both parts of any equation of the system by a non-zero number.

A system of linear equations is called homogeneous if all free terms are equal to zero:

A homogeneous system is always consistent, since x1=x2=x3=…=xn=0 is a solution to the system. This solution is called null or trivial.

2. Gaussian elimination method

2.1 The essence of the Gaussian elimination method

The classical method for solving systems of linear algebraic equations is the method of successive elimination of unknowns - Gauss method(It is also called the Gaussian elimination method). This is a method of successive elimination of variables, when, with the help of elementary transformations, a system of equations is reduced to an equivalent system of a stepped (or triangular) form, from which all other variables are found sequentially, starting from the last (by number) variables.

The Gaussian solution process consists of two stages: forward and backward moves.

1. Direct move.

At the first stage, the so-called direct move is carried out, when, by means of elementary transformations over rows, the system is brought to a stepped or triangular form, or it is established that the system is inconsistent. Namely, among the elements of the first column of the matrix, a non-zero one is chosen, it is moved to the uppermost position by permuting the rows, and the first row obtained after the permutation is subtracted from the remaining rows, multiplying it by a value equal to the ratio of the first element of each of these rows to the first element of the first row, zeroing thus the column below it.

After the indicated transformations have been made, the first row and the first column are mentally crossed out and continue until a zero-size matrix remains. If at some of the iterations among the elements of the first column there was not found a non-zero one, then go to the next column and perform a similar operation.

At the first stage (forward run), the system is reduced to a stepped (in particular, triangular) form.

The system below is stepwise:

,

The coefficients aii are called the main (leading) elements of the system.

(if a11=0, rearrange the rows of the matrix so that a 11 was not equal to 0. This is always possible, because otherwise the matrix contains a zero column, its determinant is equal to zero and the system is inconsistent).

We transform the system by eliminating the unknown x1 in all equations except the first one (using elementary transformations of the system). To do this, multiply both sides of the first equation by

and add term by term with the second equation of the system (or from the second equation we subtract term by term the first multiplied by ). Then we multiply both parts of the first equation by and add it to the third equation of the system (or subtract the first one multiplied by the third term by term). Thus, we successively multiply the first row by a number and add to i-th line, for i= 2, 3, …,n.

Continuing this process, we get the equivalent system:


– new values ​​of the coefficients for unknowns and free terms in the last m-1 equations of the system, which are determined by the formulas:

Thus, at the first step, all coefficients under the first leading element a 11 are destroyed

0, the second step destroys the elements under the second leading element a 22 (1) (if a 22 (1) 0), and so on. Continuing this process further, we will finally reduce the original system to a triangular system at the (m-1) step.

If, in the process of reducing the system to a stepwise form, zero equations appear, i.e. equalities of the form 0=0, they are discarded. If there is an equation of the form

This indicates the incompatibility of the system.

This completes the direct course of the Gauss method.

2. Reverse move.

At the second stage, the so-called reverse move is carried out, the essence of which is to express all the resulting basic variables in terms of non-basic ones and construct a fundamental system of solutions, or, if all variables are basic, then numerically express the only solution to the system of linear equations.

This procedure begins with the last equation, from which the corresponding basic variable is expressed (there is only one in it) and substituted into the previous equations, and so on, going up the "steps".

Each line corresponds to exactly one basic variable, so at each step, except for the last (topmost), the situation exactly repeats the case of the last line.

Note: in practice, it is more convenient to work not with the system, but with its extended matrix, performing all elementary transformations on its rows. It is convenient that the coefficient a11 be equal to 1 (rearrange the equations, or divide both sides of the equation by a11).

2.2 Examples of solving SLAE by the Gauss method

In this section, using three different examples, we will show how the Gaussian method can be used to solve SLAE.

Example 1. Solve SLAE of the 3rd order.

Set the coefficients to zero at

in the second and third lines. To do this, multiply them by 2/3 and 1, respectively, and add them to the first line:

We continue to consider systems of linear equations. This lesson is the third on the topic. If you have a vague idea of ​​what a system of linear equations is in general, you feel like a teapot, then I recommend starting with the basics on the Next page, it is useful to study the lesson.

Gauss method is easy! Why? The famous German mathematician Johann Carl Friedrich Gauss, during his lifetime, received recognition as the greatest mathematician of all time, a genius, and even the nickname "King of Mathematics". And everything ingenious, as you know, is simple! By the way, not only suckers, but also geniuses get into the money - the portrait of Gauss flaunted on a bill of 10 Deutschmarks (before the introduction of the euro), and Gauss still mysteriously smiles at the Germans from ordinary postage stamps.

The Gauss method is simple in that it IS ENOUGH THE KNOWLEDGE OF A FIFTH-GRADE STUDENT to master it. Must be able to add and multiply! It is no coincidence that the method of successive elimination of unknowns is often considered by teachers at school mathematical electives. It is a paradox, but the Gauss method causes the greatest difficulties for students. Nothing surprising - it's all about the methodology, and I will try to tell in an accessible form about the algorithm of the method.

First, we systematize the knowledge about systems of linear equations a little. A system of linear equations can:

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

The Gauss method is the most powerful and versatile tool for finding a solution any systems of linear equations. As we remember Cramer's rule and matrix method are unsuitable in cases where the system has infinitely many solutions or is inconsistent. A method of successive elimination of unknowns anyway lead us to the answer! In this lesson, we will again consider the Gauss method for case No. 1 (the only solution to the system), an article is reserved for the situations of points No. 2-3. I note that the method algorithm itself works in the same way in all three cases.

Let's return to the simplest system from the lesson How to solve a system of linear equations? and solve it using the Gaussian method.

The first step is to write extended matrix system: . By what principle the coefficients are recorded, I think everyone can see. The vertical line inside the matrix does not carry any mathematical meaning - it's just a strikethrough for ease of design.

Reference : I recommend to remember terms linear algebra. System Matrix is a matrix composed only of coefficients for unknowns, in this example, the matrix of the system: . Extended System Matrix is the same matrix of the system plus a column of free members, in this case: . Any of the matrices can be called simply a matrix for brevity.

After the extended matrix of the system is written, it is necessary to perform some actions with it, which are also called elementary transformations.

There are the following elementary transformations:

1) Strings matrices can rearrange places. For example, in the matrix under consideration, you can safely rearrange the first and second rows:

2) If there are (or appeared) proportional (as a special case - identical) rows in the matrix, then it follows delete from the matrix, all these rows except one. Consider, for example, the matrix . In this matrix, the last three rows are proportional, so it is enough to leave only one of them: .

3) If a zero row appeared in the matrix during the transformations, then it also follows delete. I will not draw, of course, the zero line is the line in which only zeros.

4) The row of the matrix can be multiply (divide) for any number non-zero. Consider, for example, the matrix . Here it is advisable to divide the first line by -3, and multiply the second line by 2: . This action is very useful, as it simplifies further transformations of the matrix.

5) This transformation causes the most difficulties, but in fact there is nothing complicated either. To the row of the matrix, you can add another string multiplied by a number, different from zero. Consider our matrix from a practical example: . First, I will describe the transformation in great detail. Multiply the first row by -2: , and to the second line we add the first line multiplied by -2: . Now the first line can be divided "back" by -2: . As you can see, the line that is ADDED LIhasn't changed. Always the line is changed, TO WHICH ADDED UT.

In practice, of course, they don’t paint in such detail, but write shorter: Once again: to the second line added the first row multiplied by -2. The line is usually multiplied orally or on a draft, while the mental course of calculations is something like this:

“I rewrite the matrix and rewrite the first row: »

First column first. Below I need to get zero. Therefore, I multiply the unit above by -2:, and add the first to the second line: 2 + (-2) = 0. I write the result in the second line: »

“Now the second column. Above -1 times -2: . I add the first to the second line: 1 + 2 = 3. I write the result to the second line: »

“And the third column. Above -5 times -2: . I add the first line to the second line: -7 + 10 = 3. I write the result in the second line: »

Please think carefully about this example and understand the sequential calculation algorithm, if you understand this, then the Gauss method is practically "in your pocket". But, of course, we are still working on this transformation.

Elementary transformations do not change the solution of the system of equations

! ATTENTION: considered manipulations can not use, if you are offered a task where the matrices are given "by themselves". For example, with "classic" matrices in no case should you rearrange something inside the matrices! Let's return to our system. She's practically broken into pieces.

Let us write the augmented matrix of the system and, using elementary transformations, reduce it to stepped view:

(1) The first row was added to the second row, multiplied by -2. And again: why do we multiply the first row by -2? In order to get zero at the bottom, which means getting rid of one variable in the second line.

(2) Divide the second row by 3.

The purpose of elementary transformations convert the matrix to step form: . In the design of the task, they directly draw out the “ladder” with a simple pencil, and also circle the numbers that are located on the “steps”. The term "stepped view" itself is not entirely theoretical; in the scientific and educational literature, it is often called trapezoidal view or triangular view.

As a result of elementary transformations, we have obtained equivalent original system of equations:

Now the system needs to be "untwisted" in the opposite direction - from the bottom up, this process is called reverse Gauss method.

In the lower equation, we already have the finished result: .

Consider the first equation of the system and substitute the already known value of “y” into it:

Let's consider the most common situation, when the Gaussian method is required to solve a system of three linear equations with three unknowns.

Example 1

Solve the system of equations using the Gauss method:

Let's write the augmented matrix of the system:

Now I will immediately draw the result that we will come to in the course of the solution: And I repeat, our goal is to bring the matrix to a stepped form using elementary transformations. Where to start taking action?

First, look at the top left number: Should almost always be here unit. Generally speaking, -1 (and sometimes other numbers) will also suit, but somehow it has traditionally happened that a unit is usually placed there. How to organize a unit? We look at the first column - we have a finished unit! Transformation one: swap the first and third lines:

Now the first line will remain unchanged until the end of the solution. Now fine.

The unit in the top left is organized. Now you need to get zeros in these places:

Zeros are obtained just with the help of a "difficult" transformation. First, we deal with the second line (2, -1, 3, 13). What needs to be done to get zero in the first position? Need to the second line add the first line multiplied by -2. Mentally or on a draft, we multiply the first line by -2: (-2, -4, 2, -18). And we consistently carry out (again mentally or on a draft) addition, to the second line we add the first line, already multiplied by -2:

The result is written in the second line:

Similarly, we deal with the third line (3, 2, -5, -1). To get zero in the first position, you need to the third line add the first line multiplied by -3. Mentally or on a draft, we multiply the first line by -3: (-3, -6, 3, -27). And to the third line we add the first line multiplied by -3:

The result is written in the third line:

In practice, these actions are usually performed verbally and written down in one step:

No need to count everything at once and at the same time. The order of calculations and "insertion" of results consistent and usually like this: first we rewrite the first line, and puff ourselves quietly - CONSISTENTLY and ATTENTIVELY:
And I have already considered the mental course of the calculations themselves above.

In this example, this is easy to do, we divide the second line by -5 (since all numbers there are divisible by 5 without a remainder). At the same time, we divide the third line by -2, because the smaller the number, the simpler the solution:

At the final stage of elementary transformations, one more zero must be obtained here:

For this to the third line we add the second line, multiplied by -2:
Try to parse this action yourself - mentally multiply the second line by -2 and carry out the addition.

The last action performed is the hairstyle of the result, divide the third line by 3.

As a result of elementary transformations, an equivalent initial system of linear equations was obtained: Cool.

Now the reverse course of the Gaussian method comes into play. The equations "unwind" from the bottom up.

In the third equation, we already have the finished result:

Let's look at the second equation: . The meaning of "z" is already known, thus:

And finally, the first equation: . "Y" and "Z" are known, the matter is small:

Answer:

As has been repeatedly noted, for any system of equations, it is possible and necessary to check the found solution, fortunately, this is not difficult and fast.

Example 2

This is an example for self-solving, a sample of finishing and an answer at the end of the lesson.

It should be noted that your course of action may not coincide with my course of action, and this is a feature of the Gauss method. But the answers must be the same!

Example 3

Solve a system of linear equations using the Gauss method

We look at the upper left "step". There we should have a unit. The problem is that there are no ones in the first column at all, so nothing can be solved by rearranging the rows. In such cases, the unit must be organized using an elementary transformation. This can usually be done in several ways. I did this: (1) To the first line we add the second line, multiplied by -1. That is, we mentally multiplied the second line by -1 and performed the addition of 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 gesture: multiply the first line by -1 (change its sign).

(2) The first row multiplied by 5 was added to the second row. The first row multiplied by 3 was added to the third row.

(3) The first line was multiplied by -1, in principle, this is for beauty. The sign of the third line was also changed and moved to the second place, thus, on the second “step, we had the desired unit.

(4) The second line multiplied by 2 was added to the third line.

(5) The third row was divided by 3.

A bad sign that indicates a calculation error (less often a typo) is a “bad” bottom line. That is, if we got something like below, and, accordingly, , then with a high degree of probability it can be argued that an error was made in the course of elementary transformations.

We charge the reverse move, in the design of examples, the system itself is often not rewritten, and the equations are “taken directly from the given matrix”. The reverse move, I remind you, works from the bottom up. Yes, here is a gift:

Answer: .

Example 4

Solve a system of linear equations using the Gauss method

This is an example for an independent solution, it is somewhat more complicated. It's okay if someone gets confused. Full solution and design sample at the end of the lesson. Your solution may differ from mine.

In the last part, we consider some features of the Gauss algorithm. The first feature is that sometimes some variables are missing in the equations of the system, for example: How to correctly write the augmented matrix of the system? I already talked about this moment in the lesson. Cramer's rule. Matrix method. In the expanded matrix of the system, we put zeros in place of the missing variables: By the way, this is a fairly easy example, since there is already one zero in the first column, and there are fewer elementary transformations to perform.

The second feature is this. In all the examples considered, we placed either –1 or +1 on the “steps”. Could there be other numbers? In some cases they can. Consider the system: .

Here on the upper left "step" we have a deuce. But we notice the fact that all the numbers in the first column are divisible by 2 without a remainder - and another two and six. And the deuce at the top left will suit us! At the first step, you need to perform the following transformations: add the first line multiplied by -1 to the second line; to the third line add the first line multiplied by -3. Thus, we will get the desired zeros in the first column.

Or another hypothetical example: . Here, the triple on the second “rung” also suits us, since 12 (the place where we need to get zero) is divisible by 3 without a remainder. It is necessary to carry out the following transformation: to the third line, add the second line, multiplied by -4, as a result of which the zero we need will be obtained.

The Gauss method is universal, but there is one peculiarity. You can confidently learn how to solve systems by other methods (Cramer's method, matrix method) literally from the first time - there is a very rigid algorithm. But in order to feel confident in the Gauss method, you should “fill your hand” and solve at least 5-10 ten systems. Therefore, at first there may be confusion, errors in calculations, and there is nothing unusual or tragic in this.

Rainy autumn weather outside the window .... Therefore, for everyone, a more complex example for an independent solution:

Example 5

Solve a system of 4 linear equations with four unknowns using the Gauss method.

Such a task in practice is not so rare. I think that even a teapot who has studied this page in detail understands the algorithm for solving such a system intuitively. Basically the same - just more action.

The cases when the system has no solutions (inconsistent) or has infinitely many solutions are considered in the lesson. Incompatible systems and systems with a common solution. There you can fix the considered algorithm of the Gauss method.

Wish you luck!

Solutions and answers:

Example 2: Decision : Let us write down the extended matrix of the system and, using elementary transformations, bring it to a stepped form.
Performed elementary transformations: (1) The first row was added to the second row, multiplied by -2. The first line was added to the third line, multiplied by -1. Attention! Here it may be tempting to subtract the first from the third line, I strongly do not recommend subtracting - the risk of error greatly increases. We just fold! (2) The sign of the second line was changed (multiplied by -1). The second and third lines have been swapped. note that on the “steps” we are satisfied not only with one, but also with -1, which is even more convenient. (3) To the third line, add the second line, multiplied by 5. (4) The sign of the second line was changed (multiplied by -1). The third line was divided by 14.

Reverse move:

Answer : .

Example 4: Decision : We write the extended matrix of the system and, using elementary transformations, bring it to a step form:

Conversions performed: (1) The second line was added to the first line. Thus, the desired unit is organized on the upper left “step”. (2) The first row multiplied by 7 was added to the second row. The first row multiplied by 6 was added to the third row.

With the second "step" everything is worse , the "candidates" for it are the numbers 17 and 23, and we need either one or -1. Transformations (3) and (4) will be aimed at obtaining the desired unit (3) The second line was added to the third line, multiplied by -1. (4) The third line, multiplied by -3, was added to the second line. The necessary thing on the second step is received . (5) To the third line added the second, multiplied by 6. (6) The second row was multiplied by -1, the third row was divided by -83.

Reverse move:

Answer :

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

Conversions performed: (1) The first and second lines have been swapped. (2) The first row was added to the second row, multiplied by -2. The first line was added to the third line, multiplied by -2. The first line was added to the fourth line, multiplied by -3. (3) The second line multiplied by 4 was added to the third line. The second line multiplied by -1 was added to the fourth line. (4) The sign of the second line has been changed. The fourth line was divided by 3 and placed instead of the third line. (5) The third line was added to the fourth line, multiplied by -5.

Reverse move:

Answer :