A system of linear equations, the Gauss method, is given. Solving systems of linear equations using the Gauss method

One of the universal and effective methods for solving linear algebraic systems is Gauss method , consisting in the successive elimination of unknowns.

Recall that the two systems are called equivalent (equivalent) if the sets of their solutions are the same. In other words, systems are equivalent if every solution to one of them is a solution to the other, and vice versa. Equivalent systems are obtained with elementary transformations system equations:

    multiplying both sides of the equation by a non-zero number;

    adding to some equation the corresponding parts of another equation, multiplied by a number other than zero;

    permutation of two equations.

Let the system of equations

The process of solving this system by the Gauss method consists of two stages. At the first stage (forward run), the system with the help of elementary transformations reduced to stepped , or triangular mind, and at the second stage (reverse move) there is a sequential, starting from the last variable, the definition of unknowns from the resulting step system.

Let us assume that the coefficient of this system
, otherwise in the system the first row can be interchanged with any other row so that the coefficient at was different from zero.

Let's transform the system, eliminating the unknown in all equations except the first. 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, we obtain an equivalent system

Here
are the new values ​​of the coefficients and free terms, which are obtained after the first step.

Similarly, considering the main element
, exclude the unknown from all equations of the system, except for the first and second. We continue this process as long as possible, as a result we get a step system

,

where ,
,…,- the main elements of the system
.

If in the process of bringing the system to a step form, equations appear, i.e., equalities of the form
, they are discarded, since any set of numbers satisfies them
. If at
an equation of the form that has no solutions appears, this indicates the inconsistency of the system.

In the reverse course, the first unknown is expressed from the last equation of the transformed step system through all the other unknowns
who are called free . Then the variable expression from the last equation of the system is substituted into the penultimate equation and the variable is expressed from it
. The variables are defined in a similar way
. Variables
, expressed in terms of free variables, are called basic (dependent). The result is common decision systems linear equations.

To find private decision systems, free unknown
in the general solution, arbitrary values ​​are assigned and the values ​​of the variables are calculated
.

It is technically more convenient to subject elementary transformations not to the equations of the system, but to the extended matrix of the system

.

The Gauss method is a universal method that allows you to solve not only square, but also rectangular systems in which the number of unknowns
not equal to the number of equations
.

The advantage of this method also lies in the fact that in the process of solving we simultaneously examine the system for compatibility, since, having reduced the augmented matrix
to the stepped form, it is easy to determine the ranks of the matrix and extended matrix
and apply the Kronecker-Capelli theorem .

Example 2.1 Solve the system using the Gauss method

Decision. Number of Equations
and the number of unknowns
.

Let us compose the extended matrix of the system by assigning to the right of the matrix of coefficients free members column .

Let's bring the matrix to a triangular shape; to do this, we will get "0" below the elements on the main diagonal using elementary transformations.

To get "0" in the second position of the first column, multiply the first row by (-1) and add to the second row.

We write this transformation as a number (-1) against the first line and denote it by an arrow going from the first line to the second line.

To get "0" in the third position of the first column, multiply the first row by (-3) and add to the third row; Let's show this action with an arrow going from the first line to the third.




.

In the resulting matrix, written second in the matrix chain, we get "0" in the second column in the third position. To do this, multiply the second line by (-4) and add to the third. In the resulting matrix, we multiply the second row by (-1), and divide the third row by (-8). All elements of this matrix that lie below the diagonal elements are zeros.

As , the system is collaborative and specific.

The system of equations corresponding to the last matrix has a triangular form:

From the last (third) equation
. Substitute in the second equation and get
.

Substitute
and
into the first equation, we find


.

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 drawback is the cumbersomeness of calculations in the case a large number 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 sequential exclusion unknown) 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 system matrix, 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 various meanings, you can describe everything possible solutions systems. a

The online calculator finds a solution to the system of linear equations (SLE) by the Gauss 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 integers 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.

