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 right side of the matrix A 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.

In the first part, we looked at some theoretical material, the substitution method, as well as the method of term-by-term addition of system equations. I recommend everyone who accessed the site through this page to read the first part. Perhaps some visitors will find the material too simple, but in the process of solving systems of linear equations, I made a number of very important comments and conclusions regarding the solution of mathematical problems in general.

Now we will analyze Cramer’s rule, as well as solving a system of linear equations using an inverse matrix (matrix method). All materials are presented simply, in detail and clearly; almost all readers will be able to learn how to solve systems using the above methods.

First, we will take a closer look at Cramer's rule for a system of two linear equations in two unknowns. For what? – After all, the simplest system can be solved using the school method, the method of term-by-term addition!

The fact is that, albeit sometimes, such a task occurs - to solve a system of two linear equations with two unknowns using Cramer's formulas. Secondly, a simpler example will help you understand how to use Cramer's rule for a more complex case - a system of three equations with three unknowns.

In addition, there are systems of linear equations with two variables, which are advisable to solve using Cramer’s rule!

Consider the system of equations

At the first step, we calculate the determinant, it is called main determinant of the system.

Gauss method.

If , then the system has a unique solution, and to find the roots we must calculate two more determinants:
And

In practice, the above qualifiers can also be denoted by a Latin letter.

We find the roots of the equation using the formulas:
,

Example 7

Solve a system of linear equations

Solution: We see that the coefficients of the equation are quite large; on the right side there are decimal fractions with a comma. The comma is a rather rare guest in practical tasks in mathematics; I took this system from an econometric problem.

How to solve such a system? You can try to express one variable in terms of another, but in this case you will probably end up with terrible fancy fractions that are extremely inconvenient to work with, and the design of the solution will look simply terrible. You can multiply the second equation by 6 and subtract term by term, but the same fractions will arise here too.

What to do? In such cases, Cramer's formulas come to the rescue.

;

;

Answer: ,

Both roots have infinite tails and are found approximately, which is quite acceptable (and even commonplace) for econometrics problems.

Comments are not needed here, since the task is solved using ready-made formulas, however, there is one caveat. When using this method, compulsory A fragment of the task design is the following fragment: “This means that the system has a unique solution”. Otherwise, the reviewer may punish you for disrespect for Cramer's theorem.

It would not be superfluous to check, which can be conveniently carried out on a calculator: we substitute approximate values ​​into the left side of each equation of the system. As a result, with a small error, you should get numbers that are on the right sides.

Example 8

Present the answer in ordinary improper fractions. Do a check.

This is an example for you to solve on your own (an example of the final design and the answer at the end of the lesson).

Let's move on to consider Cramer's rule for a system of three equations with three unknowns:

We find the main determinant of the system:

If , then the system has infinitely many solutions or is inconsistent (has no solutions). In this case, Cramer's rule will not help; you need to use the Gauss method.

If , then the system has a unique solution and to find the roots we must calculate three more determinants:
, ,

And finally, the answer is calculated using the formulas:

As you can see, the “three by three” case is fundamentally no different from the “two by two” case; the column of free terms sequentially “walks” from left to right along the columns of the main determinant.

Example 9

Solve the system using Cramer's formulas.

Solution: Let's solve the system using Cramer's formulas.

, which means the system has a unique solution.

Answer: .

Actually, here again there is nothing special to comment on, due to the fact that the solution follows ready-made formulas. But there are a couple of comments.

It happens that as a result of calculations, “bad” irreducible fractions are obtained, for example: .
I recommend the following “treatment” algorithm. If you don’t have a computer at hand, do this:

1) There may be an error in the calculations. As soon as you encounter a “bad” fraction, you immediately need to check Is the condition rewritten correctly?. If the condition is rewritten without errors, then you need to recalculate the determinants using expansion in another row (column).

2) If no errors are identified as a result of checking, then most likely there was a typo in the task conditions. In this case, calmly and CAREFULLY work through the task to the end, and then be sure to check and we draw it up on a clean sheet after the decision. Of course, checking a fractional answer is an unpleasant task, but it will be a disarming argument for the teacher, who really likes to give a minus for any bullshit like . How to handle fractions is described in detail in the answer to Example 8.

If you have a computer at hand, then use an automated program to check, which can be downloaded for free at the very beginning of the lesson. By the way, it is most profitable to use the program right away (even before starting the solution); you will immediately see the intermediate step where you made a mistake! The same calculator automatically calculates the solution of the system using the matrix method.

Second remark. From time to time there are systems in the equations of which some variables are missing, for example:

Here in the first equation there is no variable , in the second there is no variable . In such cases, it is very important to correctly and CAREFULLY write down the main determinant:
– zeros are placed in place of missing variables.
By the way, it is rational to open determinants with zeros according to the row (column) in which the zero is located, since there are noticeably fewer calculations.

Example 10

Solve the system using Cramer's formulas.

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

For the case of a system of 4 equations with 4 unknowns, Cramer’s formulas are written according to similar principles. You can see a live example in the lesson Properties of Determinants. Reducing the order of the determinant - five 4th order determinants are quite solvable. Although the task is already very reminiscent of a professor’s shoe on the chest of a lucky student.

Solving the system using an inverse matrix

The inverse matrix method is essentially a special case matrix equation(See Example No. 3 of the specified lesson).

To study this section, you must be able to expand determinants, find the inverse of a matrix, and perform matrix multiplication. Relevant links will be provided as the explanations progress.

Example 11

Solve the system using the matrix method

Solution: Let's write the system in matrix form:
, Where

Please look at the system of equations and matrices. I think everyone understands the principle by which we write elements into matrices. The only comment: if some variables were missing from the equations, then zeros would have to be placed in the corresponding places in the matrix.

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 method of eliminating unknowns (Gauss 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

Let us be given a system of linear equations with unknown:

We will assume that the main matrix non-degenerate. Then, by Theorem 3.1, there exists an inverse matrix
Multiplying the matrix equation
to the matrix
on the left, using Definition 3.2, as well as statement 8) of Theorem 1.1, we obtain the formula on which the matrix method for solving systems of linear equations is based:

Comment. Note that the matrix method for solving systems of linear equations, in contrast to the Gauss method, has limited application: this method can only solve systems of linear equations in which, firstly, the number of unknowns is equal to the number of equations, and secondly, the main matrix is ​​non-singular .

Example. Solve a system of linear equations using the matrix method.

A system of three linear equations with three unknowns is given
Where

The main matrix of the system of equations is non-singular, since its determinant is non-zero:

Inverse matrix
Let's compose using one of the methods described in paragraph 3.

Using the formula of the matrix method for solving systems of linear equations, we obtain

5.3. Cramer method

This method, like the matrix method, is applicable only for systems of linear equations in which the number of unknowns coincides with the number of equations. Cramer's method is based on the theorem of the same name:

Theorem 5.2. System linear equations with unknown

whose main matrix is ​​non-singular, has a unique solution that can be obtained using the formulas

Where
determinant of a matrix derived from the base matrix system of equations by replacing it
th column with a column of free members.

Example. Let's find the solution to the system of linear equations considered in the previous example using Cramer's method. The main matrix of the system of equations is non-degenerate, since
Let's calculate the determinants



Using the formulas presented in Theorem 5.2, we calculate the values ​​of the unknowns:

6. Study of systems of linear equations.

Basic solution

To study a system of linear equations means to determine whether this system is compatible or incompatible, and if it is compatible, to find out whether this system is definite or indefinite.

The compatibility condition for a system of linear equations is given by the following theorem

Theorem 6.1 (Kronecker–Capelli).

A system of linear equations is consistent if and only if the rank of the main matrix of the system is equal to the rank of its extended matrix:

For a simultaneous system of linear equations, the question of its definiteness or uncertainty is solved using the following theorems.

Theorem 6.2. If the rank of the main matrix of a joint system is equal to the number of unknowns, then the system is definite

Theorem 6.3. If the rank of the main matrix of a joint system is less than the number of unknowns, then the system is uncertain.

Thus, from the formulated theorems follows a method for studying systems of linear algebraic equations. Let n– number of unknowns,

Then:


Definition 6.1. The basic solution of an indefinite system of linear equations is a solution in which all free unknowns are equal to zero.

Example. Explore a system of linear equations. If the system is uncertain, find its basic solution.

Let's calculate the ranks of the main and extended matrices of this system of equations, for which we bring the extended (and at the same time the main) matrix of the system to a stepwise form:

Add the second row of the matrix to its first row, multiplied by third line - with the first line multiplied by
and the fourth line - with the first, multiplied by we get a matrix

To the third row of this matrix we add the second row multiplied by
and to the fourth line – the first, multiplied by
As a result, we get the matrix

removing the third and fourth rows from which we get a step matrix

Thus,

Consequently, this system of linear equations is consistent, and since the rank value is less than the number of unknowns, the system is uncertain. The step matrix obtained as a result of elementary transformations corresponds to the system of equations

Unknown And are the main ones, and the unknowns And
free. By assigning zero values ​​to the free unknowns, we obtain a basic solution to this system of linear equations.

Let there be a square matrix of nth order

