A system of linear equations of the 3rd order by the Gaussian method. Gauss method (successive elimination of unknowns)

Karl Friedrich Gauss, the greatest mathematician long time hesitated, choosing between philosophy and mathematics. Perhaps it was this kind of mindset that allowed him to so noticeably "inherit" in world science. In particular, by creating the "Gaussian Method" ...

For almost 4 years, the articles of this site have been dealing with school education, mainly, from the side of philosophy, the principles of (mis) understanding, introduced into the minds of children. The time comes for more specifics, examples and methods ... I believe that this is the approach to familiar, confusing and important areas of life gives the best results.

We humans are so arranged that no matter how much you talk about abstract thinking, but understanding always going through examples... If there are no examples, then it is impossible to grasp the principles ... Just as it is impossible to be at the top of a mountain otherwise than having passed its entire slope from the foot.

Also with the school: bye living stories not enough we instinctively continue to think of it as a place where children are taught to understand.

For example, teaching the Gauss method ...

Gauss method in grade 5 school

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

Here is an example that mine brought from school younger son attending the 5th grade of the Moscow gymnasium.

School demonstration of the Gauss method

Math teacher using interactive whiteboard ( modern methods teaching) showed the children a presentation of the history of "method creation" by little Gauss.

The school teacher whipped little Karl (an outdated method, nowadays it is not used in schools) because he

instead of sequentially adding the numbers from 1 to 100 to find their sum noticed that pairs of numbers that are equally spaced from the edges of the 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 subjected to execution in front of the amazed audience. So that the rest were discouraged to think.

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

This is the value of mathematics, which develops ability to see general in particular - abstract thinking... Therefore, most parents and employers instinctively regard mathematics as an important discipline ...

“Mathematics is only then taught, that it puts the mind in order.
MV Lomonosov ".

However, the followers of those who flogged future geniuses with rods turned the Method into something opposite. As my scientific advisor said 35 years ago: "We have learned the question." Or as my youngest son said yesterday about the Gauss method: "Maybe it's not worth doing a great science out of this, eh?"

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

However, let's continue ...

Methods of explaining the Gauss method in grade 5 school

The mathematics teacher of the Moscow gymnasium, explaining the Gauss method according to Vilenkin, complicated the task.

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

The task he gave to the fifth graders:


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


Before we get acquainted with the gymnasium method, let's take a look on the Internet: how do school teachers - mathematics tutors do it? ..

Gauss Method: Explanation # 1

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

"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 reverse order "


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

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

"Pay attention: 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 could not understand - do not be upset!" - the teacher repeated three times in the process of explanation. "You will pass this method in the 9th grade!"

Gaussian Method: Explanation # 2

Another less well-known tutor (judging by the number of views) uses more scientific approach, offering an algorithm for solving 5 points that must be performed sequentially.

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