Ever since the beginning of the 16th-18th centuries, mathematicians began to intensively study the functions, thanks to which so much has changed in our lives. Computer technology without this knowledge would simply not exist. For solutions challenging tasks, linear equations and functions were created various concepts, theorems and methods of solution. One of such universal and rational methods and techniques for solving linear equations and their systems was the Gauss method. Matrices, their rank, determinant - everything can be calculated without using complex operations.

What is SLAU

In mathematics, there is the concept of SLAE - a system of linear algebraic equations. What does she represent? This is a set of m equations with the required n unknowns, usually denoted as x, y, z, or x 1 , x 2 ... x n, or other symbols. To solve this system by the Gaussian method means to find all unknown unknowns. If the system has the same number unknowns and equations, then it is called an n-th order system.

The most popular methods for solving SLAE

AT educational institutions secondary education are studying various techniques for solving such systems. Most often this simple equations, consisting of two unknowns, so any existing method it won't take long to find answers to them. It can be like a substitution method, when another equation is derived from one equation and substituted into the original one. Or term by term subtraction and addition. But the Gauss method is considered the easiest and most universal. It makes it possible to solve equations with any number of unknowns. Why is this technique considered rational? Everything is simple. The matrix method is good because it does not require several times to rewrite unnecessary characters in the form of unknowns, it is enough to do arithmetic operations on the coefficients - and you will get a reliable result.

Where are SLAEs used in practice?

The solution of SLAE are the points of intersection of lines on the graphs of functions. In our high-tech computer age, people who are closely involved in the development of games and other programs need to know how to solve such systems, what they represent and how to check the correctness of the resulting result. Most often, programmers develop special linear algebra calculators, this includes a system of linear equations. The Gauss method allows you to calculate all existing solutions. Other simplified formulas and techniques are also used.

SLAE compatibility criterion

Such a system can only be solved if it is compatible. For clarity, we present the SLAE in the form Ax=b. It has a solution if rang(A) equals rang(A,b). In this case, (A,b) is an extended form matrix that can be obtained from matrix A by rewriting it with free terms. It turns out that solving linear equations using the Gaussian method is quite easy.

Perhaps some notation is not entirely clear, so it is necessary to consider everything with an example. Let's say there is a system: x+y=1; 2x-3y=6. It consists of only two equations in which there are 2 unknowns. The system will have a solution only if the rank of its matrix is ​​equal to the rank of the augmented matrix. What is a rank? This is the number of independent lines of the system. In our case, the rank of the matrix is ​​2. Matrix A will consist of the coefficients located near the unknowns, and the coefficients behind the “=” sign will also fit into the expanded matrix.

Why SLAE can be represented in matrix form

Based on the compatibility criterion according to the proven Kronecker-Capelli theorem, the system of linear algebraic equations can be represented in matrix form. Using the Gaussian cascade method, you can solve the matrix and get the only reliable answer for the entire system. If the rank of an ordinary matrix is ​​equal to the rank of its extended matrix, but less than the number of unknowns, then the system has an infinite number of answers.

Matrix transformations

Before moving on to solving matrices, it is necessary to know what actions can be performed on their elements. There are several elementary transformations:

  • By rewriting the system into a matrix form and carrying out its solution, it is possible to multiply all the elements of the series by the same coefficient.
  • In order to convert a matrix to canonical form, two parallel rows can be swapped. The canonical form implies that all elements of the matrix that are located along the main diagonal become ones, and the remaining ones become zeros.
  • The corresponding elements of the parallel rows of the matrix can be added one to the other.

Jordan-Gauss method

