Reduced system of linear equations. Solving systems of linear equations by the Gaussian method

In this lesson, we will consider methods for solving the system linear equations... In the course of higher mathematics, systems of linear equations must be solved both in the form of separate tasks, for example, "Solve a system using Cramer's formulas", and in the course of solving other problems. Systems of linear equations have to be dealt with in almost all branches of higher mathematics.

First, a little theory. What does the mathematical word "linear" mean in this case? This means that the equations of the system all variables are included in the first degree: without any fancy stuff like and so on, from which only participants in mathematical Olympiads are delighted.

V higher mathematics not only letters familiar from childhood are used to denote variables.
A fairly popular option is variables with indices:.
Or the initial letters of the Latin alphabet, small and large:
It is not so rare to find Greek letters: - known to many "alpha, beta, gamma". And also a set with indices, say, with the letter "mu":

The use of a particular set of letters depends on the branch of higher mathematics in which we are faced with a system of linear equations. So, for example, in systems of linear equations encountered when solving integrals, differential equations traditionally it is customary to use the notation

But no matter how the variables are designated, the principles, methods and methods of solving a system of linear equations do not change from this. Thus, if you come across something scary like, do not rush to close the book in fear, in the end, you can draw the sun instead, instead of a bird, and instead of a face (teacher). And, funny as it may seem, the system of linear equations with these designations can also be solved.

Something I have such a premonition that the article will turn out to be quite long, so a small table of contents. So, the sequential "debriefing" will be like this:

- Solving a system of linear equations by the substitution method ("school method");
- Solution of the system by the method of term-by-term addition (subtraction) of the equations of the system;
- Solution of the system according to Cramer's formulas;
- Solving the system using the inverse matrix;
- System solution by Gauss method.

Everyone is familiar with systems of linear equations from the school mathematics course. Basically, we start with repetition.

Solution of a system of linear equations by the substitution method

This method can also be called the "school method" or the method of excluding unknowns. Figuratively speaking, it can also be called the "unfinished Gauss method."

Example 1


Here we have a system of two equations with two unknowns. Note that the free terms (numbers 5 and 7) are located on the left side of the equation. Generally speaking, it does not matter where they are, to the left or to the right, it is just that in problems in higher mathematics they are often located just like that. And such a record should not be confusing, if necessary, the system can always be written "as usual":. Do not forget that when transferring a term from part to part, it needs to change its sign.

What does it mean to solve a system of linear equations? To solve a system of equations means to find a set of its solutions. The solution of the system is a set of values ​​of all variables included in it, which turns EVERY equation in the system into a true equality. In addition, the system can be inconsistent (have no solutions).Do not be discouraged, this general definition=) We will have only one "x" value and one "y" value, which satisfy each c-we equation.

There is a graphical method for solving the system, which can be found in the lesson. The simplest tasks with a straight line... I also talked about geometric sense systems of two linear equations in two unknowns. But now the era of algebra is in the yard, and numbers-numbers, actions-actions.

We solve: from the first equation we express:
We substitute the resulting expression into the second equation:

We open the brackets, give similar terms and find the value:

Next, we recall what we danced from:
We already know the value, it remains to find:

Answer:

After solving ANY system of equations in ANY way, I strongly recommend that you check (verbally, on a draft or on a calculator)... Fortunately, this is done easily and quickly.

1) Substitute the found answer into the first equation:

- the correct equality is obtained.

2) Substitute the found answer into the second equation:

- the correct equality is obtained.

Or, to put it simply, "everything came together"

The considered solution is not the only one, from the first equation it was possible to express, not.
Alternatively, you can express something from the second equation and substitute it into the first equation. By the way, notice that the most disadvantageous of the four ways is to express from the second equation:

Fractions are obtained, but why is it? There is a more rational solution.

Nevertheless, in some cases, fractions are still indispensable. In this regard, I would like to draw your attention to HOW I wrote down the expression. Not like this:, and by no means not like this: .

If in higher mathematics you are dealing with fractional numbers, then try to carry out all calculations in ordinary irregular fractions.

Exactly, not or!

The comma can be used only occasionally, in particular, if it is the final answer to a problem, and you no longer need to perform any action with this number.

Many readers probably thought “why is this detailed explanation, as for the correction class, and so everything is clear. " Nothing of the kind, like such a simple school example, but how many VERY important conclusions! Here's another one:

You should strive to complete any task in the most rational way.... If only because it saves time and nerves, and also reduces the likelihood of making a mistake.

If in a problem in higher mathematics you come across a system of two linear equations with two unknowns, then you can always use the substitution method (if it is not indicated that the system needs to be solved by another method) No teacher will think that you are a sucker to lower the mark for using the “school method” ".
Moreover, in a number of cases, the substitution method is advisable to use also for more variables.

Example 2

Solve a system of linear equations with three unknowns

A similar system of equations often arises when using the so-called method of indefinite coefficients, when we find the integral of a fractional rational function. The system in question was taken by me from there.

Finding the integral - the goal quickly find the values ​​of the coefficients, and not be sophisticated with Cramer's formulas, the method inverse matrix etc. Therefore, in this case, the substitution method is appropriate.

When any system of equations is given, it is first of all desirable to find out, but is it possible to simplify it in some way DIRECTLY? Analyzing the equations of the system, we notice that the second equation of the system can be divided by 2, which we do:

Reference: the mathematical sign means "it follows from this", it is often used in the course of solving problems.