Matrix A -1 is called inverse matrix in relation to matrix A, if A*A -1 = E, where E is the identity matrix of the nth order.

Identity matrix- such a square matrix in which all the elements along the main diagonal, passing from the upper left corner to the lower right corner, are ones, and the rest are zeros, for example:

inverse matrix may exist only for square matrices those. for those matrices in which the number of rows and columns coincide.

Theorem for the existence condition of an inverse matrix

In order for a matrix to have an inverse matrix, it is necessary and sufficient that it be non-singular.

The matrix A = (A1, A2,...A n) is called non-degenerate, if the column vectors are linearly independent. The number of linearly independent column vectors of a matrix is ​​called the rank of the matrix. Therefore, we can say that in order for an inverse matrix to exist, it is necessary and sufficient that the rank of the matrix is ​​equal to its dimension, i.e. r = n.

Algorithm for finding the inverse matrix

  1. Write matrix A into the table for solving systems of equations using the Gaussian method and assign matrix E to it on the right (in place of the right-hand sides of the equations).
  2. Using Jordan transformations, reduce matrix A to a matrix consisting of unit columns; in this case, it is necessary to simultaneously transform the matrix E.
  3. If necessary, rearrange the rows (equations) of the last table so that under the matrix A of the original table you get the identity matrix E.
  4. Write down the inverse matrix A -1, which is located in the last table under the matrix E of the original table.
Example 1

For matrix A, find the inverse matrix A -1

Solution: We write matrix A and assign the identity matrix E to the right. Using Jordan transformations, we reduce matrix A to the identity matrix E. The calculations are given in Table 31.1.

Let's check the correctness of the calculations by multiplying the original matrix A and the inverse matrix A -1.

As a result of matrix multiplication, the identity matrix was obtained. Therefore, the calculations were made correctly.

Answer:

Solving matrix equations

Matrix equations can look like:

AX = B, HA = B, AXB = C,

where A, B, C are the specified matrices, X is the desired matrix.

Matrix equations are solved by multiplying the equation by inverse matrices.

For example, to find the matrix from the equation, you need to multiply this equation by on the left.

Therefore, to find a solution to the equation, you need to find the inverse matrix and multiply it by the matrix on the right side of the equation.

Other equations are solved similarly.

Example 2

Solve the equation AX = B if

Solution: Since the inverse matrix is ​​equal to (see example 1)

Matrix method in economic analysis

Along with others, they are also used matrix methods. These methods are based on linear and vector-matrix algebra. Such methods are used for the purposes of analyzing complex and multidimensional economic phenomena. Most often, these methods are used when it is necessary to make a comparative assessment of the functioning of organizations and their structural divisions.

In the process of applying matrix analysis methods, several stages can be distinguished.

At the first stage a system of economic indicators is being formed and on its basis a matrix of initial data is compiled, which is a table in which system numbers are shown in its individual rows (i = 1,2,....,n), and in vertical columns - numbers of indicators (j = 1,2,....,m).

At the second stage For each vertical column, the largest of the available indicator values ​​is identified, which is taken as one.

After this, all amounts reflected in this column are divided by the largest value and a matrix of standardized coefficients is formed.

At the third stage all components of the matrix are squared. If they have different significance, then each matrix indicator is assigned a certain weight coefficient k. The value of the latter is determined by expert opinion.

On the last one, fourth stage found rating values R j are grouped in order of their increase or decrease.

The matrix methods outlined should be used, for example, in a comparative analysis of various investment projects, as well as in assessing other economic indicators of the activities of organizations.

Inverse matrix method is not difficult if you know the general principles of working with matrix equations and, of course, know how to perform elementary algebraic operations.

Solving a system of equations using the inverse matrix method. Example.

The most convenient way to understand the inverse matrix method is with a clear example. Let's take a system of equations:

The first step to solve this system of equations is to find the determinant. Therefore, let us transform our system of equations into the following matrix:

And we find the necessary determinant:

The formula used to solve matrix equations is as follows:

Thus, to calculate X, we need to determine the value of the matrix A-1 and multiply it by b. Another formula will help us with this:

At in this case it will be transposed matrix- that is, the same original one, but written not in rows, but in columns.

We should not forget that inverse matrix method, like Cramer's method, is only suitable for systems in which the determinant is greater or less than zero. If the determinant is equal to zero, you need to use the Gaussian method.

The next step is to compile a matrix of minors, which is the following scheme:

As a result, we received three matrices - minors, algebraic additions and a transposed matrix of algebraic additions. Now you can proceed to the actual compilation of the inverse matrix. We already know the formula. For our example it will look like this.