Algorithm for solving a system of equations using the Gaussian method. Gaussian method. An example of solving a system of equations using the Gauss method

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

Elementary transformations of a system of equations are:

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

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

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

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

So, the Gaussian method consists of the following steps:

  1. Let's look at the first equation. Let's choose the first non-zero coefficient and divide the entire equation by it. We obtain an equation in which some variable x i enters with a coefficient of 1;
  2. Let's subtract this equation from all the others, multiplying it by such numbers that the coefficients of the variable x i in the remaining equations are zeroed. We obtain a system resolved with respect to the variable x i and equivalent to the original one;
  3. If trivial equations arise (rarely, but it happens; for example, 0 = 0), we cross them out of the system. As a result, there are one fewer equations;
  4. We repeat the previous steps no more than n times, where n is the number of equations in the system. Each time we select a new variable for “processing”. If inconsistent equations arise (for example, 0 = 8), the system is inconsistent.

As a result, after a few steps we will obtain either a resolved system (possibly with free variables) or an inconsistent one. Allowed systems fall into two cases:

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

That's all! System of linear equations solved! This is a fairly simple algorithm, and to master it you do not have to contact a higher mathematics tutor. Let's look at an example:

Task. Solve the system of equations:

Description of steps:

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

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

When might a general solution be needed? If you have to do fewer steps than k (k is how many equations there are). However, the reasons why the process ends at some step l< k , может быть две:

  1. After the lth step, we obtained a system that does not contain an equation with number (l + 1). In fact, this is good, because... the authorized system is still obtained - even a few steps earlier.
  2. After the lth step, we obtained an equation in which all coefficients of the variables are equal to zero, and the free coefficient is different from zero. This is a contradictory equation, and, therefore, the system is inconsistent.

It is important to understand that the emergence of an inconsistent equation using the Gaussian method is a sufficient basis for inconsistency. At the same time, we note that as a result of the lth step, no trivial equations can remain - all of them are crossed out right in the process.

Description of steps:

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

So, the system is inconsistent because an inconsistent equation has been discovered.

Task. Explore compatibility and find a general solution to the system:


Description of steps:

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

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

The Gauss method was proposed by the famous German mathematician Carl Friedrich Gauss (1777 - 1855) and is one of the most universal methods for solving SLAEs. The essence of this method is that through successive elimination of unknowns, a given system is transformed into a stepwise (in particular, triangular) system equivalent to the given one. In the practical solution of the problem, the extended matrix of the system is reduced to a stepwise form using elementary transformations over its rows. Next, all the unknowns are found sequentially, starting from bottom to top.

Principle of the Gauss method

The Gauss method includes forward (reducing the extended matrix to a stepwise form, that is, obtaining zeros under the main diagonal) and reverse (obtaining zeros above the main diagonal of the extended matrix) moves. The forward move is called the Gauss method, the reverse move is called the Gauss-Jordan method, which differs from the first only in the sequence of eliminating variables.

The Gauss method is ideal for solving systems containing more than three linear equations, and for solving systems of equations that are not quadratic (which cannot be said about the Cramer method and the matrix method). That is, the Gauss method is the most universal method for finding a solution to any system of linear equations; it works in the case when the system has infinitely many solutions or is inconsistent.

Examples of solving systems of equations

Example

Exercise. Solve SLAE using the Gaussian method.

Solution. Let's write out the extended matrix of the system and, using elementary transformations on its rows, bring this matrix to a stepwise form (forward move) and then perform the reverse move of the Gaussian method (let's make the zeros above the main diagonal). First, let's change the first and second lines so that the element equals 1 (we do this to simplify the calculations):

We divide all elements of the third line by two (or, which is the same thing, multiply by):

From the third line we subtract the second, multiplied by 3:

Multiplying the third line by , we get:

Let us now carry out the reverse of the Gaussian method (Gassou-Jordan method), that is, we will make zeros above the main diagonal. Let's start with the elements of the third column. We need to reset the element to zero; to do this, subtract the third from the second line.

The series “Entertaining Mathematics” is dedicated to children who are interested in mathematics and parents who devote time to the development of their children, “giving” them interesting and entertaining problems and puzzles.

The first article in this series is devoted to Gauss's rule.

A little history

The famous German mathematician Carl Friedrich Gauss (1777-1855) was different from his peers from early childhood. Despite the fact that he was from a poor family, he learned to read, write, and count quite early. There is even a mention in his biography that at the age of 4-5 he was able to correct the error in his father’s incorrect calculations simply by watching him.

