Gaussian method with 4 unknowns detailed solution. Gaussian method for dummies: solving slough easily

Educational institution "Belarusian State

Agricultural Academy"


Department of Higher Mathematics

Guidelines

to study the topic “Gauss method for solving systems of linear

equations" by students of the accounting faculty correspondence form education (NISPO)

Gorki, 2013

Gauss method for solving systems linear equations

Equivalent systems of equations

Two systems of linear equations are said to be equivalent if each solution of one of them is a solution of the other. The process of solving a system of linear equations consists of sequentially transforming it into an equivalent system using the so-called elementary transformations , which are:

1) rearrangement of any two equations of the system;

2) multiplying both sides of any equation of the system by a nonzero number;

3) adding to any equation another equation multiplied by any number;

4) crossing out an equation consisting of zeros, i.e. equations of the form

Gaussian elimination

Consider the system m linear equations with n unknown:

The essence of the Gaussian method or the method of sequential elimination of unknowns is as follows.

First, using elementary transformations, the unknown is eliminated from all equations of the system except the first. Such system transformations are called Gaussian elimination step . The unknown is called enabling variable at the first step of transformation. The coefficient is called resolution factor , the first equation is called resolving equation , and the column of coefficients at permission column .

When performing one step of Gaussian elimination, you need to use the following rules:

1) the coefficients and the free term of the resolving equation remain unchanged;

2) the coefficients of the resolution column located below the resolution coefficient become zero;

3) all other coefficients and free terms when performing the first step are calculated according to the rectangle rule:



, Where i=2,3,…,m; j=2,3,…,n.

We will perform similar transformations on the second equation of the system. This will lead to a system in which the unknown will be eliminated in all equations except the first two. As a result of such transformations over each of the equations of the system (direct progression of the Gaussian method), the original system is reduced to an equivalent step system of one of the following types.

Reverse Gaussian Method

Step system

has a triangular appearance and that's it (i=1,2,…,n). Such a system has a unique solution. The unknowns are determined starting from the last equation (reverse of the Gaussian method).

The step system has the form

where, i.e. the number of equations of the system is less than or equal to the number of unknowns. This system has no solutions, since the last equation will not be satisfied for any values ​​of the variable.

Step type system

has countless solutions. From the last equation, the unknown is expressed through the unknowns . Then, in the penultimate equation, instead of the unknown, its expression is substituted through the unknowns . Continuing the reverse of the Gaussian method, the unknowns can be expressed in terms of unknowns . In this case, the unknowns are called free and can take any values, and unknown basic.

When solving systems in practice, it is convenient to perform all transformations not with a system of equations, but with an extended matrix of the system, consisting of coefficients for unknowns and a column of free terms.

Example 1. Solve system of equations

Solution. Let's create an extended matrix of the system and perform elementary transformations:

.

In the extended matrix of the system, the number 3 (it is highlighted) is the resolution coefficient, the first row is the resolution row, and the first column is the resolution column. When moving to the next matrix, the resolution row does not change; all elements of the resolution column below the resolution element are replaced by zeros. And all other elements of the matrix are recalculated according to the quadrilateral rule. Instead of element 4 in the second line we write , instead of element -3 in the second line it will be written etc. Thus, the second matrix will be obtained. The resolution element of this matrix will be the number 18 in the second row. To form the next (third matrix), we leave the second row unchanged, in the column under the resolving element we write zero and recalculate the remaining two elements: instead of the number 1 we write , and instead of the number 16 we write .

As a result, the original system was reduced to an equivalent system

From the third equation we find . Let's substitute this value into the second equation: y=3. Let’s substitute the found values ​​into the first equation y And z: , x=2.

Thus, the solution to this system of equations is x=2, y=3, .

Example 2. Solve system of equations

Solution. Let us perform elementary transformations on the extended matrix of the system:

In the second matrix, each element of the third row is divided by 2.

In the fourth matrix, each element of the third and fourth rows was divided by 11.

