Home Gums Methods for solving systems of equations using matrices. How to solve a system of equations using the matrix method

Methods for solving systems of equations using matrices. How to solve a system of equations using the matrix method

Equations in general, linear algebraic equations and their systems, as well as methods for solving them, occupy a special place in mathematics, both theoretical and applied.

This is due to the fact that the vast majority of physical, economic, technical and even pedagogical problems can be described and solved using a variety of equations and their systems. IN Lately has gained particular popularity among researchers, scientists and practitioners math modeling in almost all subject areas, which is explained by its obvious advantages over other known and proven methods for studying objects of various natures, in particular, the so-called complex systems. There is a great variety of different definitions of the mathematical model given by scientists in different times, but in our opinion, the most successful one is the following statement. Mathematical model- this is an idea, expressed by the equation. Thus, the ability to compose and solve equations and their systems is an integral characteristic of a modern specialist.

To solve systems of linear algebraic equations The most commonly used methods are Cramer, Jordan-Gauss and the matrix method.

Matrix solution method is a method for solving systems of linear algebraic equations with a nonzero determinant using an inverse matrix.

If we write out the coefficients for the unknown quantities xi in matrix A, collect the unknown quantities in the vector column X, and the free terms in the vector column B, then the system of linear algebraic equations can be written in the form of the following matrix equation A · X = B, which has a unique solution only when the determinant of matrix A is not equal to zero. In this case, the solution to the system of equations can be found in the following way X = A-1 · B, Where A -1 - inverse matrix.

The matrix solution method is as follows.

Let the system be given linear equations With n unknown:

It can be rewritten in matrix form: AX = B, Where A- the main matrix of the system, B And X- columns of free terms and solutions of the system, respectively:

Let's multiply this matrix equation left on A-1 - matrix inverse of matrix A: A -1 (AX) = A -1 B

Because A -1 A = E, we get X= A -1 B. Right part of this equation will give a column of solutions to the original system. Condition of applicability this method(as well as the existence of a solution in general homogeneous system linear equations with the number of equations equal to the number of unknowns) is the non-degeneracy of the matrix A. Necessary and sufficient condition This means that the determinant of the matrix is ​​not equal to zero A:det A≠ 0.

For a homogeneous system of linear equations, that is, when the vector B = 0 , indeed the opposite rule: the system AX = 0 has a non-trivial (that is, non-zero) solution only if det A= 0. Such a connection between solutions of homogeneous and inhomogeneous systems of linear equations is called the Fredholm alternative.

Example solutions to an inhomogeneous system of linear algebraic equations.

Let us make sure that the determinant of the matrix, composed of the coefficients of the unknowns of the system of linear algebraic equations, is not equal to zero.

The next step is to calculate algebraic additions for elements of a matrix consisting of coefficients of unknowns. They will be needed to find the inverse matrix.

(sometimes this method is also called matrix method or the inverse matrix method) requires preliminary familiarization with such a concept as the matrix form of notation of SLAE. The inverse matrix method is intended for solving those systems of linear algebraic equations in which the determinant of the system matrix is ​​different from zero. Naturally, this assumes that the matrix of the system is square (the concept of a determinant exists only for square matrices). The essence of the inverse matrix method can be expressed in three points:

  1. Write down three matrices: the system matrix $A$, the matrix of unknowns $X$, the matrix of free terms $B$.
  2. Find the inverse matrix $A^(-1)$.
  3. Using the equality $X=A^(-1)\cdot B$, obtain a solution to the given SLAE.

Any SLAE can be written in matrix form as $A\cdot X=B$, where $A$ is the matrix of the system, $B$ is the matrix of free terms, $X$ is the matrix of unknowns. Let the matrix $A^(-1)$ exist. Let's multiply both sides of the equality $A\cdot X=B$ by the matrix $A^(-1)$ on the left:

$$A^(-1)\cdot A\cdot X=A^(-1)\cdot B.$$

Since $A^(-1)\cdot A=E$ ($E$ is the identity matrix), the equality written above becomes:

$$E\cdot X=A^(-1)\cdot B.$$