Now we analyze the equations, we need to express some variable in terms of the rest. Which equation should you choose? You probably already guessed that the easiest way for this purpose is to take the first equation of the system:

Here, it makes no difference which variable to express, you could just as well express or.

Further, we substitute the expression for into the second and third equations of the system:

We open the brackets and give similar terms:

Divide the third equation by 2:

From the second equation, we express and substitute in the third equation:

Almost everything is ready, from the third equation we find:
From the second equation:
From the first equation:

Check: Substitute the found values ​​of the variables into the left side of each equation of the system:

1)
2)
3)

The corresponding right-hand sides of the equations are obtained, thus, the solution is found correctly.

Example 3

Solve a system of linear equations with 4 unknowns

This is an example for independent decision(answer at the end of the lesson).

Solution of the system by the method of term-by-term addition (subtraction) of the equations of the system

In the course of solving systems of linear equations, one should try to use not the "school method", but the method of term-by-term addition (subtraction) of the equations of the system. Why? This saves time and simplifies calculations, however, now it will become more understandable.

Example 4

Solve a system of linear equations:

I took the same system as in the first example.
Analyzing the system of equations, we notice that the coefficients of the variable are the same in modulus and opposite in sign (–1 and 1). In such a situation, the equations can be added term by term:

Actions highlighted in red are carried out THINKINGLY.
As you can see, as a result of term-by-term addition, the variable has disappeared. This, in fact, is the essence of the method is to get rid of one of the variables.

Solution... A = ... Find r (A). Because matrix And has an order of 3x4, then the highest order of minors is 3. In this case, all minors of the third order are equal to zero (check it yourself). Means, r (A)< 3. Возьмем главный base minor = -5-4 = -9 0. Hence r (A) = 2.

Consider matrix WITH = .

Minor of the third order 0. Hence, r (C) = 3.

Since r (A) r (C), then the system is inconsistent.

Example 2. Determine the consistency of the system of equations

Solve this system if it turns out to be joint.

Solution.

A =, C = ... Obviously, r (A) ≤ 3, r (C) ≤ 4. Since detC = 0, then r (C)< 4. Consider minor third order located in the upper left corner of the matrix A and C: = -23 0. Hence, r (A) = r (C) = 3.

Number unknown in the system n = 3... Hence, the system has only decision... In this case, the fourth equation represents the sum of the first three and can be ignored.

According to Cramer's formulas we get x 1 = -98/23, x 2 = -47/23, x 3 = -123/23.

2.4. Matrix method. Gauss method

The system n linear equations With n unknowns can be solved matrix method according to the formula X = A -1 B (at Δ 0), which is obtained from (2) by multiplying both parts by A -1.

Example 1. Solve the system of equations