The essence of solving systems of linear homogeneous and inhomogeneous equations Gaussian method is to gradually eliminate the unknowns. Let's say we have a system of two equations in which there are two unknowns. To find them, you need to check the system for compatibility. The Gaussian equation is solved very simply. It is necessary to write out the coefficients located near each unknown in a matrix form. To solve the system, you need to write out the augmented matrix. If one of the equations contains a smaller number of unknowns, then "0" must be put in place of the missing element. All known transformation methods are applied to the matrix: multiplication, division by a number, adding the corresponding elements of the rows to each other, and others. It turns out that in each row it is necessary to leave one variable with the value "1", the rest should be reduced to zero. For a more accurate understanding, it is necessary to consider the Gauss method with examples.

A simple example of solving a 2x2 system

To begin with, let's take a simple system of algebraic equations, in which there will be 2 unknowns.

Let's rewrite it in an augmented matrix.

To solve this system of linear equations, only two operations are required. We need to bring the matrix to the canonical form so that there are units along the main diagonal. So, translating from the matrix form back into the system, we get the equations: 1x+0y=b1 and 0x+1y=b2, where b1 and b2 are the answers obtained in the process of solving.

  1. The first step in solving the augmented matrix will be as follows: the first row must be multiplied by -7 and the corresponding elements added to the second row, respectively, in order to get rid of one unknown in the second equation.
  2. Since the solution of equations by the Gauss method implies bringing the matrix to the canonical form, then it is necessary to do the same operations with the first equation and remove the second variable. To do this, we subtract the second line from the first and get the necessary answer - the solution of the SLAE. Or, as shown in the figure, we multiply the second row by a factor of -1 and add the elements of the second row to the first row. This is the same.

As you can see, our system is solved by the Jordan-Gauss method. We rewrite it in the required form: x=-5, y=7.

An example of solving SLAE 3x3

Suppose we have a more complex system of linear equations. The Gauss method makes it possible to calculate the answer even for the most seemingly confusing system. Therefore, in order to delve deeper into the calculation methodology, we can move on to a more complex example with three unknowns.

As in the previous example, we rewrite the system in the form of an expanded matrix and begin to bring it to the canonical form.

To solve this system, you will need to perform much more actions than in the previous example.

  1. First you need to make in the first column one single element and the rest zeros. To do this, multiply the first equation by -1 and add the second equation to it. It is important to remember that we rewrite the first line in original form, and the second - already in the modified.
  2. Next, we remove the same first unknown from the third equation. To do this, we multiply the elements of the first row by -2 and add them to the third row. Now the first and second lines are rewritten in their original form, and the third - already with changes. As you can see from the result, we got the first one at the beginning of the main diagonal of the matrix and the rest are zeros. A few more actions, and the system of equations by the Gauss method will be reliably solved.
  3. Now you need to do operations on other elements of the rows. The third and fourth steps can be combined into one. We need to divide the second and third lines by -1 to get rid of the negative ones on the diagonal. We have already brought the third line to the required form.
  4. Next, we canonicalize the second line. To do this, we multiply the elements of the third row by -3 and add them to the second line of the matrix. It can be seen from the result that the second line is also reduced to the form we need. It remains to do a few more operations and remove the coefficients of the unknowns from the first row.
  5. In order to make 0 from the second element of the row, you need to multiply the third row by -3 and add it to the first row.
  6. The next decisive step is to add to the first line necessary elements second row. So we get the canonical form of the matrix, and, accordingly, the answer.

As you can see, the solution of equations by the Gauss method is quite simple.

An example of solving a 4x4 system of equations

Some more complex systems of equations can be solved by the Gaussian method using computer programs. It is necessary to drive coefficients for unknowns into existing empty cells, and the program will calculate the required result step by step, describing each action in detail.

Described below step-by-step instruction solutions to this example.

In the first step, free coefficients and numbers for unknowns are entered into empty cells. Thus, we get the same augmented matrix that we write by hand.

And all the necessary arithmetic operations are performed to bring the extended matrix to the canonical form. It must be understood that the answer to a system of equations is not always integers. Sometimes the solution can be from fractional numbers.

Checking the correctness of the solution