One of his first discoveries was made at the age of 6 during a mathematics lesson. The teacher needed to captivate the children for a long time and he proposed the following problem:

Find the sum of all natural numbers from 1 to 100.

Young Gauss completed this task quite quickly, finding an interesting pattern that has become widespread and is still used to this day in mental calculation.

Let's try to solve this problem orally. But first, let's take the numbers from 1 to 10:

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10

Look carefully at this amount and try to guess what unusual thing Gauss could see? To answer, you need to have a good understanding of the composition of the numbers.

Gauss grouped the numbers as follows:

(1+10) + (2+9) + (3+8) + (4+7) + (5+6)

Thus, little Karl received 5 pairs of numbers, each of which individually adds up to 11. Then, to calculate the sum of natural numbers from 1 to 10, you need

Let's return to the original problem. Gauss noticed that before adding, it is necessary to group numbers into pairs and thereby invented an algorithm that allows you to quickly add numbers from 1 to 100:

1 + 2 + 3 + 4 + 5 + … + 48 + 49 + 50 + 51 + 52 + 53 + … + 96 + 97 + 98 + 99 + 100

    Find the number of pairs in a series of natural numbers. In this case there are 50 of them.

    Let's sum up the first and last numbers of this series. In our example, these are 1 and 100. We get 101.

    We multiply the resulting sum of the first and last terms of the series by the number of pairs of this series. We get 101 * 50 = 5050

Therefore, the sum of the natural numbers from 1 to 100 is 5050.

Problems using Gauss's rule

And now we present to your attention problems in which Gauss’s rule is used to one degree or another. A fourth grader is quite capable of understanding and solving these problems.

You can give the child the opportunity to reason for himself so that he himself “invents” this rule. Or you can take it apart together and see how he can use it. Among the problems below there are examples in which you need to understand how to modify Gauss's rule in order to apply it to a given sequence.

In any case, in order for a child to be able to operate with this in his calculations, an understanding of the Gaussian algorithm is necessary, that is, the ability to correctly divide into pairs and count.

Important! If a formula is memorized without understanding, it will be forgotten very quickly.

Problem 1

Find the sum of numbers:

  • 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10;
  • 1 + 2 + 3 + … + 14 + 15 + 16;
  • 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9;
  • 1 + 2 + 3 + 4 + 5 + … + 48 + 49 + 50 + 51 + 52 + 53 + … + 96 + 97 + 98 + 99 + 100.

Solution.

First, you can give the child the opportunity to solve the first example himself and offer to find a way in which this can be done easily in his mind. Next, analyze this example with the child and show how Gauss did it. For clarity, it is best to write down a series and connect pairs of numbers with lines that add up to the same number. It is important that the child understands how pairs are formed - we take the smallest and largest of the remaining numbers, provided that the number of numbers in the series is even.

  • 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = (1 + 10) + (2 + 9) + (3 + 8) + (4 + 7) + (5 + 6) = (1 + 10) * 5;
  • 1 + 2 + 3 + … + 14 + 15 + 16 = (1 + 16) + (2 + 15) + (3 + 14) + (4 + 13) + (5 + 12) + (6 + 11) + (7 + 10) + (8 + 9) = (1 + 16) * 8 = 136;
  • 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = (1 + 8) + (2 + 7) + (3 + 6) + (4 + 5) + 9 = (1+ 8) * 4 + 9 = 45;
  • 1 + 2 + 3 + 4 + 5 + … + 48 + 49 + 50 + 51 + 52 + 53 + … + 96 + 97 + 98 + 99 + 100 = (1 + 100) * 50 = 5050

Task2

There are 9 weights weighing 1g, 2g, 3g, 4g, 5g, 6g, 7g, 8g, 9g. Is it possible to arrange these weights into three piles of equal weight?

Solution.

Using Gauss's rule, we find the sum of all weights:

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = (1 + 8) * 4 + 9 = 45 (g)

This means that if we can group the weights so that each pile contains weights with a total weight of 15g, then the problem is solved.

One of the options:

  • 9g, 6g
  • 8g, 7g
  • 5g, 4g, 3g, 2g, 1g

Find other possible options yourself with your child.

Draw your child's attention to the fact that when solving similar problems, it is better to always start grouping with a larger weight (number).

Problem 3

Is it possible to divide a watch dial into two parts by a straight line so that the sums of the numbers in each part are equal?

Solution.

First, apply Gauss’s rule to the series of numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12: find the sum and see if it is divisible by 2:

So it can be divided. Now let's see how.

Therefore, it is necessary to draw a line on the dial so that 3 pairs fall into one half, and three into the other.