matrix method (in Section 2.2 this system was solved by Cramer's formulas)

Solution... Δ = 10 0 A = is a non-degenerate matrix.

= (make sure of this yourself by making the necessary calculations).

A -1 = (1 / Δ) x = .

X = A -1 B = x =.

Answer: .

From a practical point of view matrix method and formulas Cramer are computationally intensive, so preference is given to Gaussian method, which consists in the successive elimination of unknowns. For this, the system of equations is reduced to an equivalent system with a triangular extended matrix (all elements below the main diagonal are equal to zero). These actions are called direct moves. From the resulting triangular system, the variables are found using successive substitutions (backward motion).

Example 2... Using the Gauss method, solve the system

(Above this system was solved by the Cramer formula and the matrix method).

Solution.

Direct course. We write down the extended matrix and using elementary transformations let's bring it to a triangular form:

~ ~ ~ ~ .

We get the system

Reverse move. From the last equation we find X 3 = -6 and plug that into the second equation:

X 2 = - 11/2 - 1/4X 3 = - 11/2 - 1/4(-6) = - 11/2 + 3/2 = -8/2 = -4.

X 1 = 2 -X 2 + X 3 = 2+4-6 = 0.

Answer: .

2.5. General solution of a system of linear equations

Let a system of linear equations be given = b i(i=). Let r (A) = r (C) = r, that is, the system is shared. Any minor of order r other than zero is basic minor. Without loss of generality, we will assume that the basic minor is located in the first r (1 ≤ r ≤ min (m, n)) rows and columns of the matrix A. last m-r equations of the system, we write the truncated system:


which is equivalent to the original one. Let's call the unknowns x 1, ... .x r basic, and x r +1, ..., x r free and transfer the terms containing free unknowns to the right-hand side of the equations of the truncated system. We get a system with respect to basic unknowns:

which for each set of values ​​of free unknowns x r +1 = С 1, ..., x n = С n-r has the only solution x 1 (С 1, ..., С n-r), ..., x r (С 1, ..., С n-r), found by Cramer's rule.

Appropriate solution shortened, and, consequently, the original system has the form:

X (C 1, ..., C n-r) = - general solution of the system.

If we assign some numerical values ​​to the free unknowns in the general solution, then we obtain the solution linear system called private.

Example... Establish compatibility and find a general solution to the system

Solution... A = , C = .

So how r (A)= r (C) = 2 (see for yourself), then the original system is compatible and has an infinite number of solutions (since r< 4).

where x* - one of the solutions of the inhomogeneous system (2) (for example (4)), (E − A + A) forms the kernel (zero space) of the matrix A.

Let's do the skeletal decomposition of the matrix (E − A + A):

E − A + A = Q S

where Q n × n − r- matrix rank (Q) = n − r, S n − r × n-matrix rank (S) = n − r.

Then (13) can be written as follows:

x = x * + Q k, k R n-r.

where k = Sz.

So, general solution procedure systems of linear equations using a pseudoinverse matrix can be represented as follows:

  1. Computing the pseudoinverse A + .
  2. We calculate a particular solution of the inhomogeneous system of linear equations (2): x*=A + b.
  3. We check the compatibility of the system. To do this, we calculate AA + b... If AA + bb, then the system is inconsistent. Otherwise, we continue the procedure.
  4. We pay E − A + A.
  5. Making skeletal decomposition E − A + A = Q S.
  6. Building a solution

x = x * + Q k, k R n-r.

Solving a system of linear equations online

The online calculator allows you to find a general solution to a system of linear equations with detailed explanations.


Linear systems solution algebraic equations(SLAU) is undoubtedly the most important topic course in linear algebra. A huge number of problems from all branches of mathematics is reduced to solving systems of linear equations. These factors explain the reason for creating this article. The material of the article is selected and structured so that with its help you can

  • pick up optimal method solving your system of linear algebraic equations,
  • study the theory of the chosen method,
  • solve your system of linear equations by considering in detail the analyzed solutions of typical examples and problems.

Brief description of the article material.

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

Next, we will consider methods for solving systems of linear algebraic equations in which the number of equations is equal to the number of unknown variables and which have a unique solution. First, let us dwell on Cramer's method, secondly, show a matrix method for solving such systems of equations, and thirdly, analyze the Gauss method (method successive elimination unknown variables). To consolidate the theory, we will definitely solve several SLAEs in different ways.

After that, we proceed to solving systems of linear algebraic equations general view, in which the number of equations does not coincide with the number of unknown variables or the main matrix of the system is degenerate. Let us formulate the Kronecker - Capelli theorem, which allows us to establish the compatibility of SLAEs. Let us analyze the solution of systems (in the case of their compatibility) using the concept of a basic minor of a matrix. We will also consider the Gauss method and describe in detail the solutions of examples.

We will definitely dwell on the structure of the general solution of homogeneous and inhomogeneous systems of linear algebraic equations. Let us give the concept of a fundamental system of solutions and show how the general solution of an SLAE is written using vectors of the fundamental system of solutions. For a better understanding, let's look at a few examples.

In conclusion, we consider systems of equations that reduce to linear ones, as well as different tasks, in the solution of which SLAEs arise.

Page navigation.

Definitions, concepts, designations.

We will consider systems of p linear algebraic equations with n unknown variables (p can be equal to n) of the form

Unknown variables, - coefficients (some real or complex numbers), - free terms (also real or complex numbers).

This form of SLAE notation is called coordinate.

V matrix form notation, this system of equations has the form,
where - the main matrix of the system, - the matrix-column of unknown variables, - the matrix-column of free members.

If we add to the matrix A as the (n + 1) th column the matrix-column of free terms, then we get the so-called expanded matrix systems of linear equations. Usually, the 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,

By solving a system of linear algebraic equations is a set of values ​​of unknown variables that converts all equations of the system into identities. The matrix equation for the given values ​​of the unknown variables also turns into an identity.

If a system of equations has at least one solution, then it is called joint.

If the system of equations has no solutions, then it is called inconsistent.

If the SLAE has a unique solution, then it is called a certain; if there is more than one solution, then - undefined.

If the free terms of all equations of the system are equal to zero , then the system is called homogeneous, otherwise - heterogeneous.

Solution of elementary systems of linear algebraic equations.

If the number of equations of the system is equal to the number of unknown variables and the determinant of its main matrix is ​​not is zero, then such SLAEs will be called elementary... Such systems of equations have a unique solution, and in the case of a homogeneous system all unknown variables are equal to zero.

We began to study such SLAEs in high school. When solving them, we took one equation, expressed one unknown variable in terms of others and substituted it into the remaining equations, then we took the next equation, expressed the next unknown variable and substituted it into other equations, and so on. Or they used the method of addition, that is, they added two or more equations to eliminate some unknown variables. We will not dwell on these methods in detail, since they are, in fact, modifications of the Gauss method.

The main methods for solving elementary systems of linear equations are Cramer's method, matrix method and Gauss method. Let's analyze them.

Solving systems of linear equations by Cramer's method.

Suppose we need to solve a system of linear algebraic equations

in which the number of equations is equal to the number of unknown variables and the determinant of the main matrix of the system is nonzero, that is,.

Let be the determinant of the main matrix of the system, and - determinants of matrices, which are obtained from A by replacing 1st, 2nd, ..., nth column, respectively, to the column of free members:

With this notation, the unknown variables are calculated by the formulas of Cramer's method as ... This is how the solution of a system of linear algebraic equations is found by Cramer's method.

Example.

Cramer's method .

Solution.

The main matrix of the system has the form ... Let's calculate its determinant (if necessary, see the article):

Since the determinant of the main matrix of the system is nonzero, the system has a unique solution that can be found by Cramer's method.

Let us compose and calculate the necessary determinants (the determinant is obtained by replacing the first column in matrix A with a column of free members, the determinant - by replacing the second column with a column of free members, - by replacing the third column of matrix A with a column of free members):

Find unknown variables by the formulas :

Answer:

The main drawback of Cramer's method (if it can be called a drawback) is the complexity of calculating determinants when the number of equations in the system is more than three.

Solving systems of linear algebraic equations by the matrix method (using the inverse matrix).

Let the system of linear algebraic equations be given in matrix form, where matrix A has dimension n by n and its determinant is nonzero.

Since, the matrix A is invertible, that is, there is an inverse matrix. If we multiply both sides of the equality by the left, then we get a formula for finding the column matrix of unknown variables. So we got the solution of a system of linear algebraic equations by the matrix method.

Example.

Solve a system of linear equations matrix method.

Solution.

Let's rewrite the system of equations in matrix form:

Because

then SLAE can be solved by the matrix method. Using the inverse matrix, the solution to this system can be found as .

Let's construct an inverse matrix using a matrix of algebraic complements of elements of matrix A (if necessary, see the article):

It remains to calculate - the matrix of unknown variables by multiplying the inverse matrix to a column matrix of free members (see the article if necessary):

Answer:

or in another notation x 1 = 4, x 2 = 0, x 3 = -1.

The main problem in finding a solution to systems of linear algebraic equations by the matrix method is the complexity of finding the inverse matrix, especially for square matrices orders of magnitude higher than the third.

Solution of systems of linear equations by the Gauss method.

Suppose we need to find a solution to a system of 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, x 1 is excluded from all equations of the system, starting with the second, then x 2 is excluded from all equations, starting with the third, and so on, until only the unknown variable x n remains in the last equation. 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, x n is found from the last equation, using this value, x n-1 is calculated from the penultimate equation, and so on, x 1 is found from the first equation. 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 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 begin the reverse course of the Gauss method: we calculate x n from the last equation as, using the obtained value of x n, we find x n-1 from the penultimate equation, and so on, we find x 1 from the first equation.

Example.

Solve a system of linear equations by the Gauss method.

Solution.

Eliminate the unknown variable x 1 from the second and third equations of the system. To do this, add the corresponding parts of the first equation, multiplied by and by, to both sides of the second and third equations:

Now we exclude x 2 from the third equation by adding to its left and right sides left and right sides of the second equation multiplied by:

At this point, the forward move of the Gauss method is over, we begin the reverse move.

From the last equation of the resulting system of equations, we find x 3:

From the second equation we obtain.

From the first equation, we find the remaining unknown variable and this completes the reverse course of the Gauss method.

Answer:

X 1 = 4, x 2 = 0, x 3 = -1.

Solution of systems of linear algebraic equations of general form.

In the general case, the number of equations in the system p does not coincide with the number of unknown variables n:

Such SLAEs may have no solutions, have a single solution, or have infinitely many solutions. This statement also applies to systems of equations, the basic matrix of which is square and degenerate.

The Kronecker - Capelli theorem.

Before finding a solution to a system of linear equations, it is necessary to establish its compatibility. The answer to the question when the SLAE is compatible and when it is incompatible is given by the Kronecker - Capelli theorem:
for a system of p equations with n unknowns (p can be equal to n) to be consistent, it is necessary and sufficient that the rank of the main matrix of the system be equal to the rank of the extended matrix, that is, Rank (A) = Rank (T).

Let us consider by example the application of the Kronecker - Capelli theorem to determine the compatibility of a system of linear equations.

Example.

Find out if the system of linear equations solutions.

Solution.

... Let's use the bordering minors method. Minor of the second order nonzero. Let's sort out the third-order minors bordering it:

Since all bordering minors of the third order are equal to zero, the rank of the main matrix is ​​two.

In turn, the rank of the extended matrix is equal to three, since the third-order minor

nonzero.

In this way, Rang (A), therefore, by the Kronecker - Capelli theorem, we can conclude that the original system of linear equations is inconsistent.

Answer:

The system has no solutions.

So, we have learned to establish the inconsistency of the system using the Kronecker - Capelli theorem.

But how to find a solution to a SLAE if its compatibility has been established?

To do this, we need the concept of a basic minor of a matrix and a theorem on the rank of a matrix.

The highest order minor of the matrix A, other than zero, is called basic.

It follows from the definition of a basic minor that its order is equal to the rank of the matrix. For a nonzero matrix A, there can be several basic minors; there is always one basic minor.

For example, consider the matrix .

All third-order minors of this matrix are equal to zero, since the elements of the third row of this matrix are the sum of the corresponding elements of the first and second rows.

The following second-order minors are basic, since they are nonzero

Minors are not basic, since they are equal to zero.

Matrix rank theorem.

If the rank of a matrix of order p by n is equal to r, then all elements of the rows (and columns) of the matrix that do not form the selected basic minor are linearly expressed in terms of the corresponding elements of the rows (and columns) that form the basic minor.

What does the matrix rank theorem give us?

If, by the Kronecker - Capelli theorem, we have established the compatibility of the system, then we choose any basic minor of the basic matrix of the system (its order is r), and we exclude from the system all equations that do not form the chosen basic minor. The SLAE obtained in this way will be equivalent to the original one, since the discarded equations are still redundant (according to the matrix rank theorem, they are a linear combination of the remaining equations).

As a result, after discarding unnecessary equations of the system, two cases are possible.

    If the number of equations r in the resulting system is equal to the number of unknown variables, then it will be definite and the only solution can be found by Cramer's method, matrix method or Gauss's method.

    Example.

    .

    Solution.

    The rank of the main matrix of the system is equal to two, since the second order minor nonzero. Extended Matrix Rank is also equal to two, since the only minor of the third order is equal to zero

    and the second-order minor considered above is nonzero. Based on the Kronecker - Capelli theorem, we can assert the compatibility of the original system of linear equations, since Rank (A) = Rank (T) = 2.

    We take as a basic minor ... It is formed by the coefficients of the first and second equations:

    The third equation of the system does not participate in the formation of the basic minor; therefore, we exclude it from the system based on the theorem on the rank of the matrix:

    So we got an elementary system of linear algebraic equations. Let's solve it using Cramer's method:

    Answer:

    x 1 = 1, x 2 = 2.

    If the number of equations r in the obtained SLAE is less than the number of unknown variables n, then in the left-hand sides of the equations we leave the terms forming the basic minor, the rest of the terms are transferred to the right-hand sides of the equations of the system with the opposite sign.

    Unknown variables (there are r of them) remaining in the left-hand sides of the equations are called the main.

    Unknown variables (there are n - r pieces) that appear in the right-hand sides are called free.

    Now we assume that free unknown variables can take arbitrary values, and r basic unknown variables will be expressed in terms of free unknown variables in a unique way. Their expression can be found by solving the obtained SLAE by the Cramer method, by the matrix method, or by the Gauss method.

    Let's take an example.

    Example.

    Solve a system of linear algebraic equations .

    Solution.

    Find the rank of the main matrix of the system by the method of bordering minors. We take a 1 1 = 1 as a nonzero first-order minor. Let's start looking for a nonzero second-order minor that surrounds this minor:

    This is how we found a nonzero second-order minor. Let's start looking for a third-order nonzero bordering minor:

    Thus, the rank of the main matrix is ​​three. The rank of the extended matrix is ​​also three, that is, the system is consistent.

    We take the found nonzero third-order minor as the basic one.

    For clarity, we show the elements that form the basic minor:

    We leave on the left side of the equations of the system the terms participating in the basic minor, transfer the rest with opposite signs to the right sides:

    Let us assign arbitrary values ​​to the free unknown variables x 2 and x 5, that is, we take , where are arbitrary numbers. In this case, the SLAE will take the form

    The resulting elementary system of linear algebraic equations is solved by Cramer's method:

    Hence, .

    Do not forget to indicate free unknown variables in your answer.

    Answer:

    Where are arbitrary numbers.

Summarize.

To solve a system of linear algebraic equations of general form, we first find out its compatibility using the Kronecker - Capelli theorem. If the rank of the main matrix is ​​not equal to the rank of the extended matrix, then we conclude that the system is incompatible.

If the rank of the main matrix is ​​equal to the rank of the extended matrix, then we choose the basic minor and discard the equations of the system that do not participate in the formation of the selected basic minor.

If the order of the basic minor equal to the number unknown variables, then the SLAE has a unique solution, which we find by any known method.

If the order of the basic minor is less than the number of unknown variables, then on the left-hand side of the equations of the system we leave the terms with the basic unknown variables, transfer the remaining terms to the right-hand sides and give arbitrary values ​​to the free unknown variables. From the resulting system of linear equations, we find the main unknown variables by the Cramer method, the matrix method, or the Gauss method.

Gauss method for solving systems of linear algebraic equations of general form.

The Gauss method can be used to solve systems of linear algebraic equations of any kind without first examining them for compatibility. The process of successive elimination of unknown variables makes it possible to conclude both the compatibility and the incompatibility of the SLAE, and if a solution exists, it makes it possible to find it.

From the point of view of computational work, the Gaussian method is preferable.

Watch it detailed description and analyzed examples in the article the Gauss method for solving systems of linear algebraic equations of general form.

Writing the general solution of homogeneous and inhomogeneous linear algebraic systems using vectors of the fundamental system of solutions.

In this section, we will focus on compatible homogeneous and inhomogeneous systems of linear algebraic equations with an infinite set of solutions.

Let us first deal with homogeneous systems.

Fundamental decision system A homogeneous system of p linear algebraic equations with n unknown variables is the set (n - r) of linearly independent solutions of this system, where r is the order of the basic minor of the basic matrix of the system.

If we denote linearly independent solutions of a homogeneous SLAE as X (1), X (2),…, X (nr) (X (1), X (2),…, X (nr) are n-by-1 column matrices) , then the general solution of this homogeneous system is represented as a linear combination of vectors of the fundamental system of solutions with arbitrary constant coefficientsС 1, С 2, ..., С (n-r), that is,.

What does the term general solution of a homogeneous system of linear algebraic equations (oroslau) mean?

The point is simple: the formula sets everything possible solutions the original SLAE, in other words, taking any set of values ​​of arbitrary constants С 1, С 2, ..., С (n-r), according to the formula we get one of the solutions of the original homogeneous SLAE.

Thus, if we find a fundamental system of solutions, then we will be able to specify all solutions of this homogeneous SLAE as.

Let us show the process of constructing a fundamental system of solutions to a homogeneous SLAE.

We choose the basic minor of the original system of linear equations, exclude all other equations from the system, and transfer all terms containing free unknown variables to the right-hand sides of the equations of the system with opposite signs. Let us give the free unknown variables the values ​​1,0,0, ..., 0 and calculate the basic unknowns by solving the resulting elementary system of linear equations in any way, for example, by Cramer's method. This will give X (1) - the first solution to the fundamental system. If we give the free unknowns the values ​​0,1,0,0, ..., 0 and calculate the main unknowns, we get X (2). Etc. If we give the values ​​0.0, ..., 0.1 to the free unknown variables and calculate the basic unknowns, we get X (n-r). This is how the fundamental system of solutions of a homogeneous SLAE will be constructed and its general solution can be written in the form.

For inhomogeneous systems of linear algebraic equations, the general solution is represented in the form, where is the general solution of the corresponding homogeneous system, and is the particular solution of the original inhomogeneous SLAE, which we obtain by giving the free unknowns the values ​​0,0, ..., 0 and calculating the values ​​of the main unknowns.

Let's take a look at examples.

Example.

Find the fundamental system of solutions and the general solution of the homogeneous system of linear algebraic equations .

Solution.

The rank of the main matrix of homogeneous systems of linear equations is always equal to the rank of the extended matrix. Let us find the rank of the main matrix by the bordering minors method. As a nonzero first-order minor, we take the element a 1 1 = 9 of the main matrix of the system. Find a bordering nonzero second-order minor:

A nonzero second-order minor has been found. Let's iterate over the third-order minors bordering it in search of a nonzero one:

All bordering minors of the third order are equal to zero, therefore, the rank of the main and extended matrices is equal to two. Take as a basic minor. For clarity, we note the elements of the system that form it:

The third equation of the original SLAE does not participate in the formation of the basic minor, therefore, it can be excluded:

We leave on the right-hand sides of the equations the terms containing the main unknowns, and on the right-hand sides we transfer the terms with free unknowns:

Let us construct a fundamental system of solutions to the original homogeneous system of linear equations. Fundamental system solutions of this SLAE consists of two solutions, since the original SLAE contains four unknown variables, and the order of its basic minor is two. To find X (1), we assign the free unknown variables the values ​​x 2 = 1, x 4 = 0, then we find the main unknowns from the system of equations
.

As is clear from Cramer's theorems, when solving a system of linear equations, three cases may occur:

First case: a system of linear equations has a unique solution

(the system is consistent and definite)

Second case: a system of linear equations has an infinite number of solutions

(the system is consistent and undefined)

** ,

those. the coefficients of the unknowns and the free terms are proportional.

Third case: the system of linear equations has no solutions

(system inconsistent)

So the system m linear equations with n variables are called inconsistent if she has no solutions, and joint if it has at least one solution. A joint system of equations that has only one solution is called a certain, and more than one - undefined.

Examples of solving systems of linear equations by Cramer's method

Let the system be given

.

Based on Cramer's theorem

………….
,

where
-

system determinant. The rest of the determinants will be obtained by replacing the column with the coefficients of the corresponding variable (unknown) with free terms:

Example 2.

.

Therefore, the system is definite. To find its solution, we calculate the determinants

According to Cramer's formulas, we find:

So, (1; 0; -1) is the only solution to the system.

To check the solutions of the systems of equations 3 X 3 and 4 X 4, you can use the online calculator, decisive method Cramer.

If in the system of linear equations in one or several equations there are no variables, then in the determinant the corresponding elements are equal to zero! This is the next example.

Example 3. Solve the system of linear equations by Cramer's method:

.

Solution. We find the determinant of the system:

Look carefully at the system of equations and at the determinant of the system and repeat the answer to the question in which cases one or more elements of the determinant are equal to zero. So, the determinant is not equal to zero, therefore, the system is definite. To find its solution, we calculate the determinants for unknowns

According to Cramer's formulas, we find:

So, the solution to the system is (2; -1; 1).

6. General system linear algebraic equations. Gauss method.

As we remember, Cramer's rule and the matrix method are unsuitable in cases where the system has infinitely many solutions or is inconsistent. Gauss methodmost powerful and universal tool to find a solution to any system of linear equations, which the in every case will lead us to the answer! The algorithm of the method itself works the same in all three cases. If the knowledge of determinants is required in the Cramer and matrix methods, then to apply the Gauss method, only knowledge of arithmetic operations is required, which makes it accessible even for schoolchildren primary grades.



First, let's systematize the knowledge about systems of linear equations a little. A system of linear equations can:

1) Have a unique solution.
2) Have infinitely many solutions.
3) Have no solutions (be inconsistent).