. The resulting matrix corresponds to the system of equations

Deciding this system, let's find , , .

Example 3. Solve system of equations

Solution. Let's write the extended matrix of the system and perform elementary transformations:



.

In the second matrix, each element of the second, third and fourth rows was divided by 7.

As a result, a system of equations was obtained

equivalent to the original one.

Since there are two fewer equations than unknowns, then from the second equation . Let's substitute the expression for into the first equation: , .

Thus, the formulas give common decision of this system of equations. Unknowns are free and can take any value.

Let, for example, Then And . Solution is one of the particular solutions of the system, of which there are countless.

Questions for self-control of knowledge

1) What transformations linear systems are called elementary?

2) What transformations of the system are called the Gaussian elimination step?

3) What is a resolving variable, resolving coefficient, resolving column?

4) What rules should be used when performing one step of Gaussian elimination?

Solving systems of linear equations using the Gauss method. Suppose we need to find a solution to the system from n linear equations with n unknown variables
the determinant of the main matrix of which is different from zero.

The essence of the Gauss method consists of sequentially eliminating unknown variables: first eliminating x 1 from all equations of the system, starting from the second, is further excluded x 2 from all equations, starting with the third, and so on, until only the unknown variable remains in the last equation x n. This process of transforming system equations to sequentially eliminate unknown variables is called direct Gaussian method. After completing the forward progression of the Gaussian method, from the last equation we find x n, using this value from the penultimate equation we calculate xn-1, and so on, from the first equation we find x 1. The process of calculating unknown variables when moving from the last equation of the system to the first is called inverse of the Gaussian method.

Let us briefly describe the algorithm for eliminating unknown variables.

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 from 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 nth to the equation we add the first one, multiplied by . The system of equations after such transformations will take the form

where and .

We would arrive at the same result if we expressed x 1 through other unknown variables in the first equation of the system and the resulting expression was substituted into all other equations. So the variable x 1 excluded from all equations, starting from the second.

Next, we proceed in a similar way, but only with 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 nth to the equation we add the second one, multiplied by . The system of equations after such transformations will take the form

where and . So the variable x 2 excluded from all equations starting from the third.

Next we proceed to eliminating the unknown x 3, in this case we act similarly with the part of the system marked in the figure

So we continue the direct progression of the Gaussian method until the system takes the form

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


Example.

Solve system of linear equations Gauss method.

Let a system of linear algebraic equations be given that needs to 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 non-joint).
2) Have infinitely many solutions.
3) Have a single solution.

As we remember, Cramer's rule and the matrix method are not suitable in cases where the system has infinitely many solutions or is inconsistent. Gauss methodthe most powerful and versatile tool for finding solutions to any system of linear equations, which in every case will lead us to the answer! The algorithm of the method itself in all three cases works the same. If the Cramer and matrix methods require knowledge of determinants, then to apply the Gauss method you only need knowledge of arithmetic operations, which makes it accessible even to primary school students.

Augmented 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 troki matrices Can rearrange in some places.

2) if proportional (as a special case – identical) rows appear (or exist) in the matrix, then you should delete All these rows are from the matrix except one.

3) if a zero row appears in the matrix during transformations, then it should also be delete.

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

5) to a row of the matrix you can add another string multiplied by a number, different from zero.

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

The Gauss method consists of two stages:

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

To do this, perform the following steps:

1) Let us consider the first equation of a system of linear algebraic equations and the coefficient for x 1 is equal to K. The second, third, etc. we transform the equations as follows: we divide each equation (coefficients of the unknowns, including free terms) by the coefficient of the unknown x 1 in each equation, and multiply by K. After this, we subtract the first from the second equation (coefficients of unknowns and free terms). For x 1 in the second equation we obtain the coefficient 0. From the third transformed equation we subtract the first equation until all equations except the first, for unknown x 1, have a coefficient 0.

2) Let's move on to the next equation. Let this be the second equation and the coefficient for x 2 equal to M. We proceed with all “lower” equations as described above. Thus, “under” the unknown x 2 there will be zeros in all equations.