Since $E\cdot X=X$, then:

$$X=A^(-1)\cdot B.$$

Example No. 1

Solve the SLAE $ \left \( \begin(aligned) & -5x_1+7x_2=29;\\ & 9x_1+8x_2=-11. \end(aligned) \right.$ using the inverse matrix.

$$ A=\left(\begin(array) (cc) -5 & 7\\ 9 & 8 \end(array)\right);\; B=\left(\begin(array) (c) 29\\ -11 \end(array)\right);\; X=\left(\begin(array) (c) x_1\\ x_2 \end(array)\right). $$

Let's find the inverse matrix to the system matrix, i.e. Let's calculate $A^(-1)$. In example No. 2

$$ A^(-1)=-\frac(1)(103)\cdot\left(\begin(array)(cc) 8 & -7\\ -9 & -5\end(array)\right) . $$

Now let's substitute all three matrices ($X$, $A^(-1)$, $B$) into the equality $X=A^(-1)\cdot B$. Then we perform matrix multiplication

$$ \left(\begin(array) (c) x_1\\ x_2 \end(array)\right)= -\frac(1)(103)\cdot\left(\begin(array)(cc) 8 & -7\\ -9 & -5\end(array)\right)\cdot \left(\begin(array) (c) 29\\ -11 \end(array)\right)=\\ =-\frac (1)(103)\cdot \left(\begin(array) (c) 8\cdot 29+(-7)\cdot (-11)\\ -9\cdot 29+(-5)\cdot (- 11) \end(array)\right)= -\frac(1)(103)\cdot \left(\begin(array) (c) 309\\ -206 \end(array)\right)=\left( \begin(array) (c) -3\\ 2\end(array)\right). $$

So, we got the equality $\left(\begin(array) (c) x_1\\ x_2 \end(array)\right)=\left(\begin(array) (c) -3\\ 2\end(array )\right)$. From this equality we have: $x_1=-3$, $x_2=2$.

Answer: $x_1=-3$, $x_2=2$.

Example No. 2

Solve SLAE $ \left\(\begin(aligned) & x_1+7x_2+3x_3=-1;\\ & -4x_1+9x_2+4x_3=0;\\ & 3x_2+2x_3=6. \end(aligned)\right .$ using the inverse matrix method.

Let us write down the matrix of the system $A$, the matrix of free terms $B$ and the matrix of unknowns $X$.

$$ A=\left(\begin(array) (ccc) 1 & 7 & 3\\ -4 & 9 & 4 \\0 & 3 & 2\end(array)\right);\; B=\left(\begin(array) (c) -1\\0\\6\end(array)\right);\; X=\left(\begin(array) (c) x_1\\ x_2 \\ x_3 \end(array)\right). $$

Now it’s the turn to find the inverse matrix to the system matrix, i.e. find $A^(-1)$. In example No. 3 on the page dedicated to finding inverse matrices, the inverse matrix has already been found. Let's use the finished result and write $A^(-1)$:

$$ A^(-1)=\frac(1)(26)\cdot \left(\begin(array) (ccc) 6 & -5 & 1 \\ 8 & 2 & -16 \\ -12 & - 3 & 37\end(array)\right). $$

Now let's substitute all three matrices ($X$, $A^(-1)$, $B$) into the equality $X=A^(-1)\cdot B$, and then perform matrix multiplication on the right side of this equality.

$$ \left(\begin(array) (c) x_1\\ x_2 \\ x_3 \end(array)\right)= \frac(1)(26)\cdot \left(\begin(array) (ccc) 6 & -5 & 1 \\ 8 & 2 & -16 \\ -12 & -3 & 37\end(array) \right)\cdot \left(\begin(array) (c) -1\\0\ \6\end(array)\right)=\\ =\frac(1)(26)\cdot \left(\begin(array) (c) 6\cdot(-1)+(-5)\cdot 0 +1\cdot 6 \\ 8\cdot (-1)+2\cdot 0+(-16)\cdot 6 \\ -12\cdot (-1)+(-3)\cdot 0+37\cdot 6 \end(array)\right)=\frac(1)(26)\cdot \left(\begin(array) (c) 0\\-104\\234\end(array)\right)=\left( \begin(array) (c) 0\\-4\\9\end(array)\right) $$

So, we got the equality $\left(\begin(array) (c) x_1\\ x_2 \\ x_3 \end(array)\right)=\left(\begin(array) (c) 0\\-4\ \9\end(array)\right)$. From this equality we have: $x_1=0$, $x_2=-4$, $x_3=9$.

Let's consider system of linear algebraic equations(SLAU) relatively n unknown x 1 , x 2 , ..., x n :

This system in a “collapsed” form can be written as follows:

S n i=1 a ij x j = b i , i=1,2, ..., n.

In accordance with the matrix multiplication rule, the considered system of linear equations can be written in matrix form Ax=b, Where

, ,.

Matrix A, the columns of which are the coefficients for the corresponding unknowns, and the rows are the coefficients for the unknowns in the corresponding equation is called matrix of the system. Column matrix b, the elements of which are the right-hand sides of the equations of the system, is called the right-hand side matrix or simply right side of the system. Column matrix x , whose elements are the unknown unknowns, is called system solution.

A system of linear algebraic equations written in the form Ax=b, is matrix equation.

If the system matrix non-degenerate, then it has an inverse matrix and then the solution to the system is Ax=b is given by the formula:

x=A -1 b.

Example Solve the system matrix method.

Solution let's find the inverse matrix for the coefficient matrix of the system

Let's calculate the determinant by expanding along the first line:

Because the Δ ≠ 0 , That A -1 exists.

The inverse matrix was found correctly.

Let's find a solution to the system

Hence, x 1 = 1, x 2 = 2, x 3 = 3 .

Examination:

7. The Kronecker-Capelli theorem on the compatibility of a system of linear algebraic equations.

System of linear equations has the form:

a 21 x 1 + a 22 x 2 +... + a 2n x n = b 2, (5.1)

a m1 x 1 + a m1 x 2 +... + a mn x n = b m.

Here a i j and b i (i = ; j = ) are given, and x j are unknown real numbers. Using the concept of product of matrices, we can rewrite system (5.1) in the form:

where A = (a i j) is a matrix consisting of coefficients for the unknowns of system (5.1), which is called matrix of the system, X = (x 1 , x 2 ,..., x n) T , B = (b 1 , b 2 ,..., b m) T are column vectors composed respectively of unknowns x j and free terms b i .

Ordered collection n real numbers (c 1, c 2,..., c n) is called system solution(5.1), if as a result of substituting these numbers instead of the corresponding variables x 1, x 2,..., x n, each equation of the system turns into an arithmetic identity; in other words, if there is a vector C= (c 1 , c 2 ,..., c n) T such that AC  B.

System (5.1) is called joint, or solvable, if it has at least one solution. The system is called incompatible, or unsolvable, if it has no solutions.

,

formed by assigning a column of free terms to the matrix A on the right is called extended matrix of the system.

The question of compatibility of system (5.1) is solved by the following theorem.

Kronecker-Capelli theorem . A system of linear equations is consistent if and only if the ranks of matrices A andA coincide, i.e. r(A) = r(A) = r.

For the set M of solutions of system (5.1) there are three possibilities:

1) M =  (in this case the system is inconsistent);

2) M consists of one element, i.e. the system has a unique solution (in this case the system is called certain);