Gaussian method is the most powerful and versatile tool for finding a solution any systems of linear equations. As we remember Cramer's rule and matrix method unsuitable in cases where the system has infinitely many solutions or is incompatible. And the method of successive elimination of unknowns anyway will lead us to the answer! In this lesson, we will again consider the Gauss method for case No. 1 (the only solution to the system), an article is reserved for the situation of points No. 2-3. Note that the algorithm of the method itself works the same in all three cases.

Back to the simplest system from the lesson How to solve a system of linear equations?
and solve it by the Gauss method.

At the first stage, you need to write extended system matrix:
... On what principle the coefficients are written, I think everyone can see. The vertical bar inside the matrix does not carry any mathematical meaning - it is just an underline for ease of design.

reference:I recommend to remember terms linear algebra. System Matrix Is a matrix composed only of the coefficients with unknowns, in this example system matrix:. Extended system matrix- this is the same matrix of the system plus a column of free members, in this case:. Any of the matrices can be called simply a matrix for brevity.



After the expanded matrix of the system is written down, it is necessary to perform some actions with it, which are also called elementary transformations.

There are the following elementary transformations:

1) Strings matrices can be rearranged places. For example, in the matrix under consideration, you can painlessly rearrange the first and second rows:

2) If the matrix contains (or appears) proportional (as a special case - the same) rows, then it follows delete from the matrix all these rows except one. Consider, for example, the matrix ... In this matrix, the last three rows are proportional, so it is enough to leave only one of them: .

