Biographies Characteristics Analysis

Solve a system of equations using the matrix method calculator. Matrix method online

A system of m linear equations with n unknowns called a system of the form

Where a ij And b i (i=1,…,m; b=1,…,n) are some known numbers, and x 1 ,…,x n– unknown. In the designation of coefficients a ij first index i denotes the equation number, and the second j– the number of the unknown at which this coefficient stands.

We will write the coefficients for the unknowns in the form of a matrix , which we'll call matrix of the system.

The numbers on the right side of the equations are b 1 ,…,b m are called free members.

Totality n numbers c 1 ,…,c n called decision of a given system, if each equation of the system becomes an equality after substituting numbers into it c 1 ,…,c n instead of the corresponding unknowns x 1 ,…,x n.

Our task will be to find solutions to the system. In this case, three situations may arise:

A system of linear equations that has at least one solution is called joint. Otherwise, i.e. if the system has no solutions, then it is called non-joint.

Let's consider ways to find solutions to the system.


MATRIX METHOD FOR SOLVING SYSTEMS OF LINEAR EQUATIONS

Matrices make it possible to briefly write down a system of linear equations. Let a system of 3 equations with three unknowns be given:

Consider the system matrix and matrices columns of unknown and free terms

Let's find the work

those. as a result of the product, we obtain the left-hand sides of the equations of this system. Then, using the definition of matrix equality, this system can be written in the form

or shorter AX=B.

Here are the matrices A And B are known, and the matrix X unknown. It is necessary to find it, because... its elements are the solution to this system. This equation is called matrix equation.

Let the matrix determinant be different from zero | A| ≠ 0. Then the matrix equation is solved as follows. Multiply both sides of the equation on the left by the matrix A-1, inverse of the matrix A: . Because the A -1 A = E And EX = X, then we obtain a solution to the matrix equation in the form X = A -1 B .

Note that since the inverse matrix can only be found for square matrices, the matrix method can only solve those systems in which the number of equations coincides with the number of unknowns. However, matrix recording of the system is also possible in the case when the number of equations is not equal to the number of unknowns, then the matrix A will not be square and therefore it is impossible to find a solution to the system in the form X = A -1 B.

Examples. Solve systems of equations.

CRAMER'S RULE

Consider a system of 3 linear equations with three unknowns:

Third-order determinant corresponding to the system matrix, i.e. composed of coefficients for unknowns,

called determinant of the system.

Let's compose three more determinants as follows: replace sequentially 1, 2 and 3 columns in the determinant D with a column of free terms

Then we can prove the following result.

Theorem (Cramer's rule). If the determinant of the system Δ ≠ 0, then the system under consideration has one and only one solution, and

Proof. So, let's consider a system of 3 equations with three unknowns. Let's multiply the 1st equation of the system by the algebraic complement A 11 element a 11, 2nd equation – on A 21 and 3rd – on A 31:

Let's add these equations:

Let's look at each of the brackets and the right side of this equation. By the theorem on the expansion of the determinant in elements of the 1st column

Similarly, it can be shown that and .

Finally, it is easy to notice that

Thus, we obtain the equality: .

Hence, .

The equalities and are derived similarly, from which the statement of the theorem follows.

Thus, we note that if the determinant of the system Δ ≠ 0, then the system has a unique solution and vice versa. If the determinant of the system is equal to zero, then the system either has an infinite number of solutions or has no solutions, i.e. incompatible.

Examples. Solve system of equations


GAUSS METHOD

The previously discussed methods can be used to solve only those systems in which the number of equations coincides with the number of unknowns, and the determinant of the system must be different from zero. The Gauss method is more universal and suitable for systems with any number of equations. It consists in the consistent elimination of unknowns from the equations of the system.

Consider again a system of three equations with three unknowns:

.

We will leave the first equation unchanged, and from the 2nd and 3rd we will exclude the terms containing x 1. To do this, divide the second equation by A 21 and multiply by – A 11, and then add it to the 1st equation. Similarly, we divide the third equation by A 31 and multiply by – A 11, and then add it with the first one. As a result, the original system will take the form:

Now from the last equation we eliminate the term containing x 2. To do this, divide the third equation by, multiply by and add with the second. Then we will have a system of equations:

From here, from the last equation it is easy to find x 3, then from the 2nd equation x 2 and finally, from 1st - x 1.

When using the Gaussian method, the equations can be swapped if necessary.

Often, instead of writing a new system of equations, they limit themselves to writing out the extended matrix of the system:

and then bring it to a triangular or diagonal form using elementary transformations.

TO elementary transformations matrices include the following transformations:

  1. rearranging rows or columns;
  2. multiplying a string by a number other than zero;
  3. adding other lines to one line.

Examples: Solve systems of equations using the Gauss method.


Thus, the system has an infinite number of solutions.

This is a concept that generalizes all possible operations performed with matrices. Mathematical matrix - table of elements. About a table where m lines and n columns, this matrix is ​​said to have the dimension m on n.

General view of the matrix:

For matrix solutions it is necessary to understand what a matrix is ​​and know its main parameters. Main elements of the matrix:

  • The main diagonal, consisting of elements a 11, a 22…..a mn.
  • Side diagonal consisting of elements a 1n , a 2n-1 .....a m1.

Main types of matrices:

  • Square is a matrix where the number of rows = the number of columns ( m=n).
  • Zero - where all matrix elements = 0.
  • Transposed matrix - matrix IN, which was obtained from the original matrix A by replacing rows with columns.
  • Unity - all elements of the main diagonal = 1, all others = 0.
  • An inverse matrix is ​​a matrix that, when multiplied by the original matrix, results in an identity matrix.

The matrix can be symmetrical with respect to the main and secondary diagonals. That is, if a 12 = a 21, a 13 =a 31,….a 23 =a 32…. a m-1n =a mn-1, then the matrix is ​​symmetrical about the main diagonal. Only square matrices can be symmetric.

Methods for solving matrices.

Almost all matrix solving methods consist in finding its determinant n-th order and most of them are quite cumbersome. To find the determinant of the 2nd and 3rd order there are other, more rational methods.

Finding 2nd order determinants.

To calculate the determinant of a matrix A 2nd order, it is necessary to subtract the product of the elements of the secondary diagonal from the product of the elements of the main diagonal:

Methods for finding 3rd order determinants.

Below are the rules for finding the 3rd order determinant.

Simplified rule of triangle as one of matrix solving methods, can be depicted this way:

In other words, the product of elements in the first determinant that are connected by straight lines is taken with a “+” sign; Also, for the 2nd determinant, the corresponding products are taken with the “-” sign, that is, according to the following scheme:

At solving matrices using Sarrus' rule, to the right of the determinant, add the first 2 columns and the products of the corresponding elements on the main diagonal and on the diagonals that are parallel to it are taken with a “+” sign; and the products of the corresponding elements of the secondary diagonal and the diagonals that are parallel to it, with the sign “-”:

Decomposing the determinant in a row or column when solving matrices.

The determinant is equal to the sum of the products of the elements of the row of the determinant and their algebraic complements. Usually the row/column that contains zeros is selected. The row or column along which the decomposition is carried out will be indicated by an arrow.

Reducing the determinant to triangular form when solving matrices.

At solving matrices method of reducing the determinant to a triangular form, they work like this: using the simplest transformations on rows or columns, the determinant becomes triangular in form and then its value, in accordance with the properties of the determinant, will be equal to the product of the elements that are on the main diagonal.

Laplace's theorem for solving matrices.

When solving matrices using Laplace's theorem, you need to know the theorem itself. Laplace's theorem: Let Δ - this is a determinant n-th order. We select any k rows (or columns), provided kn - 1. In this case, the sum of the products of all minors k-th order contained in the selected k rows (columns), by their algebraic complements will be equal to the determinant.

Solving the inverse matrix.

Sequence of actions for inverse matrix solutions:

  1. Determine whether a given matrix is ​​square. If the answer is negative, it becomes clear that there cannot be an inverse matrix for it.
  2. We calculate algebraic complements.
  3. We compose a union (mutual, adjoint) matrix C.
  4. We compose the inverse matrix from algebraic additions: all elements of the adjoint matrix C divide by the determinant of the initial matrix. The final matrix will be the required inverse matrix relative to the given one.
  5. We check the work done: multiply the initial matrix and the resulting matrix, the result should be an identity matrix.

Solving matrix systems.

For solutions of matrix systems The Gaussian method is most often used.

The Gauss method is a standard method for solving systems of linear algebraic equations (SLAEs) and it consists in the fact that variables are sequentially eliminated, i.e., with the help of elementary changes, the system of equations is brought to an equivalent system of triangular form and from it, sequentially, starting from the latter (by number), find each element of the system.

Gauss method is the most versatile and best tool for finding matrix solutions. If a system has an infinite number of solutions or the system is incompatible, then it cannot be solved using Cramer’s rule and the matrix method.

The Gauss method also implies direct (reducing the extended matrix to a stepwise form, i.e., obtaining zeros under the main diagonal) and reverse (obtaining zeros above the main diagonal of the extended matrix) moves. The forward move is the Gauss method, the reverse move is the Gauss-Jordan method. The Gauss-Jordan method differs from the Gauss method only in the sequence of eliminating variables.

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. Recently, mathematical modeling has gained particular popularity among researchers, scientists and practitioners in almost all subject areas, which is explained by its obvious advantages over other well-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 a mathematical model given by scientists at different times, but in our opinion, the most successful is the following statement. A mathematical model is an idea expressed by an 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 us be given a system of 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 from the left by A-1 - matrix inverse of matrix A: A -1 (AX) = A -1 B

Because A -1 A = E, we get X=A -1 B. The right side of this equation will give the solution column of the original system. The condition for the applicability of this method (as well as the general existence of a solution to an inhomogeneous system of linear equations with the number of equations equal to the number of unknowns) is the nondegeneracy of the matrix A. A necessary and sufficient condition for this is 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 the algebraic complements for the elements of the matrix consisting of the coefficients of the unknowns. They will be needed to find the inverse matrix.

The use of equations is widespread in our lives. They are used in many calculations, construction of structures and even sports. Man used equations in ancient times, and since then their use has only increased. The matrix method allows you to find solutions to SLAEs (systems of linear algebraic equations) of any complexity. The entire process of solving SLAEs comes down to two main actions:

Determination of the inverse matrix based on the main matrix:

Multiplying the resulting inverse matrix by a column vector of solutions.

Suppose we are given a SLAE of the following form:

\[\left\(\begin(matrix) 5x_1 + 2x_2 & = & 7 \\ 2x_1 + x_2 & = & 9 \end(matrix)\right.\]

Let's start solving this equation by writing out the system matrix:

Right side matrix:

Let's define the inverse matrix. You can find a 2nd order matrix as follows: 1 - the matrix itself must be non-singular; 2 - its elements that are on the main diagonal are swapped, and for the elements of the secondary diagonal we change the sign to the opposite one, after which we divide the resulting elements by the determinant of the matrix. We get:

\[\begin(pmatrix) 7 \\ 9 \end(pmatrix)=\begin(pmatrix) -11 \\ 31 \end(pmatrix)\Rightarrow \begin(pmatrix) x_1 \\ x_2 \end(pmatrix) =\ begin(pmatrix) -11 \\ 31 \end(pmatrix) \]

2 matrices are considered equal if their corresponding elements are equal. As a result, we have the following answer for the SLAE solution:

Where can I solve a system of equations using the matrix method online?

You can solve the system of equations on our website. The free online solver will allow you to solve online equations of any complexity in a matter of seconds. All you need to do is simply enter your data into the solver. You can also find out how to solve the equation on our website. And if you still have questions, you can ask them in our VKontakte group.

This online calculator solves a system of linear equations using the matrix method. A very detailed solution is given. To solve a system of linear equations, select the number of variables. Choose a method for calculating the inverse matrix. Then enter the data in the cells and click on the "Calculate" button.

×

Warning

Clear all cells?

Close Clear

Data entry instructions. Numbers are entered as integers (examples: 487, 5, -7623, etc.), decimals (ex. 67., 102.54, etc.) or fractions. The fraction must be entered in the form a/b, where a and b are integers or decimals. Examples 45/5, 6.6/76.4, -7/6.7, etc.

Matrix method for solving systems of linear equations

Consider the following system of linear equations:

Given the definition of an inverse matrix, we have A −1 A=E, Where E- identity matrix. Therefore (4) can be written as follows:

Thus, to solve the system of linear equations (1) (or (2)), it is enough to multiply the inverse of A matrix per constraint vector b.

Examples of solving a system of linear equations using the matrix method

Example 1. Solve the following system of linear equations using the matrix method:

Let's find the inverse of matrix A using the Jordan-Gauss method. On the right side of the matrix A Let's write the identity matrix:

Let's exclude the elements of the 1st column of the matrix below the main diagonal. To do this, add lines 2,3 with line 1, multiplied by -1/3, -1/3, respectively:

Let's exclude the elements of the 2nd column of the matrix below the main diagonal. To do this, add line 3 with line 2 multiplied by -24/51:

Let's exclude the elements of the 2nd column of the matrix above the main diagonal. To do this, add line 1 with line 2 multiplied by -3/17:

Separate the right side of the matrix. The resulting matrix is ​​the inverse matrix of A :

Matrix form of writing a system of linear equations: Ax=b, Where

Let's calculate all algebraic complements of the matrix A:

,
,
,
,
,
,
,
,
.

The inverse matrix is ​​calculated from the following expression.