Solving equations using the inverse matrix. Slough solution by inverse matrix method

In the first part, we considered some theoretical material, the substitution method, as well as the method of term-by-term addition of system equations. To everyone who came to the site through this page, I recommend that you read the first part. Perhaps, some visitors will find the material too simple, but in the course of solving systems of linear equations, I made a number of very important remarks and conclusions regarding the solution math problems generally.

And now we will analyze Cramer's rule, as well as the solution of a system of linear equations using the 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.

We first consider Cramer's rule in detail for a system of two linear equations in two unknowns. For what? “After all, the simplest system can be solved by the school method, by term-by-term addition!

The fact is that even if sometimes, but there is such a task - 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 it is advisable to solve exactly according to Cramer's rule!

Consider the system of equations

At the first step, we calculate the determinant , it is called the 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 the Latin letter.

The roots of the equation are found by 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 decimals 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 surely get terrible fancy fractions, which are extremely inconvenient to work with, and the design of the solution will look just awful. You can multiply the second equation by 6 and subtract term by term, but the same fractions will appear here.

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 according to ready-made formulas, however, there is one caveat. When using this method, compulsory The fragment of the assignment is the following fragment: "so the system has a unique solution". Otherwise, the reviewer may punish you for disrespecting Cramer's theorem.

It will not be superfluous to check, which is convenient to carry out on a calculator: we substitute the approximate values ​​\u200b\u200bin the left side of each equation of the system. As a result, with a small error, numbers that are on the right side should be obtained.

Example 8

Express your answer in ordinary improper fractions. Make a check.

This is an example for independent solution(example of finishing and answer at the end of the lesson).

We turn to the consideration of 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 by 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.

, so the system has a unique solution.

Answer: .

Actually, there is nothing special to comment here again, in view of the fact that the decision is made according to ready-made formulas. But there are a couple of notes.

It happens that as a result of calculations, “bad” irreducible fractions are obtained, for example: .
I recommend the following "treatment" algorithm. If there is no computer at hand, we do this:

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

2) If no errors were found as a result of the check, then most likely a typo was made in the condition of the assignment. In this case, calmly and CAREFULLY solve the task to the end, and then make sure to check and draw it up on a clean copy after the decision. Of course, checking a fractional answer is an unpleasant task, but it will be a disarming argument for the teacher, who, well, really likes to put a minus for any bad thing like. How to deal with fractions is detailed in the answer for Example 8.

If you have a computer at hand, then use an automated program to check it, which can be downloaded for free at the very beginning of the lesson. By the way, it is most advantageous to use the program right away (even before starting the solution), you will immediately see the intermediate step at which 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 put in place of missing variables.
By the way, it is rational to open determinants with zeros in the row (column) in which zero is located, since there are noticeably fewer calculations.

Example 10

Solve the system using Cramer's formulas.

This is an example for self-solving (finishing sample and 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 Determinant Properties lesson. 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.

Solution of the system using the 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 need to be able to expand the determinants, find the inverse matrix and perform matrix multiplication. Relevant links will be given as the explanation progresses.

Example 11

Solve the system with the matrix method

Solution: We write the system in matrix form:
, Where

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

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

First, let's deal with the determinant:

Here the determinant is expanded by the first line.

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

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

Reference: It is useful to know the meaning of double subscripts in linear algebra. The first digit is the line number on which the given element. 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, while, for example, the element is in the 3rd row, 2nd column

(sometimes this method is also called the matrix method or the inverse matrix method) requires prior familiarization with such a concept as the matrix form of writing SLAE. The inverse matrix method is designed to solve those systems of linear algebraic equations, for which the determinant of the matrix of the system is different from zero. Naturally, this implies that the matrix of the system is square (the concept of 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$ get the solution of 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. 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), then the equality written above becomes:

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

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

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

Example #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 matrix of the system, i.e. calculate $A^(-1)$. In example #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 equation $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 $\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 #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 .$ by 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 time to find the inverse matrix of the system matrix, i.e. find $A^(-1)$. In example #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 we substitute all three matrices ($X$, $A^(-1)$, $B$) into the equality $X=A^(-1)\cdot B$, after which we 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 $\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$.

  • 11. Expression of the scalar product of a vector in terms of the coordinates of the factors. Theorem.
  • 12. Length of a vector, length of a segment, angle between vectors, condition of perpendicularity of vectors.
  • 13. Vector product of vectors, its properties. The area of ​​a parallelogram.
  • 14. Mixed product of vectors, its properties. The condition of vector complanarity. The volume of the parallelepiped. The volume of the pyramid.
  • 15. Methods for setting a straight line on a plane.
  • 16. Normal equation of a straight line on a plane (derivation). The geometric meaning of the coefficients.
  • 17. The equation of a straight line on a plane in segments (conclusion).
  • Reduction of the general equation of the plane to the equation of the plane in segments.
  • 18. The equation of a straight line in a plane with a slope (output).
  • 19. Equation of a straight line on a plane passing through two points (conclusion).
  • 20. Angle between straight lines on a plane (conclusion).
  • 21. Distance from a point to a straight line on a plane (output).
  • 22. Conditions of parallelism and perpendicularity of straight lines on a plane (conclusion).
  • 23. The equation of the plane. Normal equation of the plane (derivation). The geometric meaning of the coefficients.
  • 24. The equation of the plane in segments (conclusion).
  • 25. Equation of a plane passing through three points (output).
  • 26. Angle between planes (output).
  • 27. Distance from a point to a plane (output).
  • 28. Conditions of parallelism and perpendicularity of planes (conclusion).
  • 29. Equations of a straight line in r3. Equations of a straight line passing through two fixed points (derivation).
  • 30. Canonical equations of a straight line in space (derivation).
  • Compilation of canonical equations of a straight line in space.
  • Particular cases of canonical equations of a straight line in space.
  • Canonical equations of a straight line passing through two given points in space.
  • Transition from canonical equations of a straight line in space to other types of equations of a straight line.
  • 31. Angle between straight lines (output).
  • 32. Distance from a point to a straight line on a plane (output).
  • Distance from a point to a straight line on a plane - theory, examples, solutions.
  • The first way to find the distance from a given point to a given straight line on a plane.
  • The second method, which allows you to find the distance from a given point to a given line on the plane.
  • Solving problems on finding the distance from a given point to a given straight line on a plane.
  • Distance from a point to a straight line in space - theory, examples, solutions.
  • The first way to find the distance from a point to a line in space.
  • The second method, which allows you to find the distance from a point to a straight line in space.
  • 33. Conditions of parallelism and perpendicularity of lines in space.
  • 34. Mutual arrangement of straight lines in space and a straight line with a plane.
  • 35. The classical equation of an ellipse (derivation) and its construction. The canonical equation of an ellipse has the form, where are positive real numbers, moreover. How to build an ellipse?
  • 36. The classical equation of a hyperbola (derivation) and its construction. Asymptotes.
  • 37. Canonical equation of a parabola (derivation) and construction.
  • 38. Function. Basic definitions. Graphs of basic elementary functions.
  • 39. Number sequences. The limit of the numerical sequence.
  • 40. Infinitely small and infinitely large quantities. The theorem about the connection between them, properties.
  • 41. Theorems on actions on variables having finite limits.
  • 42. Number e.
  • Content
  • Methods for determining
  • Properties
  • Story
  • Approximations
  • 43. Definition of the limit of a function. Disclosure of uncertainties.
  • 44. Remarkable limits, their conclusion. Equivalent infinitesimal quantities.
  • Content
  • First wonderful limit
  • The second wonderful limit
  • 45. One-sided limits. Continuity and discontinuities of function. One-sided limits
  • Left and right limits of a function
  • Discontinuity point of the first kind
  • Discontinuity point of the second kind
  • Break point
  • 46. ​​Definition of a derivative. Geometric meaning, mechanical meaning of the derivative. Tangent and normal equations for a curve and a point.
  • 47. Theorems on the derivative of the inverse, complex functions.
  • 48. Derivatives of the simplest elementary functions.
  • 49. Differentiation of parametric, implicit and exponential functions.
  • 21. Differentiation of implicit and parametrically defined functions
  • 21.1. Implicit function
  • 21.2. Function defined parametrically
  • 50. Derivatives of higher orders. Taylor formula.
  • 51. Differential. Application of the differential to approximate calculations.
  • 52. Theorems of Rolle, Lagrange, Cauchy. L'Hopital's rule.
  • 53. Theorem on the necessary and sufficient conditions for the monotonicity of a function.
  • 54. Determination of the maximum, minimum of a function. Theorems on necessary and sufficient conditions for the existence of an extremum of a function.
  • Theorem (necessary extremum condition)
  • 55. Convexity and concavity of curves. Inflection points. Theorems on necessary and sufficient conditions for the existence of inflection points.
  • Proof
  • 57. Determinants of the n-th order, their properties.
  • 58. Matrices and actions on them. Matrix rank.
  • Definition
  • Related definitions
  • Properties
  • Linear transformation and matrix rank
  • 59. Inverse matrix. Theorem on the existence of an inverse matrix.
  • 60. Systems of linear equations. Matrix solution of systems of linear equations. Cramer's rule. Gauss method. The Kronecker-Capelli theorem.
  • Solving systems of linear algebraic equations, solution methods, examples.
  • Definitions, concepts, designations.
  • Solution of elementary systems of linear algebraic equations.
  • Solving systems of linear equations by Cramer's method.
  • Solving systems of linear algebraic equations by the matrix method (using the inverse matrix).
  • Solving systems of linear equations by the Gauss method.
  • Solving systems of linear algebraic equations of general form.
  • Kronecker-Capelli theorem.
  • Gauss method for solving systems of linear algebraic equations of general form.
  • Recording the general solution of homogeneous and inhomogeneous linear algebraic systems using the vectors of the fundamental system of solutions.
  • Solution of systems of equations reducing to slough.
  • Examples of problems that reduce to solving systems of linear algebraic equations.
  • Solving systems of linear algebraic equations by the matrix method (using the inverse matrix).

    Let the system of linear algebraic equations be given in matrix form , where the matrix A has the dimension n on n and its determinant is non-zero.

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

    matrix method.

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

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

    We construct an inverse matrix using a matrix of algebraic complements of matrix elements A(if necessary, see the article methods for finding the inverse matrix):

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

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

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

    For a more detailed description of the theory and additional examples, see the article matrix method for solving systems of linear equations.

    Top of page

    Solving systems of linear equations by 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 in the successive exclusion of unknown variables: first, the x 1 from all equations of the system, starting from the second, then x 2 of all equations, starting with the third, and so on, until only the unknown variable remains in the last equation x n. Such a process of transforming the equations of the system for the successive elimination of unknown variables is called direct Gauss method. After the completion of the forward move of the Gauss method, from the last equation we find x n, using this value from the penultimate equation is calculated x n-1, and so on, from the first equation is found x 1 . The process of calculating unknown variables when moving from the last equation of the system to the first is called reverse Gauss 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, add the first equation multiplied by to the second equation of the system, add the first multiplied by the third equation, and so on, to n-th add the first equation, multiplied by . The system of equations after such transformations will take the form where, a .

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

    Next, we act similarly, but only with a part of the resulting system, which is marked in the figure

    To do this, add the second multiplied by to the third equation of the system, add the second multiplied by to the fourth equation, and so on, to n-th add the second equation, multiplied by. The system of equations after such transformations will take the form where, a . So the variable x 2 excluded from all equations, starting with the third.

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

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

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

    Solve System of Linear Equations Gaussian method.

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

    Now we eliminate from the third equation x 2 , adding to its left and right parts the left and right parts of the second equation, multiplied by:

    On this, the forward course of the Gauss method is completed, we begin the reverse course.

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

    From the second equation we get .

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

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

    For more detailed information and additional examples, see the section on solving elementary systems of linear algebraic equations using the Gauss method.

    Top of page

    "

    Let there be a square matrix of the nth order

    Matrix A -1 is called inverse matrix with respect to the 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 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 that have the same number of rows and columns.

    Inverse Matrix Existence Condition Theorem

    For a matrix to have an inverse matrix, it is necessary and sufficient that it be nondegenerate.

    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 the matrix A in the table for solving systems of equations by the Gauss method and on the right (in place of the right parts of the equations) assign matrix E to it.
    2. Using Jordan transformations, bring matrix A to a matrix consisting of single 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 the identity matrix E is obtained under the matrix A of the original table.
    4. Write the inverse matrix A -1, which is 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 down the matrix A and on the right we assign the identity matrix E. Using the Jordan transformations, we reduce the matrix A to the identity matrix E. The calculations are shown 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 is ​​obtained. Therefore, the calculations are correct.

    Answer:

    Solution of matrix equations

    Matrix equations can look like:

    AX = B, XA = B, AXB = C,

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

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

    For example, to find the matrix from an 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 of the matrix equals (see example 1)

    Matrix method in economic analysis

    Along with others, they also find application 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 compare the functioning of organizations and their structural divisions.

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

    At the first stage the formation of a system of economic indicators is carried out and on its basis a matrix of initial data is compiled, which is a table in which system numbers are shown in its individual lines (i = 1,2,....,n), and along the vertical graphs - numbers of indicators (j = 1,2,....,m).

    At the second stage for each vertical column, the largest of the available values ​​of the indicators is revealed, which is taken as a unit.

    After that, all the amounts reflected in this column are divided by highest 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 indicator of the matrix is ​​assigned a certain value. weight coefficient k. The value of the latter is determined by an expert.

    On the last fourth stage found values ratings Rj grouped in order of increasing or decreasing.

    The above matrix methods should be used, for example, when comparative analysis various investment projects, as well as when evaluating other economic performance indicators of organizations.

    Matrix method for solving systems of linear equations

    Consider a system of linear equations of the following form:

    $\left\(\begin(array)(c) (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) ) \\ (...) \\ (a_ (n1) x_(1) +a_(n2) x_(2) +...+a_(nn) x_(n) =b_(n) ) \end(array)\right. .$

    The numbers $a_(ij) (i=1..n,j=1..n)$ are the coefficients of the system, the numbers $b_(i) (i=1..n)$ are the free terms.

    Definition 1

    In the case when all free terms are equal to zero, the system is called homogeneous, otherwise - inhomogeneous.

    Each SLAE can be associated with several matrices and the system can be written in the so-called matrix form.

    Definition 2

    The coefficient matrix of a system is called the system matrix and is usually denoted by the letter $A$.

    The column of free members forms a column vector, which is usually denoted by the letter $B$ and is called the matrix of free members.

    The unknown variables form a column vector, which, as a rule, is denoted by the letter $X$ and is called the matrix of unknowns.

    The matrices described above are:

    $A=\left(\begin(array)(cccc) (a_(11) ) & (a_(12) ) & (...) & (a_(1n) ) \\ (a_(21) ) & ( a_(22) ) & (...) & (a_(2n) ) \\ (...) & (...) & (...) & (...) \\ (a_(n1) ) & (a_(n2) ) & (...) & (a_(nn) ) \end(array)\right),B=\left(\begin(array)(c) (b_(1) ) \ \ (b_(2) ) \\ (...) \\ (b_(n) ) \end(array)\right),X=\left(\begin(array)(c) (x_(1) ) \\ (x_(2) ) \\ (...) \\ (x_(n) ) \end(array)\right).$

    Using matrices, SLAE can be rewritten as $A\cdot X=B$. Such a notation is often called a matrix equation.

    Generally speaking, any SLAE can be written in matrix form.

    Examples of solving a system using an inverse matrix

    Example 1

    Dana SLAE: $\left\(\begin(array)(c) (3x_(1) -2x_(2) +x_(3) -x_(4) =3) \\ (x_(1) -12x_(2 ) -x_(3) -x_(4) =7) \\ (2x_(1) -3x_(2) +x_(3) -3x_(4) =5) \end(array)\right.$.Write system in matrix form.

    Solution:

    $A=\left(\begin(array)(cccc) (3) & (-2) & (1) & (-1) \\ (1) & (-12) & (-1) & (-1 ) \\ (2) & (-3) & (1) & (-3) \end(array)\right),B=\left(\begin(array)(c) (3) \\ (7) \\ (5) \end(array)\right),X=\left(\begin(array)(c) (x_(1) ) \\ (x_(2) ) \\ (x_(3) ) \ end(array)\right).$

    $\left(\begin(array)(cccc) (3) & (-2) & (1) & (-1) \\ (1) & (-12) & (-1) & (-1) \ \ (2) & (-3) & (1) & (-3) \end(array)\right)\cdot \left(\begin(array)(c) (x_(1) ) \\ (x_( 2) ) \\ (x_(3) ) \end(array)\right)=\left(\begin(array)(c) (3) \\ (7) \\ (5) \end(array)\ right)$

    In the case when the matrix of the system is square, the SLAE can solve the equations in a matrix way.

    Having matrix equation$A\cdot X=B$, you can express $X$ from it in the following way:

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

    $A^(-1) \cdot A=E$ (matrix product property)

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

    $E\cdot X=X$ (matrix product property)

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

    Algorithm for solving a system of algebraic equations using an inverse matrix:

    • write the system in matrix form;
    • calculate the determinant of the matrix of the system;
    • if the determinant of the system matrix is ​​nonzero, then we find the inverse matrix;
    • the solution of the system is calculated by the formula $X=A^(-1) \cdot B$.

    If the system matrix has a determinant that is not equal to zero, then this system has a unique solution that can be found in a matrix way.

    If the matrix of the system has a determinant equal to zero, then this system cannot be solved by the matrix method.

    Example 2

    Dana SLAE: $\left\(\begin(array)(c) (x_(1) +3x_(3) =26) \\ (-x_(1) +2x_(2) +x_(3) =52) \\ (3x_(1) +2x_(2) =52) \end(array)\right.$ Solve the SLAE using the inverse matrix method, if possible.

    Solution:

    $A=\left(\begin(array)(ccc) (1) & (0) & (3) \\ (-1) & (2) & (1) \\ (3) & (2) & ( 0) \end(array)\right),B=\left(\begin(array)(c) (26) \\ (52) \\ (52) \end(array)\right),X=\left (\begin(array)(c) (x_(1) ) \\ (x_(2) ) \\ (x_(3) ) \end(array)\right). $

    Finding the determinant of the matrix of the system:

    $\begin(array)(l) (\det A=\left|\begin(array)(ccc) (1) & (0) & (3) \\ (-1) & (2) & (1) \\ (3) & (2) & (0) \end(array)\right|=1\cdot 2\cdot 0+0\cdot 1\cdot 3+2\cdot (-1)\cdot 3-3 \cdot 2\cdot 3-2\cdot 1\cdot 1-0\cdot (-1)\cdot 0=0+0-6-18-2-0=-26\ne 0) \end(array)$ Since the determinant is not equal to zero, the matrix of the system has an inverse matrix and, therefore, the system of equations can be solved by the inverse matrix method. The resulting solution will be unique.

    We solve the system of equations using the inverse matrix:

    $A_(11) =(-1)^(1+1) \cdot \left|\begin(array)(cc) (2) & (1) \\ (2) & (0) \end(array) \right|=0-2=-2; A_(12) =(-1)^(1+2) \cdot \left|\begin(array)(cc) (-1) & (1) \\ (3) & (0) \end(array) \right|=-(0-3)=3;$

    $A_(13) =(-1)^(1+3) \cdot \left|\begin(array)(cc) (-1) & (2) \\ (3) & (2) \end(array )\right|=-2-6=-8; A_(21) =(-1)^(2+1) \cdot \left|\begin(array)(cc) (0) & (3) \\ (2) & (0) \end(array)\ right|=-(0-6)=6; $

    $A_(22) =(-1)^(2+2) \cdot \left|\begin(array)(cc) (1) & (3) \\ (3) & (0) \end(array) \right|=0-9=-9; A_(23) =(-1)^(2+3) \cdot \left|\begin(array)(cc) (1) & (0) \\ (3) & (2) \end(array)\ right|=-(2-0)=-2;$

    $A_(31) =(-1)^(3+1) \cdot \left|\begin(array)(cc) (0) & (3) \\ (2) & (1) \end(array) \right|=0-6=-6; A_(32) =(-1)^(3+2) \cdot \left|\begin(array)(cc) (1) & (3) \\ (-1) & (1) \end(array) \right|=-(1+3)=-4;$

    $A_(33) =(-1)^(3+3) \cdot \left|\begin(array)(cc) (1) & (0) \\ (-1) & (2) \end(array )\right|=2-0=2$

    The desired inverse matrix:

    $A^(-1) =\frac(1)(-26) \cdot \left(\begin(array)(ccc) (-2) & (6) & (-6) \\ (3) & ( -9) & (-4) \\ (-8) & (-2) & (2) \end(array)\right)=\frac(1)(26) \cdot \left(\begin(array) (ccc) (2) & (-6) & (6) \\ (-3) & (9) & (4) \\ (8) & (2) & (-2) \end(array)\right )=\left(\begin(array)(ccc) (\frac(2)(26) ) & (\frac(-6)(26) ) & (\frac(6)(26) ) \\ (\ frac(-3)(26) ) & (\frac(9)(26) ) & (\frac(4)(26) ) \\ (\frac(8)(26) ) & (\frac(2) (26) ) & (\frac(-2)(26) ) \end(array)\right)=\left(\begin(array)(ccc) (\frac(1)(13) ) & (-\ frac(3)(13) ) & (\frac(3)(13) ) \\ (-\frac(3)(26) ) & (\frac(9)(26) ) & (\frac(2) (13) ) \\ (\frac(4)(13) ) & (\frac(1)(13) ) & (-\frac(1)(13) ) \end(array)\right).$

    Find a solution to the system:

    $X=\left(\begin(array)(ccc) (\frac(1)(13) ) & (-\frac(3)(13) ) & (\frac(3)(13) ) \\ ( -\frac(3)(26) ) & (\frac(9)(26) ) & (\frac(2)(13) ) \\ (\frac(4)(13) ) & (\frac(1 )(13) ) & (-\frac(1)(13) ) \end(array)\right)\cdot \left(\begin(array)(c) (26) \\ (52) \\ (52 ) \end(array)\right)=\left(\begin(array)(c) (\frac(1)(13) \cdot 26-\frac(3)(13) \cdot 52+\frac(3 )(13) \cdot 52) ​​\\ (-\frac(3)(26) \cdot 26+\frac(9)(26) \cdot 52+\frac(2)(13) \cdot 52) ​​\\ (\frac(4)(13) \cdot 26+\frac(1)(13) \cdot 52-\frac(1)(13) \cdot 52) ​​\end(array)\right)=\left(\ begin(array)(c) (2-12+12) \\ (-3+18+8) \\ (8+4-4) \end(array)\right)=\left(\begin(array) (c) (2) \\ (23) \\ (8) \end(array)\right)$

    $X=\left(\begin(array)(c) (2) \\ (23) \\ (8) \end(array)\right)$ - desired solution of the system of equations.