3) If a zero row appeared in the matrix during the transformations, then it also follows delete... I will not draw, of course, the zero line is the line in which only zeros.

4) The row of the matrix can be multiply (divide) by any number, nonzero... Consider, for example, a matrix. Here it is advisable to divide the first line by –3, and multiply the second line by 2: ... This action is very useful as it simplifies further matrix transformations.

5) This transformation is the most difficult, but in fact, there is nothing complicated either. To a row of a matrix, you can add another string multiplied by a number nonzero. Consider our matrix from practical example:. First, I'll describe the conversion in great detail. Multiply the first line by –2: , and to the second line add the first line multiplied by –2: ... Now the first line can be split "back" by –2:. As you can see, the line that ADD LEEhas not changed. Is always changes the line TO WHICH THE INCREASE UT.

In practice, of course, they do not describe in such detail, but write shorter:

Once again: to the second line added the first line multiplied by –2... The string is usually multiplied orally or on a draft, while the mental course of the calculations is something like this:

“I rewrite the matrix and rewrite the first line: »

“First column first. At the bottom, I need to get zero. Therefore, I multiply the unit at the top by –2:, and add the first to the second line: 2 + (–2) = 0. I write the result into the second line: »

“Now for the second column. Above –1 multiplied by –2:. I add the first to the second line: 1 + 2 = 3. I write the result into the second line: »