3) M consists of more than one element (then the system is called uncertain). In the third case, system (5.1) has an infinite number of solutions.

The system has a unique solution only if r(A) = n. In this case, the number of equations is not less than the number of unknowns (mn); if m>n, then m-n equations are consequences of the others. If 0

To solve an arbitrary system of linear equations, you need to be able to solve systems in which the number of equations is equal to the number of unknowns - the so-called Cramer type systems:

a 11 x 1 + a 12 x 2 +... + a 1n x n = b 1,

a 21 x 1 + a 22 x 2 +... + a 2n x n = b 2, (5.3)

... ... ... ... ... ...

a n1 x 1 + a n1 x 2 +... + a nn x n = b n .

Systems (5.3) are solved in one of the following ways: 1) the Gauss method, or the method of eliminating unknowns; 2) according to Cramer's formulas; 3) matrix method.

Example 2.12. Explore the system of equations and solve it if it is consistent:

5x 1 - x 2 + 2x 3 + x 4 = 7,

2x 1 + x 2 + 4x 3 - 2x 4 = 1,

x 1 - 3x 2 - 6x 3 + 5x 4 = 0.

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

.

Let's calculate the rank of the main matrix of the system. It is obvious that, for example, the second-order minor in the upper left corner = 7  0; the third-order minors containing it are equal to zero:

Consequently, the rank of the main matrix of the system is 2, i.e. r(A) = 2. To calculate the rank of the extended matrix A, consider the bordering minor

this means that the rank of the extended matrix r(A) = 3. Since r(A)  r(A), the system is inconsistent.

Topic 2. SYSTEMS OF LINEAR ALGEBRAIC EQUATIONS.

Basic concepts.

Definition 1. System m linear equations with n unknowns is a system of the form:

where and are numbers.

Definition 2. A solution to system (I) is a set of unknowns in which each equation of this system becomes an identity.

Definition 3. System (I) is called joint, if it has at least one solution and non-joint, if it has no solutions. The joint system is called certain, if it has a unique solution, and uncertain otherwise.

Definition 4. Equation of the form

called zero, and the equation is of the form

called incompatible. Obviously, a system of equations containing an incompatible equation is inconsistent.

Definition 5. Two systems of linear equations are called equivalent, if every solution of one system serves as a solution to another and, conversely, every solution of the second system is a solution to the first.

Matrix representation of a system of linear equations.

Let us consider system (I) (see §1).

Let's denote:

Coefficient matrix for unknowns

Matrix - column of free terms

Matrix – column of unknowns

.

Definition 1. The matrix is ​​called main matrix of the system(I), and the matrix is ​​the extended matrix of system (I).

By the definition of equality of matrices, system (I) corresponds to the matrix equality:

.

The right side of this equality by definition of the product of matrices ( see definition 3 § 5 chapter 1) can be factorized:

, i.e.

Equality (2) called matrix notation of system (I).

Solving a system of linear equations using Cramer's method.

Let in system (I) (see §1) m=n, i.e. the number of equations is equal to the number of unknowns, and the main matrix of the system is non-singular, i.e. . Then system (I) from §1 has a unique solution

where Δ = det A called main determinant of the system(I), Δ i is obtained from the determinant Δ by replacing i th column to a column of free members of the system (I).

Example: Solve the system using Cramer's method:

.

By formulas (3) .

We calculate the determinants of the system:

,

,

.

To obtain the determinant, we replaced the first column in the determinant with a column of free terms; replacing the 2nd column in the determinant with a column of free terms, we get ; in a similar way, replacing the 3rd column in the determinant with a column of free terms, we get . System solution:

Solving systems of linear equations using an inverse matrix.

Let in system (I) (see §1) m=n and the main matrix of the system is non-singular. Let us write system (I) in matrix form ( see §2):

because matrix A non-singular, then it has an inverse matrix ( see Theorem 1 §6 of Chapter 1). Let's multiply both sides of the equality (2) to the matrix, then

By definition of an inverse matrix. From equality (3) we have

Solve the system using the inverse matrix

.

Let's denote

In example (§ 3) we calculated the determinant, therefore, the matrix A has an inverse matrix. Then in effect (4) , i.e.

. (5)

Let's find the matrix ( see §6 chapter 1)

, , ,

, , ,

,

.

Gauss method.

Let a system of linear equations be given:

. (I)

It is required to find all solutions of system (I) or make sure that the system is inconsistent.

Definition 1.Let us call the elementary transformation of the system(I) any of three actions:

1) crossing out the zero equation;

2) adding to both sides of the equation the corresponding parts of another equation, multiplied by the number l;