An arithmetic progression is given: 4, 10, 16 ... 244, 250, 256 .

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


  • Step 1: rewrite the given sequence of numbers in reverse, exactly under the first.
  • 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 numerical series and divide by the step size: (256 - 4) / 6 = 42.
  • In this case, you need to remember about plus one rule : it is necessary to add one to the obtained 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 amount received 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 the 5th grade of a Moscow gymnasium

    And here is how it was required to solve the problem of finding the sum of a series:

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

    in the 5th grade of the Moscow gymnasium, Vilenkin's textbook (from the words of my son).

    After showing the presentation, the math teacher showed a couple of examples using the Gauss method and gave the class a problem to find the sum of the numbers in a series with a step of 20.

    This required the following:

  • Step 1: be sure to write down all the numbers in the series in a notebook from 20 to 500 (in increments of 20).
  • Step 2: write sequentially the 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 whole series.
  • As you can see, it is more compact and effective technique: 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" followers would turn into. German teacher, who whipped Karl with rods. He would have seen both symbolism and the dialectical spiral and the undying stupidity of the "teachers", trying to measure with algebra misunderstanding the harmony of living mathematical thought ....

    By the way: did you know. that our educational 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 , which activates the desire to continue in the brain, rather than blocking high-cost mental activity.

    Is it possible, by one of the above "modifications of the Gauss 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 flogging, fostered an aversion to mathematics and suppressed his creative impulses at the root.

    Why did the tutor so insistently advise the fifth-graders "not to be afraid of misunderstanding" the method, convincing them that they would solve "such" problems already in the 9th grade? Psychologically illiterate action. It was a good reception to mark: "See? You already in grade 5 you can solve problems that you will go through only after 4 years! What good fellows you are! "

    To use the Gaussian method, a level 3 class is sufficient, when normal children already know how to add, multiply and divide 2-3 digit numbers. Problems arise because of the inability of adult teachers, who “do not enter,” how to explain the simplest things in normal human language, not just in mathematical language ... Those who are not able to interest mathematics and completely discourage even those who are “capable”.

    Or, as my son commented, "making great science out of it."

  • How (in the general case) to find out which number should be used to "expand" the record of numbers in method no. 1?
  • What to do if the number of members of the series turns out to be odd?
  • Why turn into a "Rule plus 1" what a child could simply assimilate still in the first grade, if I had developed a "sense of number", and didn't remember"ten count"?
  • And finally: where did ZERO disappear, 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 complication or a game of questions - answers

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

    It's not about what the child will see. The trick is for him to look.

    "How can you fold them?" The son realized that such questions are not asked "just like that" and that 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 path to understanding

    "Which is easier: to add, for example, 5 and 6 or 5 and 95?" A leading question ... But after all, 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 the child truncated this, then later he will invent many more such methods, it's interesting !!! And he will definitely avoid a "misunderstanding" of mathematics, he will not be disgusted with it. He got a victory!

    If child discovered that the addition of pairs of numbers giving a total of one hundred is a trifling exercise, then "arithmetic progression with a difference of 1"- a rather dreary and uninteresting thing for a child - suddenly found life for him . Order has emerged out of chaos, and this always inspires enthusiasm: this is how we are!

    A tricky question: why, after the child received an insight, again drive him into the framework of dry algorithms, moreover, functionally useless in this case ?!

    Why make stupid rewrite 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 zero go?

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

    The "school Gauss method" requires exactly this: mindlessly fold pairs of numbers equidistant from the center of the progression, no matter what.

    And if you look?

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

    It's much easier to convert a row of numbers starting with 1 to a row starting at 0. The sum won't change, does it? You need to stop "thinking with textbooks" and start looking ... And to see that pairs with the sum of 101 can be replaced by pairs with the sum of 100!

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

    How to remove the plus 1 rule?

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

    What do I still do when it is necessary to determine the number of members of a row?

    I look at the sequence:

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

    and when completely tired, then to a simpler row:

    1, 2, 3, 4, 5

    and I estimate: if you subtract one from 5, you get 4, but I am quite clear see 5 numbers! Therefore, you need to add one! Sense of number, developed in primary school, suggests: even if the members of the series are a whole Google (10 to the hundredth power), the pattern will remain the same.

    What about the rules? ..

    To fill the entire space between the forehead and the back of the head in a couple or three years and stop thinking? And how to earn bread and butter? After all, we are moving in even ranks into the era of the digital economy!

    More about the school method of Gauss: "why make science out of this? .."

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

    "What was there in the lesson?"

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

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

    “It’s good that I didn’t put a two. And I made me write in the notebook the“ course of the solution ”in their language. Why make a big science out of this? ..”

    The main crime of a math teacher

    Hardly after that case Karl Gauss had a high sense of respect for his school math teacher. But if he knew how followers of that teacher distort the very essence of the method... he would have roared with indignation and through the World Intellectual Property Organization WIPO secured a ban on the use of his good name in school textbooks! ..

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

    Algorithm of misunderstanding

    What do school methodologists, the vast majority of whom do not know how to think?

    Methods and algorithms are created (see). This is 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, and not the stupidity of the school system.

    This is exactly what happens: parents blame their children, and teachers ... the same with children who “don't understand mathematics! ..

    Do you dare?

    What did little Karl do?

    Absolutely unconventional approached a template task... This is the essence of His approach. This is the main thing that should be taught at school: think not with textbooks, but with your head... Of course, there is also an instrumental component that can be used quite well ... in search of simpler and effective methods bills.

    Gauss method according to Vilenkin

    The school teaches that the Gauss method is to

  • in pairs find the sums of numbers equidistant from the edges of a number series, certainly starting from the edges!
  • find the number of such pairs, etc.
  • what, if the number of elements of the series turns out to be odd, as in the problem you were asked to your son? ..

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

    How to detect? Rewriting all pairs of numbers in a notebook!(That is why the teacher forced the children to do this stupid job, trying to teach "creativity" by the Gauss method ... And this is why such a "method" is practically inapplicable to large data series, And this is why it is not a Gaussian method).

    A little creativity in the school routine ...

    The son acted differently.

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

  • Then he figured out: 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 up 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 have 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?

    And in practice it is even easier, which allows you to carve out 2-3 minutes on the DZ in Russian, while the rest "count". In addition, it retains the number of steps of the methodology: 5, which does not allow criticizing the approach for being unscientific.

    Obviously, this approach is simpler, faster and more universal, in the style of Method. But ... the teacher not only did not praise, but also made me rewrite 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, then to be hired as a tutor ... She attacked the wrong person ...


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

    And so that he will never forget it.

    And it will step to understanding... not just mathematics.

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

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

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

    A few words in defense of teachers ...

    It is unfair and wrong to blame schoolteachers solely for this style of learning. The system works.

    Some teachers understand the absurdity of what is happening, but what to do? Law on education, federal state educational standards, methods, technological maps Lessons ... Everything should be done "according to and based on" and everything should be documented. A step to the side - got in line to be fired. Let's not be hypocrites: the salary of Moscow teachers is very good ... They will fire - where to go? ..

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

    Solution of systems of linear equations by the Gauss method. Let us 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 nonzero.

    The essence of the Gauss method consists in the successive elimination of unknown variables: first, the x 1 from all equations of the system, starting with the second, further exclude x 2 of all equations, starting with the third, and so on, until only the unknown variable remains in the last equation x n... Such a process of transforming the equations of the system for the successive elimination of unknown variables is called by the direct course of the Gauss method... After completing the forward run of the Gauss method, from the last equation, we find x n, using this value from the penultimate equation is calculated x n-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 backward 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 of 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 nth to the equation we add the first, multiplied by. The system of equations after such transformations takes 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 with the second.

    Next, we act in a similar way, but only with a 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, multiplied by. The system of equations after such transformations takes the form

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

    Next, we proceed to eliminate the unknown x 3, in this case we act in the same way with the part of the system marked in the figure

    So we continue the direct course of the Gauss method until the system takes the form

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


    Example.

    Solve a system of linear equations by the Gauss method.

    Let a system be given, ∆ ≠ 0. (one)
    Gauss method Is a method of successive elimination of unknowns.

    The essence of the Gauss method consists in transforming (1) to a system with a triangular matrix, from which the values ​​of all unknowns are then sequentially (backward) obtained. Let's consider one of the computational schemes. This scheme is called a single division scheme. So let's take a look at this circuit. Let a 11 ≠ 0 (pivot) divide the first equation by a 11. We get
    (2)
    Using equation (2), it is easy to exclude unknowns x 1 from the rest of the equations of the system (for this, it is enough to subtract equation (2) from each equation, previously multiplied by the corresponding coefficient at x 1), that is, at 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.
    After that, leaving the first equation alone, over the rest of the equations of the system obtained in the first step, we perform a similar transformation: choose from their number an equation with a pivot element and exclude it from the remaining equations x 2 (step 2).
    After n steps, instead of (1), we obtain an equivalent system
    (3)
    Thus, at the first stage, we get a triangular system (3). This stage is called the forward run.
    At the second stage (reverse), we find successively 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 the residual.
    If ε = 0, then the found solution x 0 is correct.

    Gaussian calculations are performed in two stages:

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

    Purpose of the Gaussian method

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

    Types of the Gaussian method

    1. Classical Gauss method;
    2. Modifications of the Gauss method. One of the modifications of the Gauss method is the circuit with the choice of the main element. A feature of the Gauss method with the choice of the pivot element is such a permutation of equations so that at the k-th step the leading element is the largest element in the k-th column in absolute value.
    3. Jordano-Gauss method;
    Difference of the Jordano-Gauss method from the classical Gauss method consists in applying the rectangle rule, when the direction of the search for the solution occurs along the main diagonal (transformation to the identity matrix). In the Gauss method, the direction of the search for a solution occurs along the columns (transformation to a system with a triangular matrix).
    Let's illustrate the difference the Jordano-Gauss method from the Gauss method by examples.

    An example of a Gaussian solution
    Let's solve the system:

    For the convenience of calculations, let's swap the lines:

    Multiply the 2nd row by (2). Add the 3rd line to the 2nd

    Multiply the 2nd row 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 by the Jordano-Gauss method
    We will solve the same SLAE by the Jordano-Gauss method.

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



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

    x 1 x 2 x 3 B
    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 the elements in column B, are determined by the rectangle rule.
    To do this, select four numbers that are located at the vertices of the rectangle and always include the resolving element of the RE.
    x 1 x 2 x 3 B
    0 / 3 = 0 3 / 3 = 1 1 / 3 = 0.33 4 / 3 = 1.33


    The resolving 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 the elements in column B, are determined by the rectangle rule.
    To do this, select four numbers that are located at the vertices of the rectangle and always include the resolving element of the RE.
    Let's present the calculation of each element in the form of a table:
    x 1 x 2 x 3 B
    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 Gauss method

    The Gauss method is implemented in many programming languages, in particular: Pascal, C ++, php, Delphi, and there is also an online implementation of the Gauss 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 drawn up, which is solved by the Gauss method.

    Application of the Gauss method to solving differential equations

    To search for a particular solution to a differential equation, first find the derivatives of the corresponding degree for the written particular solution (y = f (A, B, C, D)), which are substituted into the original equation. Next to find variables A, B, C, D a system of equations is drawn up, which is solved by the Gauss method.

    Application of the Jordan-Gauss method in linear programming

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

    Gauss method perfect for solving linear systems algebraic equations(SLOW). It has several advantages over other methods:

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

    Brief overview of the article.

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

    Next, we describe the Gauss method algorithm for the simplest case, that is, for systems of linear algebraic equations, the number of equations in which coincides with the number of unknown variables and the determinant of the main matrix of the system is not equal to zero. When solving such systems of equations, the essence of the Gauss method is most clearly visible, which consists in the successive elimination of unknown variables. Therefore, the Gauss method is also called the method of successive elimination of unknowns. Let's show detailed solutions a few examples.

    In conclusion, let us consider the solution by the Gauss method of systems of linear algebraic equations, the main matrix of which is either rectangular or degenerate. The solution of such systems has some features, which we will analyze in detail with examples.

    Page navigation.

    Basic definitions and notation.

    Consider a system of p linear equations with n unknowns (p can be equal to n):

    Where are unknown variables, are numbers (real or complex), and are free members.

    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 turn into identities is called decision of the SLAE.

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

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

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

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

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

    The next point should be discussed.

    If you perform the following actions with a system of linear algebraic equations

    • swap two equations,
    • multiply both sides of an equation by an arbitrary nonzero real (or complex) number k,
    • to both sides of any equation add the corresponding parts of the other equation, multiplied by an arbitrary number k,

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

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

    • permutation of two lines in places,
    • multiplication of all elements of any row of the matrix T by a nonzero number k,
    • adding to the elements of any row of the matrix the corresponding elements of another row, multiplied by an arbitrary number k.

    Now you can proceed to the description of the Gauss method.

    The solution of 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-degenerate, by the Gauss method.

    What would we do at school if we were given the task of finding a solution to the 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, we can get rid of the unknown variables x 2 and x 3 and immediately find x 1:

    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, then we get rid of the unknown variable x 3 and we can find x 2:

    Substitute the resulting value x 2 = 2 into the third equation to find the remaining unknown variable x 3:

    Others would have done otherwise.

    Let us solve the first equation of the system with respect to the unknown variable x 1 and substitute the resulting expression into the second and third equations of the system in order to exclude this variable from them:

    Now let's solve the second equation of the system with respect to x 2 and substitute the result obtained in the third equation to exclude the unknown variable x 2 from it:

    It can be seen from the third equation of the system that x 3 = 3. From the second equation we find , and from the first equation we obtain.

    Familiar solutions, isn't it?

    The most interesting thing here is that the second solution is essentially the method of successive elimination of unknowns, that is, the Gauss method. When we expressed unknown variables (first x 1, at the next stage x 2) and substituted them into the rest of the equations of the system, we thereby excluded them. We carried out the exclusion until the moment when there was only one unknown variable left in the last equation. The process of successive elimination of unknowns is called by the direct course of the Gauss method... After completing the direct move, we have the opportunity to calculate the unknown variable found in the last equation. With its help, from the penultimate equation, we find the next unknown variable, and so on. The process of sequentially finding unknown variables as we move from the last equation to the first is called backward Gaussian method.

    It should be noted that when we express x 1 through x 2 and x 3 in the first equation, and then substitute the resulting expression in the second and third equations, then 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 by the Gauss method arise when the equations of the system do not contain some variables.

    For example, in SLAE the first equation does not contain the unknown variable x 1 (in other words, the coefficient in front of it is equal to zero). Therefore, we cannot solve the first equation of the system with respect to x 1 in order to exclude this unknown variable from the rest of the equations. The way out of this situation is to rearrange the equations of the system. Since we are considering systems of linear equations, the determinants of the main matrices of which are nonzero, then 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 solve the first equation with respect to x 1 and exclude it from the rest of the equations of the system (although x 1 is already absent in the second equation).

    We hope you get the gist.

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

    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 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 n-th equation we add the first, multiplied by. The system of equations after such transformations takes the form

    where, and .

    We would come to the same result if we expressed x 1 in terms of other unknown variables in the first equation of the system and substituted the resulting expression in all other equations. Thus, the variable x 1 is excluded from all equations, starting with the second.

    Next, we act in a similar way, but only with a 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 n-th equation we add the second multiplied by. The system of equations after such transformations takes the form

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

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

    So we continue the direct course of the Gauss method until the system takes the form

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

    Let's analyze the algorithm using an example.

    Example.

    by the Gauss method.

    Solution.

    The coefficient a 11 is nonzero, so we proceed to the direct course of the Gauss method, that is, to the elimination of the unknown variable x 1 from all equations of the system, except for the first one. To do this, add the left and right sides of the first equation to the left and right sides of the second, third and fourth equations, multiplied by, respectively, and :

    The unknown variable x 1 has been eliminated, go to the exception 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, respectively, by and :

    To complete the direct course of the Gauss method, it remains for us to exclude the unknown variable x 3 from the last equation of the system. We add to the left and right sides of the fourth equation, respectively, the left and right side third equation multiplied by :

    You can start the reverse of the Gaussian method.

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

    For verification, 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 by the Gauss method is found correctly.

    Answer:

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

    Example.

    Find the solution to the system of equations by the Gauss method.

    Solution.

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

    The direct course of the Gauss 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, which we carried out with a coordinate system. Now you will be convinced of this.

    Let's transform the matrix so that all elements in the first column, starting from the second, become zero. To do this, add to the elements of the second, third and fourth lines the corresponding elements of the first line multiplied by, and on, respectively:

    Next, we transform the resulting matrix so that in the second column all elements starting from the third become zero. This will match the elimination of the unknown variable x 2. To do this, add to the elements of the third and fourth rows the corresponding elements of the first row of the matrix, multiplied, respectively, by and :

    It remains to eliminate the unknown variable x 3 from the last equation of the system. To do this, to the elements of the last row of the resulting matrix, we add the corresponding elements of the penultimate row, multiplied by :

    It should be noted that this matrix corresponds to the system of linear equations

    which was obtained earlier after the direct move.

    It's time to go back. In matrix notation, the inverse of the Gaussian method presupposes such a transformation of the resulting matrix so that the matrix marked in the figure

    became diagonal, that is, took the form

    where are some numbers.

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

    The resulting matrix corresponds to the system of equations , whence we find 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 decimal fractions go to ordinary fractions.

    Example.

    Solve a system of three equations using the Gaussian method .

    Solution.

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

    Eliminate 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, and y is present in the third equation, therefore, we swap the second and third equations:

    This completes the direct run of the Gauss method (it is not necessary to exclude y from the third equation, since this unknown variable no longer exists).

    We proceed to the reverse.

    From the last equation we find ,
    from the penultimate


    from the first equation we have

    Answer:

    X = 10, y = 5, z = -20.

    The solution of systems of linear algebraic equations, in which the number of equations does not coincide with the number of unknowns or the basic matrix of the system is degenerate, by the Gauss method.

    Systems of equations, the main matrix of which is rectangular or square degenerate, may not have solutions, may have a unique solution, or may have an infinite set of solutions.

    Now we will figure out how the Gauss method allows us to establish the compatibility or incompatibility of a system of linear equations, and in the case of its compatibility, to 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, you should dwell in detail on some situations that may arise.

    We pass to the most important stage.

    So, let us assume that the system of linear algebraic equations after the completion of the direct course of the Gauss method took 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 out the unknown variables, which are in the first place of all equations of the resulting system:

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

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

    After that, numbers are found in the right-hand sides of all equations of our SLAE, and we can go over to the reverse of the Gauss method.

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

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

    Giving numbers different meanings, we will receive different solutions systems of equations. That is, our system of equations has infinitely many solutions.

    Answer:

    where - arbitrary numbers.

    To consolidate the material, we will analyze in detail the solutions of several more examples.

    Example.

    Solve a homogeneous system of linear algebraic equations by the Gauss method.

    Solution.

    Eliminate the unknown variable x from the second and third equations of the system. To do this, we add to the left and right sides of the second equation, respectively, the left and right sides of the first equation, multiplied by, and to the left and right sides of the third equation - the left and right sides of the first equation, multiplied by:

    Now we exclude y from the third equation of the resulting system of equations:

    The resulting SLAE is equivalent to the system .

    We leave on the left side of the equations of the system only the terms containing the unknown variables x and y, and we transfer the terms with the unknown variable z to the right side:

    One of the simplest ways to solve a system of linear equations is a technique based on calculating 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 kind of parameters. Its disadvantage is the cumbersome calculations in the case a large number equations; moreover, Cramer's rule is not directly applicable to systems in which the number of equations does not coincide with the number of unknowns. In such cases, usually apply Gauss method.

    Systems of linear equations that have the same set of solutions are called equivalent... Obviously, the set of solutions linear system will not change if some equations are swapped, or one of the equations is multiplied by some nonzero number, or if one equation is added to the other.

    Gauss method (method of successive elimination of unknowns) lies in the fact that with the help of elementary transformations the system is reduced to an equivalent system of a step type. First, with the help of the 1st equation, the x 1 of all subsequent equations of the system. Then, with the help of the 2nd equation, x 2 of the 3rd and all subsequent equations. This process, called by the direct course of the Gauss method, continues until only one unknown remains on the left side of the last equation x n... After that, it is produced backward 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 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 expanded system matrix, because in it, in addition to the main matrix of the system, a column of free terms is included. Gauss's 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 transformations of the rows (!) Of the extended matrix of the system.

    Example 5.1. Solve the system using the Gaussian method:

    Solution... Let us write out the extended matrix of the system and, using the first row, after that we will zero out the rest of the elements:

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


    Now you need all the elements in the second column below the 2nd row to be equal to zero. To do this, you can multiply the second row by –4/7 and add to the 3rd row. However, in order not to deal with fractions, we will create a unit in the 2nd row of the second column and only

    Now, to get a triangular matrix, you need to zero out the element of the fourth row of the 3rd column, for this you can multiply the third row by 8/54 and add it to the fourth. However, in order not to deal with fractions, we will swap the positions of the 3rd and 4th rows and the 3rd and 4th columns, and only after that we will zero out the specified element. Note that when the columns are rearranged, the corresponding variables are swapped and you need to remember this; 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:

    Hence, using the reverse course of the Gauss method, we find from the fourth equation x 3 = -1; from the third x 4 = –2, from the second x 2 = 2 and from the first equation x 1 = 1. In matrix form, the answer is written as

    We have considered the case when the system is definite, i.e. when there is only one solution. Let's see what happens if the system is inconsistent or uncertain.

    Example 5.2. Investigate the system using the Gaussian method:

    Solution... Write out and transform the extended matrix of the system

    We write down 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 inconsistent. à

    Example 5.3. Investigate 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, and there are four unknowns, i.e. two unknown "extra". Let it be "superfluous", or, as they say, free variables will be x 3 and x 4 . Then

    Assuming x 3 = 2a and x 4 = b, we get x 2 = 1–a and x 1 = 2ba; or in matrix form

    A solution written in this way is called common, since by giving the parameters a and b different meanings, all can be described possible solutions systems. a