“And the third column. Above –5 multiplied by –2:. I add the first to the second line: –7 + 10 = 3. I write the result into the second line: »

Please, carefully comprehend this example and understand the sequential algorithm of calculations, if you understand this, then the Gauss method is practically "in your pocket". But, of course, we will work on this transformation.

Elementary transformations do not change the solution of the system of equations

! ATTENTION: considered manipulations can not use, if you are offered a task where the matrices are given "by themselves". For example, with "classic" actions with matrices In no case should you rearrange something inside the matrices!

Let's go back to our system. She's practically taken apart to pieces.

We write down the extended matrix of the system and, using elementary transformations, reduce it to stepped view:

(1) The first line multiplied by –2 was added to the second line. And again: why the first line is multiplied exactly by –2? In order to get zero at the bottom, which means get rid of one variable in the second line.

(2) Divide the second row by 3.

The goal of elementary transformations bring the matrix to a stepped form: ... In the design of the assignment, the "ladder" is marked out with a simple pencil, and the numbers that are located on the "steps" are circled. The term "step type" itself is not entirely theoretical; in scientific and educational literature it is often called trapezoidal view or triangular view.

As a result of elementary transformations, we obtained equivalent original system of equations:

Now the system needs to be "unrolled" in the opposite direction - from bottom to top, this process is called backward Gaussian method.