3) swapping terms in the equations of the system so that unknowns with the same numbers in all equations occupy the same places, i.e. if, for example, in the 1st equation we changed the 2nd and 3rd terms, then the same must be done in all equations of the system.

The Gauss method consists in the fact that system (I) with the help of elementary transformations is reduced to an equivalent system, the solution of which is found directly or its unsolvability is established.

As described in §2, system (I) is uniquely determined by its extended matrix and any elementary transformation of system (I) corresponds to an elementary transformation of the extended matrix:

.

Transformation 1) corresponds to deleting the zero row in the matrix, transformation 2) is equivalent to adding another row to the corresponding row of the matrix, multiplied by the number l, transformation 3) is equivalent to rearranging the columns in the matrix.

It is easy to see that, on the contrary, each elementary transformation of the matrix corresponds to an elementary transformation of the system (I). Due to the above, instead of operations with system (I), we will work with the extended matrix of this system.

In the matrix, the 1st column consists of coefficients for x 1, 2nd column - from the coefficients for x 2 etc. If the columns are rearranged, it should be taken into account that this condition is violated. For example, if we swap the 1st and 2nd columns, then now the 1st column will contain the coefficients for x 2, and in the 2nd column - the coefficients for x 1.

We will solve system (I) using the Gaussian method.

1. Cross out all zero rows in the matrix, if any (i.e., cross out all zero equations in system (I).

2. Let's check whether among the rows of the matrix there is a row in which all elements except the last one are equal to zero (let's call such a row inconsistent). Obviously, such a line corresponds to an inconsistent equation in system (I), therefore, system (I) has no solutions and this is where the process ends.

3. Let the matrix not contain inconsistent rows (system (I) does not contain inconsistent equations). If a 11 =0, then we find in the 1st row some element (except for the last one) other than zero and rearrange the columns so that in the 1st row there is no zero in the 1st place. We will now assume that (i.e., we will swap the corresponding terms in the equations of system (I)).

4. Multiply the 1st line by and add the result with the 2nd line, then multiply the 1st line by and add the result with the 3rd line, etc. Obviously, this process is equivalent to eliminating the unknown x 1 from all equations of system (I), except the 1st. In the new matrix we get zeros in the 1st column under the element a 11:

.

5. Let’s cross out all zero rows in the matrix, if there are any, and check if there is an inconsistent row (if there is one, then the system is inconsistent and the solution ends there). Let's check if there will be a 22 / =0, if yes, then we find in the 2nd row an element other than zero and rearrange the columns so that . Next, multiply the elements of the 2nd row by and add with the corresponding elements of the 3rd line, then - the elements of the 2nd line and add with the corresponding elements of the 4th line, etc., until we get zeros under a 22/

.

The actions taken are equivalent to eliminating the unknown x 2 from all equations of system (I), except for the 1st and 2nd. Since the number of rows is finite, therefore after a finite number of steps we get that either the system is inconsistent, or we end up with a step matrix ( see definition 2 §7 chapter 1) :

,

Let us write out the system of equations corresponding to the matrix . This system is equivalent to system (I)

.

From the last equation we express; substitute into the previous equation, find, etc., until we get .

Note 1. Thus, when solving system (I) using the Gaussian method, we arrive at one of the following cases.

1. System (I) is inconsistent.

2. System (I) has a unique solution if the number of rows in the matrix is ​​equal to the number of unknowns ().

3. System (I) has an infinite number of solutions if the number of rows in the matrix is ​​less than the number of unknowns ().

Hence the following theorem holds.

Theorem. A system of linear equations is either inconsistent, has a unique solution, or has an infinite number of solutions.

Examples. Solve the system of equations using the Gauss method or prove its inconsistency:

b) ;

a) Let us rewrite the given system in the form:

.

We have swapped the 1st and 2nd equations of the original system to simplify the calculations (instead of fractions, we will only operate with integers using this rearrangement).

Let's create an expanded matrix:

.