The Jordan-Gauss method provides for checking the correctness of the result. In order to find out whether the coefficients are calculated correctly, you just need to substitute the result into the original system of equations. The left side of the equation must match the right side, which is behind the equals sign. If the answers do not match, then you need to recalculate the system or try to apply another method of solving SLAE known to you, such as substitution or term-by-term subtraction and addition. After all, mathematics is a science that has a huge number of various techniques solutions. But remember: the result should always be the same, no matter what solution method you used.

Gauss method: the most common errors in solving SLAE

During the decision linear systems equations, errors such as incorrect transfer of coefficients to matrix form most often occur. There are systems in which some unknowns are missing in one of the equations, then, transferring the data to the expanded matrix, they can be lost. As a result, when solving this system, the result may not correspond to the real one.

Another of the main mistakes can be incorrect writing out the final result. It must be clearly understood that the first coefficient will correspond to the first unknown from the system, the second - to the second, and so on.

The Gauss method describes in detail the solution of linear equations. Thanks to him, it is easy to perform the necessary operations and find the right result. In addition, this is a universal tool for finding a reliable answer to equations of any complexity. Maybe that is why it is so often used in solving SLAE.


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

  • firstly, there is no need to pre-investigate the system of equations for compatibility;
  • secondly, the Gauss method can be used to 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 zero;
  • thirdly, the Gauss method leads to a result with a relatively small number of computational operations.

Brief review of the article.

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

Next, we describe the algorithm of the Gauss method 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 of successive elimination of unknowns. Let's show detailed solutions a few examples.

In conclusion, we consider the Gaussian solution of systems of linear algebraic equations whose main matrix is ​​either rectangular or degenerate. The solution of such systems has some features, which we will analyze in detail using 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), are free members.

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

The set of values ​​of unknown variables, in which all equations of the system turn into identities, is called SLAU decision.

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

If the SLAE has only decision, then it is called certain. If there is more than one solution, then the system is called uncertain.

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

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

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 augmented 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 following point should be noted.

If the following actions are performed with a system of linear algebraic equations

  • swap two equations,
  • multiply both sides of any equation by an arbitrary and non-zero real (or complex) number k,
  • to both parts 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 elementary transformations with rows:

  • swapping two strings
  • multiplication of all elements of any row of the matrix T by a non-zero 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 we can proceed to the description of the Gauss method.

Solving 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 nondegenerate, by the Gauss method.

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

Some would do so.

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

We substitute the found value x 1 \u003d 1 into the first and third equations of the system:

If we multiply both parts 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 can find x 2:

We substitute the obtained value x 2 \u003d 2 into the third equation and find the remaining unknown variable x 3:

Others would have done otherwise.

Let's 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 into the third equation in order 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 get .

Familiar solutions, right?

The most interesting thing here is that the second solution method is essentially the method of sequential elimination of unknowns, that is, the Gauss method. When we expressed unknown variables (first x 1 , next x 2 ) and substituted them into the rest of the equations of the system, we thereby excluded them. We carried out the exception until the moment when the last equation left only one unknown variable. The process of sequential elimination of unknowns is called direct Gauss method. After the forward move is completed, we have the opportunity to calculate the unknown variable in the last equation. With its help, from the penultimate equation, we find the next unknown variable, and so on. The process of successively finding unknown variables while moving from the last equation to the first is called reverse Gauss method.

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