3) Move on to the next equation and so on until one last unknown and the transformed free term remain.

  1. The “reverse move” of the Gauss method is to obtain a solution to a system of linear algebraic equations (the “bottom-up” move). From the last “lower” equation we obtain one first solution - the unknown x n. To do this, we solve the elementary equation A * x n = B. In the example given above, x 3 = 4. We 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 using 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 one there. The problem is that there are no units in the first column at all, so rearranging the rows will not solve anything. In such cases, the unit must be organized using an elementary transformation. This can usually be done in several ways. Let's do this:
1 step . To the first line we 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 there is “minus one”, which suits us quite well. 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. The sign of the third line was also changed and it was moved to second place, so that on the second “step” we had the required unit.

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

Step 5 . The third line was divided by 3.

A sign that indicates an error in calculations (more rarely, a typo) is a “bad” bottom line. That is, if we got something like (0 0 11 |23) below, and, accordingly, 11x 3 = 23, x 3 = 23/11, then with a high degree of probability we can say that an error was made during elementary transformations.

Let’s do the reverse; in the design of examples, the system itself is often not rewritten, but the equations are “taken directly from the given matrix.” The reverse move, I remind you, works from the bottom up. IN in this example it turned out to be 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 using 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

Subtract 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 obtain a “stepped” 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 obtain x 3 = 0.96 or approximately 1.

x 2 = 3 and x 1 = –1.

By 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 coefficients for unknowns, because in practice (in economic and technical calculations) one has to deal with non-integer coefficients.

I wish you success! See you in class! Tutor.

blog.site, when copying material in full or in part, a link to the original source is required.


Gauss method perfect for solving systems of linear algebraic equations (SLAEs). It has a number of advantages compared to other methods:

  • firstly, there is no need to first examine the system of equations for consistency;
  • secondly, 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-singular, 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 ​​equal to zero;
  • thirdly, the Gaussian method leads to results with a relatively small number of computational operations.

Brief overview of the article.

First, we give the necessary definitions and introduce notations.

Next, we will 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 is the sequential elimination of unknown variables. Therefore, the Gaussian method is also called the method of sequential elimination of unknowns. We will show detailed solutions of several examples.

In conclusion, we will consider the solution by the Gauss method of systems of linear algebraic equations, the main matrix of which is either rectangular or singular. The solution to such systems has some features, which we will examine in detail using examples.

Page navigation.

Basic definitions and notations.

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 terms.

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 become identities is called decision of the SLAU.

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

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

They say that the system is written in coordinate form, if it has the form
.

This system in matrix form records 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 a matrix-column of free terms to matrix A as the (n+1)th column, we get the so-called extended matrix systems of linear equations. Typically, an extended matrix is ​​denoted by the letter T, and the column of free terms is separated by a vertical line from the remaining columns, that is,

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

The following point should be noted.

If you perform the following actions 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 sides of any equation add the corresponding parts of another equation, multiplied by an arbitrary number k,

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

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

  • swapping two lines,
  • multiplying all elements of any row of matrix T by a nonzero number k,
  • adding to the elements of any row of a 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 non-singular, using 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 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, 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 =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, we get rid of the unknown variable x 3 and can find x 2:

We substitute the resulting value x 2 = 2 into the third equation and find the remaining unknown variable x 3:

Others would have done differently.

Let us resolve 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 for x 2 and substitute the result obtained into the third equation to eliminate the unknown variable x 2 from it:

From the third equation of the system it is clear 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 Gaussian method. When we expressed the unknown variables (first x 1, at the next stage x 2) and substituted them into the remaining equations of the system, we thereby excluded them. We carried out elimination until there was only one unknown variable left in the last equation. The process of sequentially eliminating unknowns is called direct Gaussian method. After completing the forward move, we have the opportunity to calculate the unknown variable found in the last equation. With its help, we find the next unknown variable from the penultimate equation, and so on. The process of sequentially finding unknown variables while moving from the last equation to the first is called inverse of the Gaussian 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 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 using the Gaussian 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 for x 1 in order to eliminate this unknown variable from the remaining 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 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 resolve the first equation for x 1 and exclude it from the remaining equations of the system (although x 1 is no longer present 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 different from zero.

We will assume that , since we can always achieve this by rearranging the equations of the system. Let's 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 nth equation we add the first, multiplied by . The system of equations after such transformations will take the form

where and .

We would have arrived at the same result if we had 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 proceed in a similar way, but only with 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 nth equation we add the second, multiplied by . The system of equations after such transformations will take the form

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

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

So we continue the direct progression of the Gaussian method until the system takes the form

From this moment we begin the reverse of the Gaussian 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 look at the algorithm using an example.

Example.

Gauss method.

Solution.

The coefficient a 11 is non-zero, so let’s proceed to the direct progression of the Gaussian method, that is, to the exclusion of the unknown variable x 1 from all equations of the system except the first. To do this, to the left and right parts of the second, third and fourth equation let's add the left and right sides of the first equation, multiplied by , respectively, And :

The unknown variable x 1 has been eliminated, let's move on to eliminating 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 by respectively And :

To complete the forward progression of the Gaussian method, we need to eliminate the unknown variable x 3 from the last equation of the system. Let us add to the left and right sides of the fourth equation, respectively, the left and right sides of the third equation, multiplied by :

You can begin the reverse of the Gaussian method.

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

To check, 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 using the Gauss method was found correctly.

Answer:

Now let’s give a solution to the same example using the Gaussian method in matrix notation.

Example.

Find the solution to the system of equations Gauss method.

Solution.

The extended matrix of the system has the form . At the top of each column are the unknown variables that correspond to the elements of the matrix.

The direct approach of the Gaussian 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 that we did with the system in coordinate form. Now you will see this.

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 lines we add the corresponding elements of the first line multiplied by , and accordingly:

Next, we transform the resulting matrix so that in the second column all elements, starting from the third, become zero. This would correspond to eliminating the unknown variable x 2 . To do this, to the elements of the third and fourth rows we add the corresponding elements of the first row of the matrix, multiplied by respectively 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 a system of linear equations

which was obtained earlier after a forward move.

It's time to turn back. In matrix notation, the inverse of the Gaussian method involves transforming the resulting matrix such that the matrix marked in the figure

became diagonal, that is, took the form

where are some numbers.

These transformations are similar to the forward transformations of the Gaussian 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 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 Gaussian method, to the elements of the first row we add the corresponding elements of the second row, multiplied by:

The resulting matrix corresponds to the system of equations , from where 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 completely incorrect results. We recommend not rounding decimals. Better from decimals go to ordinary fractions.

Example.

Solve a system of three equations using the Gauss method .

Solution.

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:

Let us exclude the unknown x from the second and third equations of the system:

In the resulting system, the unknown variable y is absent in the second equation, but y is present in the third equation, therefore, let’s swap the second and third equations:

This completes the direct progression of the Gauss method (there is no need to exclude y from the third equation, since this unknown variable no longer exists).

Let's start 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.

Solving 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 singular, using the Gauss method.

Systems of equations, the main matrix of which is rectangular or square singular, 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 going into detail about some situations that may arise.

Let's move on to the most important stage.

So, let us assume that the system of linear algebraic equations, after completing the forward progression of the Gauss method, takes 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 down the unknown variables that come first in all equations of the resulting system:

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

Let's give the unknown variables that are on the right sides of the equations arbitrary values, where - arbitrary numbers:

After this, the right-hand sides of all equations of our SLAE contain numbers and we can proceed to the reverse of the Gaussian method.

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

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

Giving Numbers different meanings, we will obtain different solutions to the system 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 Gauss method.

Solution.

Let us exclude 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, we add the left and right sides of the first equation, multiplied by:

Now let’s 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 system equations only the terms containing the unknown variables x and y, and move the terms with the unknown variable z to the right side:

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 of simultaneous execution of several equations with respect to several variables. A system of linear algebraic equations (hereinafter referred to as SLAE) containing m equations and n unknowns is called a system of the form:

where numbers a ij are called system coefficients, numbers b i are called free terms, a ij And b i(i=1,…, m; b=1,…, n) represent some known numbers, and x 1 ,…, x n– unknown. In the designation of coefficients a ij the first index i denotes the number of the equation, and the second j is the number of the unknown at which this coefficient stands. The numbers x n must be found. It is convenient to write such a system in a compact matrix form: AX=B. Here A is the matrix of system coefficients, called the main matrix;

– column vector of unknowns xj.
is a column vector of free terms 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 a system is the matrix A of the system, supplemented by a column of free terms

1.2 Solving a system of linear algebraic equations

The solution to 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.

A solution to a system is n values ​​of the unknowns x1=c1, x2=c2,…, xn=cn, upon substitution of which all equations of the system become true equalities. Any solution to the system can be written as a column matrix

A system of equations is called consistent if it has at least one solution, and inconsistent if it does not have any solution.

A consistent system is said to be determinate if it has a single 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.

Solving a system means finding out whether it is compatible or inconsistent. If the system is consistent, 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 of one of them is a solution of the other, and vice versa.

Transformation, the application of which turns the system into new system, equivalent to the original one, is called an equivalent or equivalent transformation. Examples of equivalent transformations include the following transformations: interchanging two equations of a system, interchanging two unknowns along with the coefficients of all equations, multiplying both sides of any equation of a system by a nonzero 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 of the system. This solution is called zero 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 sequential elimination of unknowns - Gaussian method(it is also called the Gaussian elimination method). This is a method of sequential elimination of variables, when, using elementary transformations, a system of equations is reduced to an equivalent system of a step (or triangular) form, from which all other variables are found sequentially, starting with the last (by number) variables.

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

1. Direct stroke.

At the first stage, the so-called direct move is carried out, when, through elementary transformations over the rows, the system is brought to a stepped or triangular shape, or it is established that the system is incompatible. Namely, among the elements of the first column of the matrix, select a non-zero one, move it to the uppermost position by rearranging the rows, and subtract the resulting first row from the remaining rows after the rearrangement, 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 these transformations have been completed, the first row and first column are mentally crossed out and continued until a zero-size matrix remains. If at any iteration there is no non-zero element among the elements of the first column, then go to the next column and perform a similar operation.

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

The system below has a stepwise form:

,

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).