Answer: the line will pass between the numbers 3 and 4, and then between the numbers 9 and 10.

Task4

Is it possible to draw two straight lines on a clock dial so that the sum of the numbers in each part is the same?

Solution.

To begin with, apply Gauss’s rule to the series of numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12: find the sum and see if it is divisible by 3:

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 = (1 + 12) * 6 = 78

78 is divisible by 3 without a remainder, which means it can be divided. Now let's see how.

According to Gauss's rule, we get 6 pairs of numbers, each of which adds up to 13:

1 and 12, 2 and 11, 3 and 10, 4 and 9, 5 and 8, 6 and 7.

Therefore, it is necessary to draw lines on the dial so that each part contains 2 pairs.

Answer: the first line will pass between the numbers 2 and 3, and then between the numbers 10 and 11; the second line is between the numbers 4 and 5, and then between 8 and 9.

Problem 5

A flock of birds is flying. There is one bird (the leader) in front, two behind it, then three, four, etc. How many birds are in the flock if there are 20 of them in the last row?

Solution.

We find that we need to add numbers from 1 to 20. And to calculate such a sum we can apply Gauss’s rule:

1 + 2 + 3 + 4 + 5 + … + 15 + 16 + 17 + 18 + 19 + 20 = (20 + 1) * 10 = 210.

Problem 6

How to place 45 rabbits in 9 cages so that all cages have a different number of rabbits?

Solution.

If the child has decided and understood the examples from task 1 with understanding, then he immediately remembers that 45 is the sum of the numbers from 1 to 9. Therefore, we plant the rabbits like this:

  • first cell - 1,
  • second - 2,
  • third - 3,
  • eighth - 8,
  • ninth - 9.

But if the child cannot figure it out right away, then try to give him the idea that such problems can be solved by brute force and that one should start with the minimum number.

Problem 7

Calculate the sum using the Gaussian technique:

  • 31 + 32 + 33 + … + 40;
  • 5 + 10 + 15 + 20 + … + 100;
  • 91 + 81 + … + 21 + 11 + 1;
  • 1 + 2 + 3 + 4 + … + 18 + 19 + 20;
  • 1 + 2 + 3 + 4 + 5 + 6;
  • 4 + 6 + 8 + 10 + 12 + 14;
  • 4 + 6 + 8 + 10 + 12;
  • 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11.

Solution.

  • 31 + 32 + 33 + … + 40 = (31 + 40) * 5 = 355;
  • 5 + 10 + 15 + 20 + … + 100 = (5 + 100) * 10 = 1050;
  • 91 + 81 + … + 21 + 11 + 1 = (91 + 1) * 5 = 460;
  • 1 + 2 + 3 + 4 + … + 18 + 19 + 20 = (1 + 20) * 10 =210;
  • 1 + 2 + 3 + 4 + 5 + 6 = (1 + 6) * 3 = 21;
  • 4 + 6 + 8 + 10 + 12 + 14 = (4 + 14) * 3 = 54;
  • 4 + 6 + 8 + 10 + 12 = (4 + 10) * 2 + 12 = 40;
  • 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 = (1 + 10) * 5 + 11 = 66.

Problem 8

There is a set of 12 weights weighing 1g, 2g, 3g, 4g, 5g, 6g, 7g, 8g, 9g, 10g, 11g, 12g. 4 weights were removed from the set, the total mass of which is equal to a third of the total mass of the entire set of weights. Is it possible to place the remaining weights on two scales, 4 pieces on each scale, so that they are in balance?

Solution.

We apply Gauss's rule to find the total mass of the weights:

1 + 2 + 3 + … + 10 + 11 + 12 = (1 + 12) * 6 = 78 (g)

We calculate the mass of the weights that were removed:

Therefore, the remaining weights (with a total mass of 78-26 = 52 g) must be placed at 26 g on each scale so that they are in equilibrium.

We don't know which weights were removed, so we have to consider all possible options.

Using Gauss's rule, you can divide the weights into 6 pairs of equal weight (13g each):

1g and 12g, 2g and 11g, 3g and 10, 4g and 9g, 5g and 8g, 6g and 7g.

Then the best option is when removing 4 weights will remove two pairs from the above. In this case, we will have 4 pairs left: 2 pairs on one scale and 2 pairs on the other.

The worst case scenario is when 4 removed weights break 4 pairs. We will be left with 2 unbroken pairs with a total weight of 26g, which means we place them on one pan of the scale, and the remaining weights can be placed on the other pan of the scale and they will also be 26g.

Good luck in the development of your children.

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 method algorithm itself works the same in all three cases. 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 from the matrix all these rows 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 this example, the result was 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 Dmitry Aystrakhanov.

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

Since the beginning of the 16th-18th centuries, mathematicians have intensively begun to study functions, thanks to which so much in our lives has changed. Computer technology simply would not exist without this knowledge. Various concepts, theorems, and solution techniques have been created to solve complex problems, linear equations, and functions. 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 is she like? This is a set of m equations with the required n unknown quantities, usually denoted as x, y, z, or x 1, x 2 ... x n, or other symbols. Solving a given system using the Gaussian method means finding all the unknown unknowns. If a system has the same number of unknowns and equations, then it is called an nth order system.

The most popular methods for solving SLAEs

In educational institutions of secondary education, various methods for solving such systems are studied. Most often these are simple equations consisting of two unknowns, so any existing method for finding the answer to them will not take much time. This can be like a substitution method, when another is derived from one equation and substituted into the original one. Or the method of 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 particular technique considered rational? It's simple. The good thing about the matrix method is that it does not require rewriting unnecessary symbols several times as unknowns; it is enough to perform arithmetic operations on the coefficients - and you will get a reliable result.

Where are SLAEs used in practice?

The solution to SLAEs are the points of intersection of lines on the graphs of functions. In our high-tech computer age, people who are closely associated with 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 calculator programs, which also includes a system of linear equations. The Gauss method allows you to calculate all existing solutions. Other simplified formulas and techniques are also used.

SLAU compatibility criterion

Such a system can only be solved if it is compatible. For clarity, let us represent 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 of the symbols are 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 extended matrix. What is 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 coefficients located near the unknowns, and the coefficients located behind the “=” sign also fit into the extended matrix.

Why can SLAEs be represented in matrix form?

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

Matrix transformations

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

  • By rewriting the system in matrix form and solving it, you can multiply all elements of the series by the same coefficient.
  • In order to transform the matrix into canonical form, you can swap two parallel rows. The canonical form implies that all matrix elements that are located along the main diagonal become ones, and the remaining ones become zeros.
  • The corresponding elements of parallel rows of the matrix can be added to one another.

Jordan-Gauss method

The essence of solving systems of linear homogeneous and inhomogeneous equations using the 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 equation is solved very simply by the Gauss method. It is necessary to write down the coefficients located near each unknown in matrix form. To solve the system, you will need to write out the extended 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 series 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 precise 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 into an extended matrix.

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

  1. The first action when solving an extended matrix will be this: the first row must be multiplied by -7 and added corresponding elements to the second row in order to get rid of one unknown in the second equation.
  2. Since solving equations using the Gauss method involves reducing the matrix to canonical form, then it is necessary to perform 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 required 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. It is the same.

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

An example of a 3x3 SLAE solution

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, you 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 extended matrix and begin to bring it to its 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 the first column one unit 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 its original form, and the second in a modified form.
  2. Next, we remove this same first unknown from the third equation. To do this, 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 - 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 remaining zeros. A few more steps, and the system of equations by the Gaussian method will be reliably solved.
  3. Now you need to perform operations on other elements of the rows. The third and fourth actions can be combined into one. We need to divide the second and third lines by -1 to get rid of the minus ones on the diagonal. We have already brought the third line to the required form.
  4. Next we bring the second line to canonical form. To do this, we multiply the elements of the third row by -3 and add them to the second row of the matrix. From the result it is clear that the second line is also reduced to the form we need. It remains to perform a few more operations and remove the coefficients of the unknowns from the first line.
  5. To make 0 from the second element of a row, you need to multiply the third row by -3 and add it to the first row.
  6. The next decisive step will be to add the necessary elements of the second row to the first row. This way we get the canonical form of the matrix, and, accordingly, the answer.

As you can see, solving equations using the Gauss method is quite simple.

An example of solving a 4x4 system of equations

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

Step-by-step instructions for solving such an example are described below.

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

And all the necessary arithmetic operations are performed to bring the extended matrix to its canonical form. It is necessary to understand that the answer to a system of equations is not always integers. Sometimes the solution may 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 behind the equal sign. If the answers do not match, then you need to recalculate the system or try to apply to it another method of solving SLAEs 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 different solution methods. But remember: the result should always be the same, no matter what solution method you used.

Gauss method: the most common errors when solving SLAEs

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

Another major mistake may be incorrectly writing out the final result. It is necessary to clearly understand 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 it, it is easy to carry out 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's why it is so often used when solving SLAEs.

mob_info