Indeed, such a procedure also allows us to exclude 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 SLAU in the first equation, there is no unknown variable x 1 (in other words, the coefficient in front of it is 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 swap the equations of the system. Since we are considering systems of linear equations whose determinants of the main matrices are different from zero, there always exists 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 for 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 Gauss 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. We exclude the unknown variable x 1 from all equations of the system, starting from the second one. To do this, add the first equation multiplied by to the second equation of the system, add the first multiplied by to the third equation, and so on, add the first multiplied by to the nth equation. The system of equations after such transformations will take the form

where , a .

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 into all other equations. Thus, the variable x 1 is excluded from all equations, starting from the second.

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

To do this, add the second equation multiplied by to the third equation of the system, add the second multiplied by to the fourth equation, and so on, add the second multiplied by to the nth equation. The system of equations after such transformations will take the form

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

Next, we proceed to the elimination of the unknown x 3, while acting 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 with an example.

Example.

Gaussian method.

Decision.

The coefficient a 11 is different from zero, so let's 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, to the left and right parts of the second, third and fourth equations, add the left and right parts of the first equation, multiplied by , respectively, and :

The unknown variable x 1 has been eliminated, let's move on to the exclusion x 2 . To the left and right parts of the third and fourth equations of the system, we add the left and right parts of the second equation, multiplied by and :

To complete the forward course of the Gauss method, we need to exclude the unknown variable x 3 from the last equation of the system. Let us add to the left and right parts of the fourth equation, respectively, the left and right side third equation multiplied by :

You can start the reverse course of the Gauss method.

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

To check, you can substitute the obtained values ​​of unknown variables into the original system of equations. All equations turn into identities, which means that the solution by the Gauss method was found correctly.

Answer:

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

Example.

Find a solution to the system of equations Gaussian method.

Decision.

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

The direct course of the Gauss method here involves bringing the extended matrix of the system to a trapezoidal form using elementary transformations. This process is similar to the exclusion of unknown variables that we did with the system in coordinate form. Now you will be convinced of it.

Let's transform the matrix so that all elements in the first column, starting from the second, become zero. To do this, to the elements of the second, third and fourth rows, add the corresponding elements of the first row 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 would correspond to excluding 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 by and :

It remains to exclude 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 turn back. In the matrix form of the notation, the reverse course of the Gauss method involves 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 those of the Gauss method, but 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 rows the corresponding elements of the last row, multiplied by , on and on respectively:

Now let's add to the elements of the second and first rows the corresponding elements of the third row, multiplied by and by, respectively:

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

The resulting matrix corresponds to the system of equations , from which we find the 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 absolutely incorrect results. We recommend that you do not round decimals. Better off decimal fractions go to ordinary fractions.

Example.

Solve System of Three Equations by Gaussian Method .

Decision.

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

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

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

At this point, the direct course of the Gauss method is over (you do not need to exclude y from the third equation, since this unknown variable no longer exists).

Getting Started reverse course.

From the last equation we find ,
from 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 main matrix of the system is degenerate, by the Gauss method.

Systems of equations whose main matrix is ​​rectangular or square degenerate may have no solutions, may have a single solution, or may have an infinite number of solutions.

Now we will understand how the Gauss method allows us to establish the compatibility or inconsistency of a system of linear equations, and in the case of its compatibility, 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, it is worth dwelling in detail on some situations that may arise.

Let's move on to the most important step.

So, let us assume that the system of linear algebraic equations after the completion of the forward run of the Gauss method takes the form and none of the equations reduced to (in this case, we would conclude that the system is inconsistent). A logical question arises: "What to do next"?

We write out the unknown variables that are in the first place of all the equations of the resulting system:

In our example, these are x 1 , x 4 and x 5 . In the left parts 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, we transfer the remaining terms to the right side of the equations with the opposite sign:

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

After that, the numbers are found in the right parts of all the equations of our SLAE and we can proceed to the reverse course of the Gauss method.

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

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

Giving numbers different values, we will get various 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 Homogeneous System of Linear Algebraic Equations Gaussian method.

Decision.

Let us exclude the unknown variable x from the second and third equations of the system. To do this, add the left and right parts of the first equation, respectively, to the left and right parts of the second equation, multiplied by , and to the left and right parts of the third equation, the left and right parts 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 only the terms containing the unknown variables x and y on the left side of the equations of the system, and transfer the terms with the unknown variable z to the right side: