Solving system equations using the Gaussian method. Gaussian method

Carl Friedrich Gauss, the greatest mathematician, hesitated for a long time, choosing between philosophy and mathematics. Perhaps it was precisely this mindset that allowed him to make such a noticeable “legacy” in world science. In particular, by creating the "Gauss Method" ...

For almost 4 years, articles on this site dealt with school education, mainly from the point of view of philosophy, the principles of (mis)understanding introduced into the minds of children. The time is coming for more specifics, examples and methods... I believe that this is exactly the approach to the familiar, confusing and important areas of life gives better results.

We people are designed in such a way that no matter how much we talk about abstract thinking, But understanding Always happens through examples. If there are no examples, then it is impossible to grasp the principles... Just as it is impossible to get to the top of a mountain except by walking the entire slope from the foot.

Same with school: for now living stories It is not enough that we instinctively continue to regard it as a place where children are taught to understand.

For example, teaching the Gaussian method...

Gauss method in 5th grade school

I’ll make a reservation right away: the Gauss method has a much wider application, for example, when solving systems of linear equations. What we will talk about takes place in 5th grade. This started, having understood which, it is much easier to understand the more “advanced options”. In this article we are talking about Gauss's method (method) for finding the sum of a series

Here is an example that my youngest son, who attends 5th grade at a Moscow gymnasium, brought from school.

School demonstration of the Gauss method

A mathematics teacher using an interactive whiteboard (modern teaching methods) showed children a presentation of the history of the “creation of the method” by little Gauss.

The school teacher whipped little Karl (an outdated method, not used in schools these days) because he

instead of sequentially adding numbers from 1 to 100, find their sum noticed that pairs of numbers equally spaced from the edges of an arithmetic progression add up to the same number. for example, 100 and 1, 99 and 2. Having counted the number of such pairs, little Gauss almost instantly solved the problem proposed by the teacher. For which he was executed in front of an astonished public. So that others would be discouraged from thinking.

What did little Gauss do? developed number sense? Noticed some feature number series with a constant step (arithmetic progression). AND exactly this later made him a great scientist, those who know how to notice, having feeling, instinct of understanding.

This is why mathematics is valuable, developing ability to see general in particular - abstract thinking. Therefore, most parents and employers instinctively consider mathematics an important discipline ...

“Then you need to learn mathematics, because it puts your mind in order.
M.V.Lomonosov".

However, the followers of those who flogged future geniuses with rods turned the Method into something the opposite. As my supervisor said 35 years ago: “The question has been learned.” Or as my youngest son said yesterday about Gauss’s method: “Maybe it’s not worth making a big science out of this, huh?”

The consequences of the creativity of the “scientists” are visible in the level of current school mathematics, the level of its teaching and the understanding of the “Queen of Sciences” by the majority.

However, let's continue...

Methods for explaining the Gauss method in 5th grade school

A mathematics teacher at a Moscow gymnasium, explaining the Gauss method according to Vilenkin, complicated the task.

What if the difference (step) of an arithmetic progression is not one, but another number? For example, 20.

The problem he gave to the fifth graders:


20+40+60+80+ ... +460+480+500


Before getting acquainted with the gymnasium method, let’s take a look at the Internet: how do school teachers and math tutors do it?..

Gaussian method: explanation No. 1

A well-known tutor on his YOUTUBE channel gives the following reasoning:

"Let's write the numbers from 1 to 100 as follows:

first a series of numbers from 1 to 50, and strictly below it another series of numbers from 50 to 100, but in the reverse order"


1, 2, 3, ... 48, 49, 50

100, 99, 98 ... 53, 52, 51

"Please note: the sum of each pair of numbers from the top and bottom rows is the same and equals 101! Let's count the number of pairs, it is 50 and multiply the sum of one pair by the number of pairs! Voila: The answer is ready!"

“If you couldn’t understand, don’t be upset!” the teacher repeated three times during the explanation. "You will take this method in 9th grade!"

Gaussian method: explanation No. 2

Another tutor, less well-known (judging by the number of views), takes a more scientific approach, offering a solution algorithm of 5 points that must be completed sequentially.

For the uninitiated, 5 is one of the Fibonacci numbers traditionally considered magical. A 5 step method is always more scientific than a 6 step method, for example. ...And this is hardly an accident, most likely, the Author is a hidden supporter of the Fibonacci theory

Given an arithmetic progression: 4, 10, 16 ... 244, 250, 256 .

Algorithm for finding the sum of numbers in a series using the Gauss method:


  • Step 1: rewrite the given sequence of numbers in reverse, exactly under the first one.
  • 4, 10, 16 ... 244, 250, 256

    256, 250, 244 ... 16, 10, 4

  • Step 2: calculate the sum of pairs of numbers located in vertical rows: 260.
  • Step 3: count how many such pairs are in the number series. To do this, subtract the minimum from the maximum number of the number series and divide by the step size: (256 - 4) / 6 = 42.
  • At the same time, you need to remember plus one rule : we must add one to the resulting quotient: otherwise we will get a result that is less by one than the true number of pairs: 42 + 1 = 43.

  • Step 4: Multiply the sum of one pair of numbers by the number of pairs: 260 x 43 = 11,180
  • Step5: since we have calculated the amount pairs of numbers, then the resulting amount should be divided by two: 11,180 / 2 = 5590.
  • This is the required sum of the arithmetic progression from 4 to 256 with a difference of 6!

    Gauss method: explanation in 5th grade at a Moscow gymnasium

    Here's how to solve the problem of finding the sum of a series:

    20+40+60+ ... +460+480+500

    in the 5th grade of a Moscow gymnasium, Vilenkin’s textbook (according to my son).

    After showing the presentation, the math teacher showed a couple of examples using the Gaussian method and gave the class a task of finding the sum of the numbers in a series in increments of 20.

    This required the following:

  • Step 1: be sure to write down all the numbers in the series in your notebook from 20 to 500 (in increments of 20).
  • Step 2: write down sequential terms - pairs of numbers: the first with the last, the second with the penultimate, etc. and calculate their amounts.
  • Step 3: calculate the “sum of sums” and find the sum of the entire series.
  • As you can see, this is a more compact and effective technique: the number 3 is also a member of the Fibonacci sequence

    My comments on the school version of the Gauss method

    The great mathematician would definitely have chosen philosophy if he had foreseen what his “method” would be turned into by his followers German teacher, who flogged Karl with rods. He would have seen the symbolism, the dialectical spiral and the undying stupidity of the “teachers”, trying to measure the harmony of living mathematical thought with the algebra of misunderstanding ....

    By the way: did you know. that our education system is rooted in the German school of the 18th and 19th centuries?

    But Gauss chose mathematics.

    What is the essence of his method?

    IN simplification. IN observing and grasping simple patterns of numbers. IN turning dry school arithmetic into interesting and exciting activity , activating in the brain the desire to continue, rather than blocking high-cost mental activity.

    Is it possible to use one of the given “modifications of Gauss’s method” to calculate the sum of the numbers of an arithmetic progression almost instantly? According to the “algorithms”, little Karl would be guaranteed to avoid spanking, develop an aversion to mathematics and suppress his creative impulses in the bud.

    Why did the tutor so persistently advise fifth-graders “not to be afraid of misunderstanding” of the method, convincing them that they would solve “such” problems as early as 9th grade? Psychologically illiterate action. It was a good move to note: "See? You already in 5th grade you can solve problems that you will complete only in 4 years! What a great fellow you are!”

    To use the Gaussian method, a level of class 3 is sufficient, when normal children already know how to add, multiply and divide 2-3 digit numbers. Problems arise due to the inability of adult teachers who are “out of touch” to explain the simplest things in normal human language, not to mention mathematical... They are unable to get people interested in mathematics and completely discourage even those who are “capable.”

    Or, as my son commented: “making a big science out of it.”

  • How (in the general case) do you find out which number you should “expand” the record of numbers in method No. 1?
  • What to do if the number of members of a series turns out to be odd?
  • Why turn into the “Rule Plus 1” something that a child could simply learn even in the first grade, if I had developed a “sense of numbers”, and didn't remember"count by ten"?
  • And finally: where has ZERO gone, a brilliant invention that is more than 2,000 years old and which modern mathematics teachers avoid using?!
  • Gauss method, my explanations

    My wife and I explained this “method” to our child, it seems, even before school...

    Simplicity instead of complexity or a game of questions and answers

    "Look, here are the numbers from 1 to 100. What do you see?"

    The point is not what exactly the child sees. The trick is to get him to look.

    "How can you put them together?" The son realized that such questions are not asked “just like that” and you need to look at the question “somehow differently, differently than he usually does”

    It doesn't matter if the child sees the solution right away, it's unlikely. It is important that he stopped being afraid to look, or as I say: “moved the task”. This is the beginning of the journey to understanding

    “Which is easier: adding, for example, 5 and 6 or 5 and 95?” A leading question... But any training comes down to “guiding” a person to the “answer” - in any way acceptable to him.

    At this stage, guesses may already arise about how to “save” on calculations.

    All we did was hint: the “frontal, linear” method of counting is not the only possible one. If a child understands this, then later he will come up with many more such methods, because it's interesting!!! And he will definitely avoid “misunderstanding” mathematics and will not feel disgusted with it. He got the win!

    If child discovered that adding pairs of numbers that add up to a hundred is a piece of cake, then "arithmetic progression with difference 1"- a rather dreary and uninteresting thing for a child - suddenly found life for him . Order emerged from chaos, and this always causes enthusiasm: that's how we are made!

    A question to answer: why, after the insight a child has received, should he again be forced into the framework of dry algorithms, which are also functionally useless in this case?!

    Why force stupid rewrites? sequence numbers in a notebook: so that even the capable do not have a single chance of understanding? Statistically, of course, but mass education is geared towards “statistics”...

    Where did the zero go?

    And yet, adding numbers that add up to 100 is much more acceptable to the mind than those that add up to 101...

    The "Gauss School Method" requires exactly this: mindlessly fold pairs of numbers equidistant from the center of the progression, Despite everything.

    What if you look?

    Still, zero is the greatest invention of mankind, which is more than 2,000 years old. And math teachers continue to ignore him.

    It is much easier to transform a series of numbers starting with 1 into a series starting with 0. The sum will not change, will it? You need to stop “thinking in textbooks” and start looking... And see that pairs with a sum of 101 can be completely replaced by pairs with a sum of 100!

    0 + 100, 1 + 99, 2 + 98 ... 49 + 51

    How to abolish the "plus 1 rule"?

    To be honest, I first heard about such a rule from that YouTube tutor...

    What do I still do when I need to determine the number of members of a series?

    I look at the sequence:

    1, 2, 3, .. 8, 9, 10

    and when you’re completely tired, then move on to a simpler row:

    1, 2, 3, 4, 5

    and I figure: if you subtract one from 5, you get 4, but I’m absolutely clear I see 5 numbers! Therefore, you need to add one! The number sense developed in elementary school suggests: even if there are a whole Google of members of the series (10 to the hundredth power), the pattern will remain the same.

    What the hell are the rules?..

    So that in a couple or three years you can fill all the space between your forehead and the back of your head and stop thinking? How to earn your bread and butter? After all, we are moving in even ranks into the era of the digital economy!

    More about Gauss’s school method: “why make science out of this?..”

    It was not for nothing that I posted a screenshot from my son’s notebook...

    "What happened in class?"

    “Well, I counted right away, raised my hand, but she didn’t ask. Therefore, while the others were counting, I began to do homework in Russian so as not to waste time. Then, when the others finished writing (???), she called me to the board. I said the answer."

    “That’s right, show me how you solved it,” said the teacher. I showed it. She said: “Wrong, you need to count as I showed!”

    “It’s good that she didn’t give a bad grade. And she made me write in their notebook “the course of the solution” in their own way. Why make a big science out of this?..”

    The main crime of a math teacher

    Hardly after that incident Carl Gauss experienced a high sense of respect for his school mathematics teacher. But if he knew how followers of that teacher will distort the very essence of the method... he would roar with indignation and, through the World Intellectual Property Organization WIPO, achieve a ban on the use of his good name in school textbooks!..

    In what the main mistake of the school approach? Or, as I put it, a crime of school mathematics teachers against children?

    Algorithm of misunderstanding

    What do school methodologists do, the vast majority of whom don’t know how to think?

    They create methods and algorithms (see). This a defensive reaction that protects teachers from criticism (“Everything is done according to...”) and children from understanding. And thus - from the desire to criticize teachers!(The second derivative of bureaucratic “wisdom”, a scientific approach to the problem). A person who does not grasp the meaning will rather blame his own misunderstanding, rather than the stupidity of the school system.

    This is what happens: parents blame their children, and teachers... do the same for children who “don’t understand mathematics!”

    Are you smart?

    What did little Karl do?

    A completely unconventional approach to a formulaic task. This is the essence of His approach. This the main thing that should be taught in school is to think not with textbooks, but with your head. Of course, there is also an instrumental component that can be used... in search of simpler and more efficient counting methods.

    Gauss method according to Vilenkin

    In school they teach that Gauss's method is to

  • in pairs find the sum of numbers equidistant from the edges of the number series, certainly starting from the edges!
  • find the number of such pairs, etc.
  • What, if the number of elements of the series is odd, as in the problem that was assigned to my son?..

    The "catch" is that in this case you should find an “extra” number in the series and add it to the sum of the pairs. In our example this number is 260.

    How to detect? Copying all pairs of numbers into a notebook!(This is why the teacher made the kids do this stupid job of trying to teach "creativity" using the Gaussian method... And this is why such a "method" is practically inapplicable to large data series, AND this is why it is not the Gaussian method.)

    A little creativity in the school routine...

    The son acted differently.

  • First he noted that it was easier to multiply the number 500, not 520
  • (20 + 500, 40 + 480 ...).

  • Then he calculated: the number of steps turned out to be odd: 500 / 20 = 25.
  • Then he added ZERO to the beginning of the series (although it was possible to discard the last term of the series, which would also ensure parity) and added the numbers giving a total of 500
  • 0+500, 20+480, 40+460 ...

  • 26 steps are 13 pairs of “five hundred”: 13 x 500 = 6500..
  • If we discarded the last term of the series, then the pairs will be 12, but we should not forget to add the “discarded” five hundred to the result of the calculations. Then: (12 x 500) + 500 = 6500!

  • Not difficult, right?

    But in practice it is made even easier, which allows you to carve out 2-3 minutes for remote sensing in Russian, while the rest are “counting”. In addition, it retains the number of steps of the method: 5, which does not allow the approach to be criticized for being unscientific.

    Obviously this approach is simpler, faster and more universal, in the style of the Method. But... the teacher not only did not praise, but also forced me to rewrite it “in the correct way” (see screenshot). That is, she made a desperate attempt to stifle the creative impulse and the ability to understand mathematics at the root! Apparently, so that she could later be hired as a tutor... She attacked the wrong person...


    Everything that I described so long and tediously can be explained to a normal child in a maximum of half an hour. Along with examples.

    And in such a way that he will never forget it.

    And it will be step towards understanding...not just mathematicians.

    Admit it: how many times in your life have you added using the Gaussian method? And I never did!

    But instinct of understanding, which develops (or is extinguished) in the process of studying mathematical methods at school... Oh!.. This is truly an irreplaceable thing!

    Especially in the age of universal digitalization, which we have quietly entered under the strict leadership of the Party and the Government.

    A few words in defense of teachers...

    It is unfair and wrong to place all responsibility for this style of teaching solely on school teachers. The system is in effect.

    Some teachers understand the absurdity of what is happening, but what to do? The Law on Education, Federal State Educational Standards, methods, lesson plans... Everything must be done “in accordance and on the basis” and everything must be documented. Step aside - stood in line to be fired. Let’s not be hypocrites: the salaries of Moscow teachers are very good... If they fire you, where to go?..

    Therefore this site not about education. He's about individual education, the only possible way to get out of the crowd generation Z ...

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

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

      multiplying both sides of the equation by a number other than zero;

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

      rearranging two equations.

    Let a system of equations be given

    The process of solving this system using the Gaussian method consists of two stages. At the first stage (direct motion), the system, using elementary transformations, is reduced to stepwise , or triangular form, and at the second stage (reverse) there is a sequential, starting from the last variable number, determination of the unknowns from the resulting step system.

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

    Let's transform the system by 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 the equivalent system

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

    Similarly, considering the main element
    , exclude the unknown from all equations of the system, except the first and second. Let's continue this process as long as possible, and as a result we will get a stepwise system

    ,

    Where ,
    ,…,– main elements of the system
    .

    If, in the process of reducing the system to a stepwise form, equations appear, i.e., equalities of the form
    , they are discarded since they are satisfied by any set of numbers
    . If at
    If an equation of the form appears that has no solutions, this indicates the incompatibility of the system.

    During the reverse stroke, the first unknown is expressed from the last equation of the transformed step system through all the other unknowns
    which 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
    . Variables are defined sequentially in a similar way
    . Variables
    , expressed through free variables, are called basic (dependent). The result is a general solution to the system of linear equations.

    To find private solution 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 to elementary transformations not the system equations themselves, but 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 is also that in the process of solving we simultaneously examine the system for compatibility, since, having given the extended matrix
    to stepwise form, it is easy to determine the ranks of the matrix and extended matrix
    and apply Kronecker-Capelli theorem .

    Example 2.1 Solve the system using the Gauss method

    Solution. Number of equations
    and the number of unknowns
    .

    Let's create an extended matrix of the system by assigning coefficients to the right of the matrix free members column .

    Let's present the matrix to a triangular view; To do this, we will obtain “0” below the elements located on the main diagonal using elementary transformations.

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

    We write this transformation as the number (-1) against the first line and denote it with 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 using an arrow going from the first line to the third.




    .

    In the resulting matrix, written second in the chain of matrices, we get “0” in the second column in the third position. To do this, we multiplied the second line by (-4) and added it to the third. In the resulting matrix, multiply the second row by (-1), and divide the third by (-8). All elements of this matrix lying below the diagonal elements are zeros.

    Because , the system is collaborative and defined.

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

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

    Let's substitute
    And
    into the first equation, we find


    .

    Let the system be given, ∆≠0. (1)
    Gauss method is a method of sequentially eliminating unknowns.

    The essence of the Gauss method is to transform (1) to a system with a triangular matrix, from which the values ​​of all unknowns are then obtained sequentially (in reverse). Let's consider one of the computational schemes. This circuit is called a single division circuit. So let's look at this diagram. Let a 11 ≠0 (leading element) divide the first equation by a 11. We get
    (2)
    Using equation (2), it is easy to eliminate the unknowns x 1 from the remaining equations of the system (to do this, it is enough to subtract equation (2) from each equation, previously multiplied by the corresponding coefficient for x 1), that is, in the first step we obtain
    .
    In other words, at step 1, each element of subsequent rows, starting from the second, is equal to the difference between the original element and the product of its “projection” onto the first column and the first (transformed) row.
    Following this, leaving the first equation alone, we perform a similar transformation over the remaining equations of the system obtained in the first step: we select from among them the equation with the leading element and, with its help, exclude x 2 from the remaining equations (step 2).
    After n steps, instead of (1), we obtain an equivalent system
    (3)
    Thus, at the first stage we obtain a triangular system (3). This stage is called forward stroke.
    At the second stage (reverse), we find sequentially from (3) the values ​​x n, x n -1, ..., x 1.
    Let us denote the resulting solution as x 0 . Then the difference ε=b-A x 0 called residual.
    If ε=0, then the found solution x 0 is correct.

    Calculations using the Gaussian method are performed in two stages:

    1. The first stage is called the forward method. At the first stage, the original system is converted to a triangular form.
    2. The second stage is called the reverse stroke. At the second stage, a triangular system equivalent to the original one is solved.
    The coefficients a 11, a 22, ... are called leading elements.
    At each step, the leading element was assumed to be nonzero. If this is not the case, then any other element can be used as a leading element, as if rearranging the equations of the system.

    Purpose of the Gauss method

    The Gauss method is designed for solving systems of linear equations. Refers to direct solution methods.

    Types of Gaussian method

    1. Classical Gaussian method;
    2. Modifications of the Gauss method. One of the modifications of the Gaussian method is a scheme with the choice of the main element. A feature of the Gauss method with the choice of the main element is such a rearrangement of the equations so that at the kth step the leading element turns out to be the largest element in the kth column.
    3. Jordano-Gauss method;
    The difference between the Jordano-Gauss method and the classical one Gauss method consists in applying the rectangle rule, when the direction of searching for a solution occurs along the main diagonal (transformation to the identity matrix). In the Gauss method, the direction of searching for a solution occurs along the columns (transformation to a system with a triangular matrix).
    Let's illustrate the difference Jordano-Gauss method from the Gaussian method with examples.

    Example of a solution using the Gaussian method
    Let's solve the system:

    For ease of calculation, let's swap the lines:

    Let's multiply the 2nd line by (2). Add the 3rd line to the 2nd

    Multiply the 2nd line by (-1). Add the 2nd line to the 1st

    From the 1st line we express x 3:
    From the 2nd line we express x 2:
    From the 3rd line we express x 1:

    An example of a solution using the Jordano-Gauss method
    Let us solve the same SLAE using the Jordano-Gauss method.

    We will sequentially select the resolving element RE, which lies on the main diagonal of the matrix.
    The resolution element is equal to (1).



    NE = SE - (A*B)/RE
    RE - resolving element (1), A and B - matrix elements forming a rectangle with elements STE and RE.
    Let's present the calculation of each element in the form of a table:

    x 1x 2x 3B
    1 / 1 = 1 2 / 1 = 2 -2 / 1 = -2 1 / 1 = 1


    The resolving element is equal to (3).
    In place of the resolving element we get 1, and in the column itself we write zeros.
    All other elements of the matrix, including elements of column B, are determined by the rectangle rule.
    To do this, we select four numbers that are located at the vertices of the rectangle and always include the resolving element RE.
    x 1x 2x 3B
    0 / 3 = 0 3 / 3 = 1 1 / 3 = 0.33 4 / 3 = 1.33


    The resolution element is (-4).
    In place of the resolving element we get 1, and in the column itself we write zeros.
    All other elements of the matrix, including elements of column B, are determined by the rectangle rule.
    To do this, we select four numbers that are located at the vertices of the rectangle and always include the resolving element RE.
    Let's present the calculation of each element in the form of a table:
    x 1x 2x 3B
    0 / -4 = 0 0 / -4 = 0 -4 / -4 = 1 -4 / -4 = 1


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

    Implementation of the Gaussian method

    The Gaussian method is implemented in many programming languages, in particular: Pascal, C++, php, Delphi, and there is also an online implementation of the Gaussian method.

    Using the Gaussian Method

    Application of the Gauss method in game theory

    In game theory, when finding the maximin optimal strategy of a player, a system of equations is compiled, which is solved by the Gaussian method.

    Application of the Gauss method in solving differential equations

    To find a partial solution to a differential equation, first find derivatives of the appropriate degree for the written partial solution (y=f(A,B,C,D)), which are substituted into the original equation. Next, to find the variables A, B, C, D, a system of equations is compiled, which is solved by the Gaussian method.

    Application of the Jordano-Gauss method in linear programming

    In linear programming, in particular in the simplex method, the rectangle rule, which uses the Jordano-Gauss method, is used to transform the simplex table at each iteration.

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

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

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

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

    called extended matrix of the system, because, in addition to the main matrix of the system, it includes a column of free terms. The Gaussian method is based on reducing the main matrix of the system to a triangular form (or trapezoidal form in the case of non-square systems) using elementary row transformations (!) of the extended matrix of the system.

    Example 5.1. Solve the system using the Gaussian method:

    Solution. Let's write out the extended matrix of the system and, using the first row, after that we will reset the remaining elements:

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


    Now we need all 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 it to the 3rd line. However, in order not to deal with fractions, let's create a unit in the 2nd row of the second column and only

    Now, to get a triangular matrix, you need to reset the element of the fourth row of the 3rd column; to do 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 rearranging the columns, the corresponding variables change places 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 inverse of the Gaussian 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 considered the case when the system is definite, i.e. when there is only one solution. Let's see what happens if the system is inconsistent or uncertain.

    Example 5.2. Explore the system using the Gaussian method:

    Solution. We write out and transform the extended 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. Consequently, the system has no solution, i.e. she incompatible. à

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

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

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

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

    Believing 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, because, giving parameters a And b different values, all possible solutions of the system can be described. a

    Here you can solve a system of linear equations for free Gauss method online large sizes in complex numbers with a very detailed solution. Our calculator can solve online both the usual definite and indefinite systems of linear equations using the Gaussian method, which has an infinite number of solutions. In this case, in the answer you will receive the dependence of some variables through other, free ones. You can also check the system of equations for consistency online using the Gaussian solution.

    Matrix size: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 4 3 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8 9 90 91 92 93 94 95 96 97 98 99 100 X 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 9 0 91 92 93 94 95 96 97 98 99 100 101

    About the method

    When solving a system of linear equations online using the Gaussian method, the following steps are performed.

    1. We write the extended matrix.
    2. In fact, the solution is divided into forward and backward steps of the Gaussian method. The direct approach of the Gaussian method is the reduction of a matrix to a stepwise form. The reverse of the Gaussian method is the reduction of a matrix to a special stepwise form. But in practice, it is more convenient to immediately zero out what is located both above and below the element in question. Our calculator uses exactly this approach.
    3. It is important to note that when solving using the Gaussian method, the presence in the matrix of at least one zero row with a NON-zero right-hand side (column of free terms) indicates the inconsistency of the system. In this case, a solution to the linear system does not exist.

    To best understand how the Gaussian algorithm works online, enter any example, select “very detailed solution” and view its solution online.