Gaussian reverse method. Gaussian method (sequential elimination of unknowns)

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

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

Let us briefly describe the algorithm for eliminating unknown variables.

We will assume that , since we can always achieve this by rearranging the equations of the system. Eliminate the unknown variable x 1 from all equations of the system, starting from the second. To do this, to the second equation of the system we add the first, multiplied by , to the third equation we add the first, multiplied by , and so on, to nth to the equation we add the first one, multiplied by . The system of equations after such transformations will take the form

where and .

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

Next, we proceed in a similar way, but only with part of the resulting system, which is marked in the figure

To do this, to the third equation of the system we add the second, multiplied by , to the fourth equation we add the second, multiplied by , and so on, to nth to the equation we add the second one, multiplied by . The system of equations after such transformations will take the form

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

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

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

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


Example.

Solve system of linear equations Gauss method.

Since the beginning of the 16th-18th centuries, mathematicians have intensively begun to study functions, thanks to which so much in our lives has changed. Computer technology simply would not exist without this knowledge. Various concepts, theorems, and solution techniques have been created to solve complex problems, linear equations, and functions. One of such universal and rational methods and techniques for solving linear equations and their systems was the Gauss method. Matrices, their rank, determinant - everything can be calculated without using complex operations.

What is SLAU

In mathematics, there is the concept of SLAE - a system of linear algebraic equations. What is she like? This is a set of m equations with the required n unknown quantities, usually denoted as x, y, z, or x 1, x 2 ... x n, or other symbols. Solving a given system using the Gaussian method means finding all the unknown unknowns. If a system has the same number of unknowns and equations, then it is called an nth order system.

The most popular methods for solving SLAEs

In educational institutions of secondary education, various methods for solving such systems are studied. Most often these are simple equations consisting of two unknowns, so any existing method for finding the answer to them will not take much time. This can be like a substitution method, when another is derived from one equation and substituted into the original one. Or the method of term-by-term subtraction and addition. But the Gauss method is considered the easiest and most universal. It makes it possible to solve equations with any number of unknowns. Why is this particular technique considered rational? It's simple. The good thing about the matrix method is that it does not require rewriting unnecessary symbols several times as unknowns; it is enough to perform arithmetic operations on the coefficients - and you will get a reliable result.

Where are SLAEs used in practice?

The solution to SLAEs are the points of intersection of lines on the graphs of functions. In our high-tech computer age, people who are closely associated with the development of games and other programs need to know how to solve such systems, what they represent and how to check the correctness of the resulting result. Most often, programmers develop special linear algebra calculator programs, which also includes a system of linear equations. The Gauss method allows you to calculate all existing solutions. Other simplified formulas and techniques are also used.

SLAU compatibility criterion

Such a system can only be solved if it is compatible. For clarity, let us represent the SLAE in the form Ax=b. It has a solution if rang(A) equals rang(A,b). In this case, (A,b) is an extended form matrix that can be obtained from matrix A by rewriting it with free terms. It turns out that solving linear equations using the Gaussian method is quite easy.

Perhaps some of the symbols are not entirely clear, so it is necessary to consider everything with an example. Let's say there is a system: x+y=1; 2x-3y=6. It consists of only two equations, in which there are 2 unknowns. The system will have a solution only if the rank of its matrix is ​​equal to the rank of the extended matrix. What is rank? This is the number of independent lines of the system. In our case, the rank of the matrix is ​​2. Matrix A will consist of coefficients located near the unknowns, and the coefficients located behind the “=” sign also fit into the extended matrix.

Why can SLAEs be represented in matrix form?

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

Matrix transformations

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

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

Jordan-Gauss method

The essence of solving systems of linear homogeneous and inhomogeneous equations using the Gaussian method is to gradually eliminate the unknowns. Let's say we have a system of two equations in which there are two unknowns. To find them, you need to check the system for compatibility. The equation is solved very simply by the Gauss method. It is necessary to write down the coefficients located near each unknown in matrix form. To solve the system, you will need to write out the extended matrix. If one of the equations contains a smaller number of unknowns, then “0” must be put in place of the missing element. All known transformation methods are applied to the matrix: multiplication, division by a number, adding the corresponding elements of the series to each other, and others. It turns out that in each row it is necessary to leave one variable with the value “1”, the rest should be reduced to zero. For a more precise understanding, it is necessary to consider the Gauss method with examples.

A simple example of solving a 2x2 system

To begin with, let's take a simple system of algebraic equations, in which there will be 2 unknowns.

Let's rewrite it into an extended matrix.

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

  1. The first action when solving an extended matrix will be this: the first row must be multiplied by -7 and added corresponding elements to the second row in order to get rid of one unknown in the second equation.
  2. Since solving equations using the Gauss method involves reducing the matrix to canonical form, then it is necessary to perform the same operations with the first equation and remove the second variable. To do this, we subtract the second line from the first and get the required answer - the solution of the SLAE. Or, as shown in the figure, we multiply the second row by a factor of -1 and add the elements of the second row to the first row. It is the same.

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

An example of a 3x3 SLAE solution

Suppose we have a more complex system of linear equations. The Gauss method makes it possible to calculate the answer even for the most seemingly confusing system. Therefore, in order to delve deeper into the calculation methodology, you can move on to a more complex example with three unknowns.

As in the previous example, we rewrite the system in the form of an extended matrix and begin to bring it to its canonical form.

To solve this system, you will need to perform much more actions than in the previous example.

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

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

An example of solving a 4x4 system of equations

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

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

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

And all the necessary arithmetic operations are performed to bring the extended matrix to its canonical form. It is necessary to understand that the answer to a system of equations is not always integers. Sometimes the solution may be from fractional numbers.

Checking the correctness of the solution

The Jordan-Gauss method provides for checking the correctness of the result. In order to find out whether the coefficients are calculated correctly, you just need to substitute the result into the original system of equations. The left side of the equation must match the right side behind the equal sign. If the answers do not match, then you need to recalculate the system or try to apply to it another method of solving SLAEs known to you, such as substitution or term-by-term subtraction and addition. After all, mathematics is a science that has a huge number of different solution methods. But remember: the result should always be the same, no matter what solution method you used.

Gauss method: the most common errors when solving SLAEs

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

Another major mistake may be incorrectly writing out the final result. It is necessary to clearly understand that the first coefficient will correspond to the first unknown from the system, the second - to the second, and so on.

The Gauss method describes in detail the solution of linear equations. Thanks to it, it is easy to carry out the necessary operations and find the right result. In addition, this is a universal tool for finding a reliable answer to equations of any complexity. Maybe that's why it is so often used when solving SLAEs.

Definition and description of the Gaussian method

The Gaussian transformation method (also known as the method of sequential elimination of unknown variables from an equation or matrix) for solving systems of linear equations is a classical method for solving systems of algebraic equations (SLAE). This classical method is also used to solve problems such as obtaining inverse matrices and determining the rank of a matrix.

Transformation using the Gaussian method consists of making small (elementary) sequential changes to a system of linear algebraic equations, leading to the elimination of variables from it from top to bottom with the formation of a new triangular system of equations that is equivalent to the original one.

Definition 1

This part of the solution is called the forward Gaussian solution, since the entire process is carried out from top to bottom.

After reducing the original system of equations to a triangular one, all variables of the system are found from bottom to top (that is, the first variables found are located precisely on the last lines of the system or matrix). This part of the solution is also known as the inverse of the Gaussian solution. His algorithm is as follows: first, the variables closest to the bottom of the system of equations or matrix are calculated, then the resulting values ​​are substituted higher and thus another variable is found, and so on.

Description of the Gaussian method algorithm

The sequence of actions for the general solution of a system of equations using the Gaussian method consists in alternately applying the forward and backward strokes to the matrix based on the SLAE. Let the initial system of equations have the following form:

$\begin(cases) a_(11) \cdot x_1 +...+ a_(1n) \cdot x_n = b_1 \\ ... \\ a_(m1) \cdot x_1 + a_(mn) \cdot x_n = b_m \end(cases)$

To solve SLAEs using the Gaussian method, it is necessary to write the original system of equations in the form of a matrix:

$A = \begin(pmatrix) a_(11) & … & a_(1n) \\ \vdots & … & \vdots \\ a_(m1) & … & a_(mn) \end(pmatrix)$, $b =\begin(pmatrix) b_1 \\ \vdots \\ b_m \end(pmatrix)$

The matrix $A$ is called the main matrix and represents the coefficients of the variables written in order, and $b$ is called the column of its free terms. The matrix $A$, written through a bar with a column of free terms, is called an extended matrix:

$A = \begin(array)(ccc|c) a_(11) & … & a_(1n) & b_1 \\ \vdots & … & \vdots & ...\\ a_(m1) & … & a_( mn) & b_m \end(array)$

Now it is necessary, using elementary transformations on the system of equations (or on the matrix, since this is more convenient), to bring it to the following form:

$\begin(cases) α_(1j_(1)) \cdot x_(j_(1)) + α_(1j_(2)) \cdot x_(j_(2))...+ α_(1j_(r)) \cdot x_(j_(r)) +... α_(1j_(n)) \cdot x_(j_(n)) = β_1 \\ α_(2j_(2)) \cdot x_(j_(2)). ..+ α_(2j_(r)) \cdot x_(j_(r)) +... α_(2j_(n)) \cdot x_(j_(n)) = β_2 \\ ...\\ α_( rj_(r)) \cdot x_(j_(r)) +... α_(rj_(n)) \cdot x_(j_(n)) = β_r \\ 0 = β_(r+1) \\ … \ \ 0 = β_m \end(cases)$ (1)

The matrix obtained from the coefficients of the transformed system of equation (1) is called a step matrix; this is what step matrices usually look like:

$A = \begin(array)(ccc|c) a_(11) & a_(12) & a_(13) & b_1 \\ 0 & a_(22) & a_(23) & b_2\\ 0 & 0 & a_(33) & b_3 \end(array)$

These matrices are characterized by the following set of properties:

  1. All its zero lines come after non-zero lines
  2. If some row of a matrix with number $k$ is non-zero, then the previous row of the same matrix has fewer zeros than this one with number $k$.

After obtaining the step matrix, it is necessary to substitute the resulting variables into the remaining equations (starting from the end) and obtain the remaining values ​​of the variables.

Basic rules and permitted transformations when using the Gauss method

When simplifying a matrix or system of equations using this method, you need to use only elementary transformations.

Such transformations are considered to be operations that can be applied to a matrix or system of equations without changing its meaning:

  • rearrangement of several lines,
  • adding or subtracting from one row of a matrix another row from it,
  • multiplying or dividing a string by a constant not equal to zero,
  • a line consisting of only zeros, obtained in the process of calculating and simplifying the system, must be deleted,
  • You also need to remove unnecessary proportional lines, choosing for the system the only one with coefficients that are more suitable and convenient for further calculations.

All elementary transformations are reversible.

Analysis of the three main cases that arise when solving linear equations using the method of simple Gaussian transformations

There are three cases that arise when using the Gaussian method to solve systems:

  1. When a system is inconsistent, that is, it does not have any solutions
  2. The system of equations has a solution, and a unique one, and the number of non-zero rows and columns in the matrix is ​​equal to each other.
  3. The system has a certain number or set of possible solutions, and the number of rows in it is less than the number of columns.

Outcome of a solution with an inconsistent system

For this option, when solving a matrix equation using the Gaussian method, it is typical to obtain some line with the impossibility of fulfilling the equality. Therefore, if at least one incorrect equality occurs, the resulting and original systems do not have solutions, regardless of the other equations they contain. An example of an inconsistent matrix:

$\begin(array)(ccc|c) 2 & -1 & 3 & 0 \\ 1 & 0 & 2 & 0\\ 0 & 0 & 0 & 1 \end(array)$

In the last line an impossible equality arose: $0 \cdot x_(31) + 0 \cdot x_(32) + 0 \cdot x_(33) = 1$.

A system of equations that has only one solution

These systems, after being reduced to a step matrix and removing rows with zeros, have the same number of rows and columns in the main matrix. Here is the simplest example of such a system:

$\begin(cases) x_1 - x_2 = -5 \\ 2 \cdot x_1 + x_2 = -7 \end(cases)$

Let's write it in the form of a matrix:

$\begin(array)(cc|c) 1 & -1 & -5 \\ 2 & 1 & -7 \end(array)$

To bring the first cell of the second row to zero, we multiply the top row by $-2$ and subtract it from the bottom row of the matrix, and leave the top row in its original form, as a result we have the following:

$\begin(array)(cc|c) 1 & -1 & -5 \\ 0 & 3 & 10 \end(array)$

This example can be written as a system:

$\begin(cases) x_1 - x_2 = -5 \\ 3 \cdot x_2 = 10 \end(cases)$

The lower equation yields the following value for $x$: $x_2 = 3 \frac(1)(3)$. Substitute this value into the upper equation: $x_1 – 3 \frac(1)(3)$, we get $x_1 = 1 \frac(2)(3)$.

A system with many possible solutions

This system is characterized by a smaller number of significant rows than the number of columns in it (the rows of the main matrix are taken into account).

Variables in such a system are divided into two types: basic and free. When transforming such a system, the main variables contained in it must be left in the left area up to the “=” sign, and the remaining variables must be moved to the right side of the equality.

Such a system has only a certain general solution.

Let us analyze the following system of equations:

$\begin(cases) 2y_1 + 3y_2 + x_4 = 1 \\ 5y_3 - 4y_4 = 1 \end(cases)$

Let's write it in the form of a matrix:

$\begin(array)(cccc|c) 2 & 3 & 0 & 1 & 1 \\ 0 & 0 & 5 & 4 & 1 \\ \end(array)$

Our task is to find a general solution to the system. For this matrix, the basis variables will be $y_1$ and $y_3$ (for $y_1$ - since it comes first, and in the case of $y_3$ - it is located after the zeros).

As basis variables, we choose exactly those that are the first in the row and are not equal to zero.

The remaining variables are called free; we need to express the basic ones through them.

Using the so-called reverse stroke, we analyze the system from bottom to top; to do this, we first express $y_3$ from the bottom line of the system:

$5y_3 – 4y_4 = 1$

$5y_3 = 4y_4 + 1$

$y_3 = \frac(4/5)y_4 + \frac(1)(5)$.

Now we substitute the expressed $y_3$ into the upper equation of the system $2y_1 + 3y_2 + y_4 = 1$: $2y_1 + 3y_2 - (\frac(4)(5)y_4 + \frac(1)(5)) + y_4 = 1$

We express $y_1$ in terms of free variables $y_2$ and $y_4$:

$2y_1 + 3y_2 - \frac(4)(5)y_4 - \frac(1)(5) + y_4 = 1$

$2y_1 = 1 – 3y_2 + \frac(4)(5)y_4 + \frac(1)(5) – y_4$

$2y_1 = -3y_2 - \frac(1)(5)y_4 + \frac(6)(5)$

$y_1 = -1.5x_2 – 0.1y_4 + 0.6$

The solution is ready.

Example 1

Solve slough using the Gaussian method. Examples. An example of solving a system of linear equations given by a 3 by 3 matrix using the Gaussian method

$\begin(cases) 4x_1 + 2x_2 – x_3 = 1 \\ 5x_1 + 3x_2 - 2x^3 = 2\\ 3x_1 + 2x_2 – 3x_3 = 0 \end(cases)$

Let's write our system in the form of an extended matrix:

$\begin(array)(ccc|c) 4 & 2 & -1 & 1 \\ 5 & 3 & -2 & 2 \\ 3 & 2 & -3 & 0\\ \end(array)$

Now, for convenience and practicality, you need to transform the matrix so that $1$ is in the upper corner of the outermost column.

To do this, to the 1st line you need to add the line from the middle, multiplied by $-1$, and write the middle line itself as it is, it turns out:

$\begin(array)(ccc|c) -1 & -1 & 1 & -1 \\ 5 & 3 & -2 & 2 \\ 3 & 2 & -3 & 0\\ \end(array)$

$\begin(array)(ccc|c) -1 & -1 & 1 & -1 \\ 0 & -2 & 3 & -3 \\ 0 & -1 & 0 & -3\\ \end(array) $

Multiply the top and last lines by $-1$, and also swap the last and middle lines:

$\begin(array)(ccc|c) 1 & 1 & -1 & 1 \\ 0 & 1 & 0 & 3 \\ 0 & -2 & 3 & -3\\ \end(array)$

$\begin(array)(ccc|c) 1 & 1 & -1 & 1 \\ 0 & 1 & 0 & 3 \\ 0 & 0 & 3 & 3\\ \end(array)$

And divide the last line by $3$:

$\begin(array)(ccc|c) 1 & 1 & -1 & 1 \\ 0 & 1 & 0 & 3 \\ 0 & 0 & 1 & 1\\ \end(array)$

We obtain the following system of equations, equivalent to the original one:

$\begin(cases) x_1 + x_2 – x_3 = 1\\ x_2 = 3 \\ x_3 = 1 \end(cases)$

From the upper equation we express $x_1$:

$x1 = 1 + x_3 – x_2 = 1 + 1 – 3 = -1$.

Example 2

An example of solving a system defined using a 4 by 4 matrix using the Gaussian method

$\begin(array)(cccc|c) 2 & 5 & 4 & 1 & 20 \\ 1 & 3 & 2 & 1 & 11 \\ 2 & 10 & 9 & 7 & 40\\ 3 & 8 & 9 & 2 & 37 \\ \end(array)$.

At the beginning, we swap the top lines following it to get $1$ in the upper left corner:

$\begin(array)(cccc|c) 1 & 3 & 2 & 1 & 11 \\ 2 & 5 & 4 & 1 & 20 \\ 2 & 10 & 9 & 7 & 40\\ 3 & 8 & 9 & 2 & 37 \\ \end(array)$.

Now multiply the top line by $-2$ and add to the 2nd and 3rd. To the 4th we add the 1st line, multiplied by $-3$:

$\begin(array)(cccc|c) 1 & 3 & 2 & 1 & 11 \\ 0 & -1 & 0 & -1 & -2 \\ 0 & 4 & 5 & 5 & 18\\ 0 & - 1 & 3 & -1 & 4 \\ \end(array)$

Now to line number 3 we add line 2 multiplied by $4$, and to line 4 we add line 2 multiplied by $-1$.

$\begin(array)(cccc|c) 1 & 3 & 2 & 1 & 11 \\ 0 & -1 & 0 & -1 & -2 \\ 0 & 0 & 5 & 1 & 10\\ 0 & 0 & 3 & 0 & 6 \\ \end(array)$

We multiply line 2 by $-1$, and divide line 4 by $3$ and replace line 3.

$\begin(array)(cccc|c) 1 & 3 & 2 & 1 & 11 \\ 0 & 1 & 0 & 1 & 2 \\ 0 & 0 & 1 & 0 & 2\\ 0 & 0 & 5 & 1 & 10 \\ \end(array)$

Now we add to the last line the penultimate one, multiplied by $-5$.

$\begin(array)(cccc|c) 1 & 3 & 2 & 1 & 11 \\ 0 & 1 & 0 & 1 & 2 \\ 0 & 0 & 1 & 0 & 2\\ 0 & 0 & 0 & 1 & 0 \\ \end(array)$

We solve the resulting system of equations:

$\begin(cases) m = 0 \\ g = 2\\ y + m = 2\ \ x + 3y + 2g + m = 11\end(cases)$

1. System of linear algebraic equations

1.1 The concept of a system of linear algebraic equations

A system of equations is a condition consisting of simultaneous execution of several equations with respect to several variables. A system of linear algebraic equations (hereinafter referred to as SLAE) containing m equations and n unknowns is called a system of the form:

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

– column vector of unknowns xj.
is a column vector of free terms bi.

The product of matrices A*X is defined, since there are as many columns in matrix A as there are rows in matrix X (n pieces).

The extended matrix of a system is the matrix A of the system, supplemented by a column of free terms

1.2 Solving a system of linear algebraic equations

The solution to a system of equations is an ordered set of numbers (values ​​of variables), when substituting them instead of variables, each of the equations of the system turns into a true equality.

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

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

A consistent system is said to be determinate if it has a single solution, and indefinite if it has more than one solution. In the latter case, each of its solutions is called a particular solution of the system. The set of all particular solutions is called the general solution.

Solving a system means finding out whether it is compatible or inconsistent. If the system is consistent, find its general solution.

Two systems are called equivalent (equivalent) if they have the same general solution. In other words, systems are equivalent if every solution of one of them is a solution of the other, and vice versa.

A transformation, the application of which turns a system into a new system equivalent to the original one, is called an equivalent or equivalent transformation. Examples of equivalent transformations include the following transformations: interchanging two equations of a system, interchanging two unknowns along with the coefficients of all equations, multiplying both sides of any equation of a system by a nonzero number.

A system of linear equations is called homogeneous if all free terms are equal to zero:

A homogeneous system is always consistent, since x1=x2=x3=…=xn=0 is a solution of the system. This solution is called zero or trivial.

2. Gaussian elimination method

2.1 The essence of the Gaussian elimination method

The classical method for solving systems of linear algebraic equations is the method of sequential elimination of unknowns - Gaussian method(it is also called the Gaussian elimination method). This is a method of sequential elimination of variables, when, using elementary transformations, a system of equations is reduced to an equivalent system of a step (or triangular) form, from which all other variables are found sequentially, starting with the last (by number) variables.

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

1. Direct stroke.

At the first stage, the so-called direct move is carried out, when, through elementary transformations over the rows, the system is brought to a stepped or triangular shape, or it is established that the system is incompatible. Namely, among the elements of the first column of the matrix, select a non-zero one, move it to the uppermost position by rearranging the rows, and subtract the resulting first row from the remaining rows after the rearrangement, multiplying it by a value equal to the ratio of the first element of each of these rows to the first element of the first row, zeroing thus the column below it.

After these transformations have been completed, the first row and first column are mentally crossed out and continued until a zero-size matrix remains. If at any iteration there is no non-zero element among the elements of the first column, then go to the next column and perform a similar operation.

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

The system below has a stepwise form:

,

Coefficients aii are called the main (leading) elements of the system.

(if a11=0, rearrange the rows of the matrix so that a 11 was not equal to 0. This is always possible, because otherwise the matrix contains a zero column, its determinant is equal to zero and the system is inconsistent).

Let's transform the system by eliminating the unknown x1 in all equations except the first (using elementary transformations of the system). To do this, multiply both sides of the first equation by

and add term by term with the second equation of the system (or from the second equation subtract term by term by the first, multiplied by ). Then we multiply both sides of the first equation by and add them to the third equation of the system (or from the third we subtract the first one multiplied by ). Thus, we sequentially multiply the first line by a number and add to i th line, for i= 2, 3, …,n.

Continuing this process, we obtain an equivalent system:


– new values ​​of coefficients for unknowns and free terms in the last m-1 equations of the system, which are determined by the formulas:

Thus, at the first step, all coefficients lying under the first leading element a 11 are destroyed

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

If, in the process of reducing the system to a stepwise form, zero equations appear, i.e. equalities of the form 0=0, they are discarded. If an equation of the form appears

then this indicates the incompatibility of the system.

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

2. Reverse stroke.

At the second stage, the so-called reverse move is carried out, the essence of which is to express all the resulting basic variables in terms of non-basic ones and build a fundamental system of solutions, or, if all the variables are basic, then express numerically the only solution to the system of linear equations.

This procedure begins with the last equation, from which the corresponding basic variable is expressed (there is only one in it) and substituted into the previous equations, and so on, going up the “steps”.

Each line corresponds to exactly one basis variable, so at every step except the last (topmost), the situation exactly repeats the case of the last line.

Note: in practice, it is more convenient to work not with the system, but with its extended matrix, performing all the elementary transformations on its rows. It is convenient for the coefficient a11 to be equal to 1 (rearrange the equations, or divide both sides of the equation by a11).

2.2 Examples of solving SLAEs using the Gaussian method

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

Example 1. Solve a 3rd order SLAE.

Let's reset the coefficients at

in the second and third lines. To do this, multiply them by 2/3 and 1, respectively, and add them to the first line:

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

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

About the method

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

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

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

CATEGORIES

POPULAR ARTICLES

2023 “kingad.ru” - ultrasound examination of human organs