There are no null lines; there are no incompatible lines, ; Let's exclude the 1st unknown from all equations of the system except the 1st. To do this, multiply the elements of the 1st row of the matrix by “-2” and add them with the corresponding elements of the 2nd row, which is equivalent to multiplying the 1st equation by “-2” and adding it with the 2nd equation. Then we multiply the elements of the 1st line by “-3” and add them with the corresponding elements of the third line, i.e. multiply the 2nd equation of the given system by “-3” and add it to the 3rd equation. We get

.

The matrix corresponds to a system of equations). - (see definition 3§7 of Chapter 1).

The inverse matrix method is a special case matrix equation

Solve the system using the matrix method

Solution: We write the system in matrix form. We find the solution of the system using the formula (see the last formula)

We find the inverse matrix using the formula:
, where is the transposed matrix of algebraic complements of the corresponding elements of the matrix.

First, let's look at the determinant:

Here the determinant is expanded on the first line.

Attention! If, then the inverse matrix does not exist, and it is impossible to solve the system using the matrix method. In this case, the system is solved by the elimination of unknowns method (Gaussian method).

Now we need to calculate 9 minors and write them into the minors matrix

Reference: It is useful to know the meaning of double subscripts in linear algebra. The first digit is the number of the line in which the element is located. The second digit is the number of the column in which the element is located:

That is, a double subscript indicates that the element is in the first row, third column, and, for example, the element is in 3 row, 2 column

During the solution, it is better to describe the calculation of minors in detail, although with some experience you can get used to counting them with errors orally.








The order in which the minors are calculated is completely unimportant; here I calculated them from left to right line by line. It was possible to calculate minors by columns (this is even more convenient).

Thus:

– matrix of minors of the corresponding elements of the matrix.

– matrix of algebraic additions.

– transposed matrix of algebraic additions.

I repeat, we discussed the steps performed in detail in the lesson. How to find the inverse of a matrix?

Now we write the inverse matrix:

Under no circumstances should we enter it into the matrix, this will seriously complicate further calculations. The division would need to be performed if all the numbers in the matrix were divisible by 60 without a remainder. But in this case it is very necessary to add a minus into the matrix; on the contrary, it will simplify further calculations.

All that remains is to perform matrix multiplication. You can learn how to multiply matrices in class. Actions with matrices. By the way, exactly the same example is analyzed there.

Note that division by 60 is done last of all.
Sometimes it may not separate completely, i.e. may result in “bad” fractions. I already told you what to do in such cases when we examined Cramer’s rule.

Answer:

Example 12

Solve the system using the inverse matrix.

This is an example for an independent solution (a sample of the final design and the answer at the end of the lesson).

The most universal way to solve the system is method of eliminating unknowns (Gaussian method). It is not so easy to explain the algorithm clearly, but I tried!

I wish you success!

Answers:

Example 3:

Example 6:

Example 8: , . You can view or download a sample solution for this example (link below).

Examples 10, 12:

We continue to consider systems of linear equations. This lesson is the third on the topic. If you have a vague idea of ​​what a system of linear equations is in general, if you feel like a teapot, then I recommend starting with the basics on the page Next, it is useful to study the lesson.

The Gaussian method is easy! Why? The famous German mathematician Johann Carl Friedrich Gauss, during his lifetime, received recognition as the greatest mathematician of all time, a genius, and even the nickname “King of Mathematics.” And everything ingenious, as you know, is simple! By the way, not only suckers get money, but also geniuses - Gauss’s portrait was on the 10 Deutschmark banknote (before the introduction of the euro), and Gauss still smiles mysteriously at Germans from ordinary postage stamps.

The Gauss method is simple in that the KNOWLEDGE OF A FIFTH-GRADE STUDENT IS ENOUGH to master it. You must know how to add and multiply! It is no coincidence that teachers often consider the method of sequential exclusion of unknowns in school mathematics electives. It’s a paradox, but students find the Gaussian method the most difficult. Nothing surprising - it’s all about the methodology, and I will try to talk about the algorithm of the method in an accessible form.

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

1) Have a unique solution.
2) Have infinitely many solutions.
3) Have no solutions (be non-joint).

The Gauss method is the most powerful and universal tool for finding a solution any systems of linear equations. As we remember, Cramer's rule and matrix method are unsuitable in cases where the system has infinitely many solutions or is inconsistent. And the method of sequential 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 devoted to the situations of points No. 2-3. I note that the algorithm of the method itself works the same in all three cases.

Let's return to the simplest system from the lesson How to solve a system of linear equations?
and solve it using the Gaussian method.

The first step is to write down extended system matrix:
. I think everyone can see by what principle the coefficients are written. The vertical line inside the matrix does not have any mathematical meaning - it is simply a strikethrough for ease of design.

Reference: I recommend you rememberterms linear algebra.System Matrix is a matrix composed only of coefficients for unknowns, in this example the matrix of the system: . Extended System Matrix – this is the same matrix of the system plus a column of free terms, in this case: . For brevity, any of the matrices can be simply called a matrix.

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

The following elementary transformations exist:

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

2) If there are (or have appeared) proportional (as a special case - identical) rows in the matrix, then you should delete All these rows are from the matrix 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 appears in the matrix during transformations, then it should also be delete. I won’t draw, of course, the zero line is the line in which all zeros.

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

5) This transformation causes the most difficulties, but in fact there is nothing complicated either. To a row of a matrix you can add another string multiplied by a number, different from zero. Let's look at our matrix from a practical example: . First I'll describe the transformation in great detail. Multiply the first line by –2: , And to the second line we add the first line multiplied by –2: . Now the first line can be divided “back” by –2: . As you can see, the line that is ADDED LIhasn't changed. Always the line TO WHICH IS ADDED changes UT.

In practice, of course, they don’t write it in such detail, but write it briefly:

Once again: to the second line added the first line multiplied by –2. A line is usually multiplied orally or on a draft, with the mental calculation process going something like this:

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

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

“Now the second column. At the top, I multiply -1 by -2: . I add the first to the second line: 1 + 2 = 3. I write the result in the second line: "

“And the third column. At the top I multiply -5 by -2: . I add the first to the second line: –7 + 10 = 3. I write the result in the second line: »

Please carefully understand this example and understand the sequential calculation algorithm, if you understand this, then the Gaussian method is practically in your pocket. But, of course, we will still 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 “classical” operations with matrices Under no circumstances should you rearrange anything inside the matrices!

Let's return to our system. It's almost resolved.

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

(1) The first line was added to the second line, multiplied by –2. By the way, why do we multiply the first line by –2? In order to get zero at the bottom, which means getting rid of one variable in the second line.

(2) Divide the second line by 3.

The purpose of elementary transformations reduce the matrix to stepwise form: . In the design of the task, they just mark out the “stairs” with a simple pencil, and also circle the numbers that are located on the “steps”. The term “stepped view” 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 “unwinded” in the opposite direction - from bottom to top, this process is called inverse of the Gaussian method.

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

Let's consider the first equation of the system and substitute the already known value of “y” into it:

Let's consider the most common situation, when the Gaussian method requires solving a system of three linear equations with three unknowns.

Example 1

Solve the system of equations using the Gauss method:

Let's write the extended matrix of the system:

Now I will immediately draw the result that we will come to during the solution:

And I repeat, our goal is to bring the matrix to a stepwise form using elementary transformations. Where to start?

First, look at the top left number:

Should almost always be here unit. Generally speaking, –1 (and sometimes other numbers) will do, but somehow it has traditionally happened that one is usually placed there. How to organize a unit? We look at the first column - we have a finished unit! Transformation one: 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 top left corner is organized. Now you need to get zeros in these places:

We get zeros using a “difficult” transformation. First we deal with the second line (2, –1, 3, 13). What needs to 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 in the second line:

We deal with the third line in the same way (3, 2, –5, –1). To get a 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 we add the first line multiplied by –3:

We write the result in the third line:

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

No need to count everything at once and at the same time. The order of calculations and “writing in” the results consistent and usually it’s like this: first we rewrite the first line, and slowly puff on ourselves - CONSISTENTLY and ATTENTIVELY:

And I have already discussed the mental process of the calculations themselves above.

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

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

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

Try to figure out this action yourself - mentally multiply the second line by –2 and perform the addition.

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

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

Cool.

Now the reverse of the Gaussian method comes into play. The equations “unwind” from bottom to top.

In the third equation we already have a ready result:

Let's look at the second equation: . The meaning of "zet" is already known, thus:

And finally, the first equation: . “Igrek” and “zet” are known, it’s just a matter of little things:


Answer:

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

Example 2


This is an example for an independent solution, a sample of the final design and an answer at the end of the lesson.

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

Example 3

Solve a system of linear equations using the Gauss 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 one there. The problem is that there are no units in the first column at all, so rearranging the rows will not solve anything. In such cases, the unit must be organized using an elementary transformation. This can usually be done in several ways. I did this: (1) To the first line we add the second line, multiplied by –1. That is, we mentally multiplied the second line by –1 and added the first and second lines, while the second line did not change.

Now the top left is -1, which suits us just fine. Anyone who wants to get +1 can perform an additional 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. The sign of the third line was also changed and it was moved to second place, so that on the second “step” we had the required unit.

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

(5) The third line was divided by 3.

A bad sign that indicates an error in calculations (more rarely, a typo) is a “bad” bottom line. That is, if we got something like , below, and, accordingly, , then with a high degree of probability we can say that an error was made during elementary transformations.

We charge the reverse, in the design of examples they often do not rewrite the system itself, but the equations are “taken directly from the given matrix.” The reverse move, I remind you, works, from bottom to top:
Yes, here is a gift:


Answer: .

Example 4

Solve a system of linear equations using the Gauss method

This is an example for you to solve on your own, it is somewhat more complicated. It's okay if someone gets confused. Full solution and sample design at the end of the lesson. Your solution may be different from my solution.

In the last part we will look at some features of the Gaussian algorithm.
The first feature is that sometimes some variables are missing from the system equations, for example:

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

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

The second feature is this. In all the examples considered, we placed either –1 or +1 on the “steps”. Could there be other numbers 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 is two and six. And the two at the top left will suit us! In 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 way we will get the required zeros in the first column.

Or another conventional 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: add the second line to the third line, multiplied by –4, as a result of which the zero we need will be obtained.

Gauss's method is universal, but there is one peculiarity. You can confidently learn to solve systems using other methods (Cramer’s method, matrix method) literally the first time - they have a very strict algorithm. But in order to feel confident in the Gaussian method, you should “get your teeth into” and solve at least 5-10 ten systems. Therefore, at first there may be confusion and errors in calculations, and there is nothing unusual or tragic about this.

Rainy autumn weather outside the window.... Therefore, for everyone who wants a more complex example to solve on their own:

Example 5

Solve a system of 4 linear equations with four unknowns using the Gauss method.

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

Cases when the system has no solutions (inconsistent) or has infinitely many solutions are discussed in the lesson Incompatible systems and systems with a common solution. There you can fix the considered algorithm of the Gaussian method.

I wish you success!

Solutions and answers:

Example 2: Let's 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 was added to the second line, multiplied by –2. The first line was added to the third line, multiplied by –1.Attention! Here you may be tempted to subtract the first from the third line; I highly recommend not subtracting it - the risk of error greatly increases. Just fold it!
(2) The sign of the second line was changed (multiplied by –1). The second and third lines have been swapped.note , that on the “steps” we are satisfied not only with one, but also with –1, which is even more convenient.
(3) The second line was added to the third line, multiplied by 5.
(4) The sign of the second line was changed (multiplied by –1). The third line was divided by 14.

Reverse:


Answer: .

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

Conversions performed:
(1) A second line was added to the first line. Thus, the desired unit is organized on the upper left “step”.
(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.

With the second “step” everything gets worse , the “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 required item on the second step has been received. .
(5) The second line was added to the third line, multiplied by 6.
(6) The second line was multiplied by –1, the third line was divided by -83. It is obvious that the plane is uniquely defined by three different points that do not lie on the same line. Therefore, three-letter designations of planes are quite popular - by the points belonging to them, for example, ; .If free members



New on the site

>

Most popular