Let's transform the system by eliminating the unknown x1 in all equations except the first (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 subtract term by term by the first, multiplied by ). Then we multiply both sides of the first equation by and add them to the third equation of the system (or from the third we subtract the first one multiplied by ). Thus, we sequentially multiply the first line by a number and add to i th line, for i= 2, 3, …,n.

Continuing this process, we obtain an equivalent system:


– new values ​​of 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 lying under the first leading element a 11 are destroyed

0, in the second step the elements lying under the second leading element a 22 (1) are destroyed (if a 22 (1) 0), etc. Continuing this process further, we finally, at the (m-1) step, reduce the original system to a triangular system.

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 an equation of the form appears

then this indicates the incompatibility of the system.

This is where the direct progression of Gauss's method ends.

2. Reverse stroke.

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 fundamental system solutions, or, if all variables are basic, then express numerically the unique 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 basis variable, so at every step except 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 the elementary transformations on its rows. It is convenient for the coefficient a11 to be equal to 1 (rearrange the equations, or divide both sides of the equation by a11).

2.2 Examples of solving SLAEs using the Gaussian method

In this section, using three different examples, we will show how the Gaussian method can solve SLAEs.

Example 1. Solve a 3rd order SLAE.

Let's reset the coefficients 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:
Similar articles

2024 my-cross.ru. Cats and dogs. Small animals. Health. Medicine.