In the lower equation, we already have a ready-made result:.

Let us consider the first equation of the system and substitute the already known value of "game" into it:

Let us consider the most common situation when the Gauss method requires solving a system of three linear equations with three unknowns.

Example 1

Solve the system of equations by the Gauss method:

Let's write down the extended matrix of the system:

Now I will immediately draw the result that we will come to in the course of the solution:

And again, our goal is to bring the matrix to a stepped form using elementary transformations. Where to start the action?

First, we look at the top-left number:

It should almost always be here unit... Generally speaking, –1 will be fine (and sometimes other numbers), but somehow it so traditionally happened that the unit is usually placed there. How to organize a unit? We look at the first column - we have a ready-made unit! First transformation: swap the first and third lines:

Now the first line will remain unchanged until the end of the solution.... Now fine.

The unit in the upper left is organized. Now you need to get zeros in these places:

We get the zeros just with the help of the "difficult" transformation. First, we deal with the second line (2, –1, 3, 13). What should be done to get zero in the first position? Need to to the second line add the first line multiplied by –2... Mentally or on a draft, multiply the first line by –2: (–2, –4, 2, –18). And we consistently carry out (again mentally or on a draft) addition, to the second line we add the first line, already multiplied by –2:

We write the result to the second line:

We deal with the third line in the same way (3, 2, –5, –1). To get zero in the first position, you need to the third line add the first line multiplied by –3... Mentally or on a draft, multiply the first line by –3: (–3, –6, 3, –27). AND to the third line add the first line multiplied by –3:

We write the result in the third line:

In practice, these actions are usually performed orally and recorded in one step:

You don't need to count everything at once and at the same time... The order of calculations and "writing" the results consistent and usually like this: first we rewrite the first line, and we puff ourselves on the sly - SEQUENTIAL and CAREFULLY:


And I have already examined the mental course of the calculations themselves above.

In this example, this is easy to do, the second line is divided by –5 (since all numbers are divisible by 5 without remainder). At the same time, we divide the third row by –2, because the smaller the number, the easier solution:

At the final stage of elementary transformations, you need to get another zero here:

For this to the third line add the second line multiplied by –2:


Try to parse this action yourself - mentally multiply the second line by –2 and add.

The last performed action is the hairstyle of the result, divide the third line by 3.

As a result of elementary transformations, an equivalent initial system of linear equations was obtained:

Cool.

The reverse of the Gaussian method now comes into play. The equations "unwind" from bottom to top.

In the third equation, we already have a ready-made result:

We look at the second equation:. The meaning of "z" is already known, thus:

And finally, the first equation:. "Y" and "z" are known, the matter is small:


Answer:

As has already been noted many times, for any system of equations it is possible and necessary to check the solution found, fortunately, it is easy and fast.

Example 2


This is a do-it-yourself sample, a finishing sample, and the answer at the end of the tutorial.

It should be noted that your decision course may not coincide with my course of decision, and this is a feature of the Gauss method... But the answers must be the same!

Example 3

Solve a system of linear equations by the Gaussian method

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 a unit there. The problem is that there are no ones in the first column at all, so rearranging the rows will not solve anything. In such cases, the unit needs to be organized using an elementary transformation. This can usually be done in several ways. I did this:
(1) To the first line 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 is "minus one", which is fine for us. Anyone who wants to get +1 can perform an additional body movement: multiply the first line by –1 (change its sign).

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

(3) The first line was multiplied by -1, in principle, this is for beauty. We also changed the sign of the third line and moved it to the second place, thus, on the second “step, we have the required unit.

(4) The second row, multiplied by 2, was added to the third row.

(5) The third line was divided by 3.

A bad sign that indicates an error in calculations (less often - a typo) is the "bad" bottom line. That is, if at the bottom we got something like, and, accordingly, , then with a high degree of probability it can be argued that a mistake was made in the course of elementary transformations.

We charge the reverse stroke, in the design of examples, the system itself is often not rewritten, and the equations "are taken directly from the given matrix." The reverse move, I remind you, works from the bottom up. Yes, here the gift turned out:


Answer: .

Example 4

Solve a system of linear equations by the Gaussian method

This is an example for an independent solution, it is somewhat more complicated. It's okay if anyone gets confused. Complete solution and a sample design at the end of the lesson. Your solution may differ from mine.

In the last part, we will consider some of the features of the Gauss algorithm.
The first feature is that sometimes some variables are missing in the equations of the system, for example:

How to write the extended system matrix correctly? I already talked about this moment in the lesson. Cramer's rule. Matrix method... In the extended matrix of the system, we put zeros in place of the missing variables:

By the way, this is a fairly easy example, since there is already one zero in the first column, and there are fewer elementary transformations to be performed.

The second feature is as follows. In all the considered examples, we placed either –1 or +1 on the “steps”. Could other numbers be there? In some cases, they can. Consider the system: .

Here, on the upper left "step" we have a two. But we notice the fact that all the numbers in the first column are divisible by 2 without a remainder - and the other two and six. And the deuce at the top left will suit us! At the first step, you need to perform the following transformations: add the first line multiplied by –1 to the second line; to the third line add the first line multiplied by –3. This will give us the desired zeros in the first column.

Or else such conditional example: ... Here the three on the second "step" also suits us, since 12 (the place where we need to get zero) is divisible by 3 without a remainder. It is necessary to carry out the following transformation: to the third line add the second line multiplied by –4, as a result of which the zero we need will be obtained.

The Gauss method is universal, but there is one peculiarity. You can confidently learn how to solve systems by other methods (Cramer's method, matrix method) literally the first time - there is a very rigid algorithm. But in order to feel confident in the Gauss method, you should “fill your hand” and solve at least 5-10 systems. Therefore, at first, confusion, errors in calculations are possible, and there is nothing unusual or tragic in this.

Rainy autumn weather outside the window ... Therefore, for everyone, a more complex example for an independent solution:

Example 5

Solve the system of four linear equations with four unknowns by the Gauss method.

Such a task in practice is not so rare. I think that even a teapot who has thoroughly studied this page, the algorithm for solving such a system is intuitively clear. Basically, everything is the same - there are just more actions.

Cases when the system has no solutions (inconsistent) or has infinitely many solutions are considered in the lesson Incompatible systems and systems with common decision ... The considered algorithm of the Gauss method can also be fixed there.

Wish you success!

Solutions and Answers:

Example 2: Solution: Let us write down the extended matrix of the system and, using elementary transformations, bring it to a stepwise form.


Elementary transformations performed:
(1) The first line multiplied by –2 was added to the second line. The first line multiplied by -1 was added to the third line. Attention! Here it may be tempting to subtract the first from the third line, I highly discourage subtracting - the risk of an error is greatly increased. Just add up!
(2) The sign of the second line was changed (multiplied by –1). The second and third lines were swapped. note that on the "steps" we are satisfied with not only one, but also –1, which is even more convenient.
(3) The second row was added to the third row, multiplied by 5.
(4) The sign of the second line was changed (multiplied by –1). The third line was split by 14.

Reverse:

Answer: .

Example 4: Solution: Let us write down the extended matrix of the system and, using elementary transformations, bring it to a stepwise form:

Conversions performed:
(1) The second was added to the first line. Thus, the desired unit is organized on the upper left "rung".
(2) The first line multiplied by 7 was added to the second line. The first line multiplied by 6 was added to the third line.

The second step is getting worse, "Candidates" for it are the numbers 17 and 23, and we need either one or -1. Transformations (3) and (4) will be aimed at obtaining the desired unit

(3) The second line was added to the third line, multiplied by –1.
(4) The third line was added to the second line, multiplied by –3.
The necessary thing on the second step is received .
(5) The second line was added to the third line, multiplied by 6.

Within the lessons Gauss method and Incompatible systems / systems with a common solution we considered inhomogeneous systems of linear equations, where free member(which is usually on the right) at least one of the equations was nonzero.
And now, after a good warm-up with the rank of the matrix, we will continue to grind the technique elementary transformations on the homogeneous system of linear equations.
In the first paragraphs, the material may seem boring and ordinary, but this impression is deceiving. In addition to further development of technical techniques, there will be many new information so please try not to neglect the examples in this article.