Matrix determinant
Finding the determinant of a matrix is a very common problem in higher mathematics and algebra. As a rule, one cannot do without the value of the matrix determinant when solving complex systems of equations. Cramer's method for solving systems of equations is built on the calculation of the matrix determinant. Using the definition of a determinate, the presence and uniqueness of the solution of systems of equations are determined. Therefore, it is difficult to overestimate the importance of the ability to correctly and accurately find the determinant of a matrix in mathematics. Methods for solving determinants are theoretically quite simple, but as the size of the matrix increases, the calculations become very cumbersome and require great care and a lot of time. It is very easy to make a minor mistake or typo in such complex mathematical calculations, which will lead to an error in the final answer. Therefore, even if you find matrix determinant independently, it is important to check the result. This allows us to make our service Finding the determinant of a matrix online. Our service always gives an absolutely accurate result that does not contain any errors or typos. You can refuse independent calculations, because from the applied point of view, finding matrix determinant does not have a teaching character, but simply requires a lot of time and numerical calculations. Therefore, if in your task determination of matrix determinant are auxiliary, side calculations, use our service and find matrix determinant online!
All calculations are carried out automatically with the highest accuracy and absolutely free. We have a very convenient interface for entering matrix elements. But the main difference between our service and similar ones is the possibility of obtaining a detailed solution. Our service at calculating matrix determinant online always uses the simplest and shortest method and describes in detail each step of the transformations and simplifications. So you get not just the value of the matrix determinant, the final result, but the whole detailed solution.
The concept of a determinant is one of the main ones in the course of linear algebra. This concept is inherent in ONLY SQUARE MATRIXES, and this article is devoted to this concept. Here we will talk about determinants of matrices whose elements are real (or complex) numbers. In this case, the determinant is a real (or complex) number. All further presentation will be an answer to the questions of how to calculate the determinant, and what properties it has.
First, we give the definition of the determinant of a square matrix of order n by n as the sum of products of permutations of matrix elements. Based on this definition, we write formulas for calculating the determinants of matrices of the first, second, and third orders and analyze in detail the solutions of several examples.
Next, we turn to the properties of the determinant, which we will formulate in the form of theorems without proof. Here, a method for calculating the determinant will be obtained through its expansion over the elements of a row or column. This method reduces the calculation of the determinant of a matrix of order n by n to the calculation of the determinants of matrices of order 3 by 3 or less. Be sure to show solutions to several examples.
In conclusion, let us dwell on the calculation of the determinant by the Gauss method. This method is good for finding determinants of matrices of order greater than 3 by 3 because it requires less computational effort. We will also analyze the solution of examples.
Page navigation.
Definition of matrix determinant, calculation of matrix determinant by definition.
We recall several auxiliary concepts.
Definition.
Permutation of order n is called an ordered set of numbers, consisting of n elements.
For a set containing n elements, there are n! (n factorial) of permutations of order n. Permutations differ from each other only in the order of the elements.
For example, consider a set consisting of three numbers: . We write down all the permutations (there are six in total, since ):
Definition.
Inversion in a permutation of order n any pair of indices p and q is called, for which the p-th element of the permutation is greater than the q-th.
In the previous example, the inverse of the permutation 4 , 9 , 7 is p=2 , q=3 , because the second element of the permutation is 9 and is greater than the third element, which is 7 . The inverse of permutation 9 , 7 , 4 will be three pairs: p=1 , q=2 (9>7 ); p=1 , q=3 (9>4 ) and p=2 , q=3 (7>4 ).
We will be more interested in the number of inversions in a permutation, rather than the inversion itself.
Let be a square matrix of order n by n over the field of real (or complex) numbers. Let be the set of all permutations of order n of the set . The set contains n! permutations. Let's denote the kth permutation of the set as , and the number of inversions in the kth permutation as .
Definition.
Matrix determinant And there is a number equal to .
Let's describe this formula in words. The determinant of a square matrix of order n by n is the sum containing n! terms. Each term is a product of n elements of the matrix, and each product contains an element from each row and from each column of the matrix A. A coefficient (-1) appears before the kth term if the elements of the matrix A in the product are ordered by row number, and the number of inversions in the kth permutation of the set of column numbers is odd.
The determinant of a matrix A is usually denoted as , and det(A) is also used. You can also hear that the determinant is called the determinant.
So, .
This shows that the determinant of the matrix of the first order is the element of this matrix.
Calculating the Determinant of a Second-Order Square Matrix - Formula and Example.
about 2 by 2 in general.
In this case n=2 , hence n!=2!=2 .
.
We have
Thus, we have obtained a formula for calculating the determinant of a matrix of order 2 by 2, it has the form .
Example.
order.
Solution.
In our example . We apply the resulting formula :
Calculation of the determinant of a square matrix of the third order - formula and example.
Let's find the determinant of a square matrix about 3 by 3 in general.
In this case n=3 , hence n!=3!=6 .
Let's arrange in the form of a table the necessary data for applying the formula .
We have
Thus, we have obtained a formula for calculating the determinant of a matrix of order 3 by 3, it has the form
Similarly, one can obtain formulas for calculating the determinants of matrices of order 4 by 4, 5 by 5 and higher. They will look very bulky.
Example.
Compute Determinant of Square Matrix about 3 by 3.
Solution.
In our example
We apply the resulting formula to calculate the determinant of a third-order matrix:
Formulas for calculating the determinants of square matrices of the second and third orders are very often used, so we recommend that you remember them.
Properties of a matrix determinant, calculation of a matrix determinant using properties.
Based on the above definition, the following are true. matrix determinant properties.
- by elements of the 3rd row,
- by the elements of the 2nd column.
The determinant of the matrix A is equal to the determinant of the transposed matrix A T , that is, .
Example.
Make sure the matrix determinant is equal to the determinant of the transposed matrix.
Solution.
Let's use the formula to calculate the determinant of a matrix of order 3 by 3:
We transpose matrix A:
Calculate the determinant of the transposed matrix:
Indeed, the determinant of the transposed matrix is equal to the determinant of the original matrix.
If in a square matrix all elements of at least one of the rows (one of the columns) are zero, the determinant of such a matrix is equal to zero.
Example.
Check that the matrix determinant order 3 by 3 is zero.
Solution.
Indeed, the determinant of a matrix with a zero column is zero.
If you swap any two rows (columns) in a square matrix, then the determinant of the resulting matrix will be opposite to the original one (that is, the sign will change).
Example.
Given two square matrices of order 3 by 3 And
. Show that their determinants are opposite.
Solution.
Matrix B is obtained from matrix A by replacing the third row with the first, and the first with the third. According to the considered property, the determinants of such matrices must differ in sign. Let's check this by calculating the determinants using a well-known formula.
Really, .
If at least two rows (two columns) are the same in a square matrix, then its determinant is equal to zero.
Example.
Show that the matrix determinant equals zero.
Solution.
In this matrix, the second and third columns are the same, so, according to the considered property, its determinant must be equal to zero. Let's check it out.
In fact, the determinant of a matrix with two identical columns is zero.
If in a square matrix all the elements of any row (column) are multiplied by some number k, then the determinant of the resulting matrix will be equal to the determinant of the original matrix, multiplied by k. For example,
Example.
Prove that the matrix determinant is equal to three times the determinant of the matrix
.
Solution.
The elements of the first column of matrix B are obtained from the corresponding elements of the first column of matrix A by multiplying by 3. Then, by virtue of the considered property, the equality should hold. Let's check this by calculating the determinants of the matrices A and B.
Therefore, , which was to be proved.
NOTE.
Do not confuse or confuse the concepts of matrix and determinant! The considered property of the determinant of a matrix and the operation of multiplying a matrix by a number are far from the same thing. , But
.
If all elements of any row (column) of a square matrix are the sum of s terms (s is a natural number greater than one), then the determinant of such a matrix will be equal to the sum of s determinants of matrices obtained from the original one, if as elements of the row (column) leave one term at a time. For example,
Example.
Prove that the determinant of a matrix is equal to the sum of the determinants of the matrices .
Solution.
In our example , therefore, due to the considered property of the matrix determinant, the equality
. We check it by calculating the corresponding determinants of matrices of order 2 by 2 using the formula
.
From the results obtained, it can be seen that . This completes the proof.
If we add to the elements of some row (column) of the matrix the corresponding elements of another row (column), multiplied by an arbitrary number k, then the determinant of the resulting matrix will be equal to the determinant of the original matrix.
Example.
Make sure that if the elements of the third column of the matrix add the corresponding elements of the second column of this matrix, multiplied by (-2), and add the corresponding elements of the first column of the matrix, multiplied by an arbitrary real number, then the determinant of the resulting matrix will be equal to the determinant of the original matrix.
Solution.
If we start from the considered property of the determinant, then the determinant of the matrix obtained after all the transformations indicated in the problem will be equal to the determinant of the matrix A.
First, we calculate the determinant of the original matrix A:
Now let's perform the necessary transformations of the matrix A.
Let's add to the elements of the third column of the matrix the corresponding elements of the second column of the matrix, having previously multiplied them by (-2) . After that, the matrix will look like:
To the elements of the third column of the resulting matrix, we add the corresponding elements of the first column, multiplied by:
Calculate the determinant of the resulting matrix and make sure that it is equal to the determinant of the matrix A, that is, -24:
The determinant of a square matrix is \u200b\u200bthe sum of the products of the elements of any row (column) by their algebraic additions.
Here is the algebraic complement of the matrix element , .
This property allows computing determinants of matrices of order higher than 3 by 3 by reducing them to the sum of several determinants of order matrices one lower. In other words, this is a recurrent formula for calculating the determinant of a square matrix of any order. We recommend that you remember it due to its fairly frequent applicability.
Let's look at a few examples.
Example.
order 4 by 4, expanding it
Solution.
We use the formula for expanding the determinant by the elements of the 3rd row
We have
So the problem of finding the determinant of a matrix of order 4 by 4 was reduced to the calculation of three determinants of matrices of order 3 by 3:
Substituting the obtained values, we arrive at the result:
We use the formula for expanding the determinant by the elements of the 2nd column
and we act in the same way.
We will not describe in detail the calculation of the determinants of matrices of the third order.
Example.
Compute Matrix Determinant about 4 by 4.
Solution.
You can decompose the matrix determinant into elements of any column or any row, but it is more beneficial to choose the row or column that contains the largest number of zero elements, as this will help to avoid unnecessary calculations. Let's expand the determinant by the elements of the first row:
We calculate the obtained determinants of matrices of order 3 by 3 according to the formula known to us:
We substitute the results and get the desired value
Example.
Compute Matrix Determinant about 5 by 5.
Solution.
The fourth row of the matrix has the largest number of zero elements among all rows and columns, so it is advisable to expand the matrix determinant precisely by the elements of the fourth row, since in this case we need less calculations.
The obtained determinants of matrices of the order 4 by 4 were found in the previous examples, so we will use the ready-made results:
Example.
Compute Matrix Determinant about 7 by 7 .
Solution.
You should not immediately rush to decompose the determinant by the elements of any row or column. If you look closely at the matrix, you will notice that the elements of the sixth row of the matrix can be obtained by multiplying the corresponding elements of the second row by two. That is, if we add the corresponding elements of the second row multiplied by (-2) to the elements of the sixth row, then the determinant will not change due to the seventh property, and the sixth row of the resulting matrix will consist of zeros. The determinant of such a matrix is equal to zero by the second property.
Answer:
It should be noted that the considered property allows one to calculate the determinants of matrices of any order, however, one has to perform a lot of computational operations. In most cases, it is more advantageous to find the determinant of matrices of order higher than the third by the Gauss method, which we will consider below.
The sum of the products of the elements of any row (column) of a square matrix and the algebraic complements of the corresponding elements of another row (column) is equal to zero.
Example.
Show that the sum of the products of the elements of the third column of the matrix on algebraic complements of the corresponding elements of the first column is equal to zero.
Solution.
The determinant of the product of square matrices of the same order is equal to the product of their determinants, that is, , where m is a natural number greater than one, A k , k=1,2,…,m are square matrices of the same order.
Example.
Make sure that the determinant of the product of two matrices and is equal to the product of their determinants.
Solution.
Let us first find the product of the determinants of the matrices A and B:
Now let's perform matrix multiplication and calculate the determinant of the resulting matrix:
Thus, , which was to be shown.
Calculation of the matrix determinant by the Gauss method.
Let us describe the essence of this method. Using elementary transformations, the matrix A is reduced to such a form that in the first column all elements except for become zero (this is always possible if the determinant of the matrix A is nonzero). We will describe this procedure a little later, but now we will explain why this is done. Zero elements are obtained in order to obtain the simplest expansion of the determinant over the elements of the first column. After such a transformation of the matrix A, taking into account the eighth property and , we obtain
Where - minor (n-1)-th order, obtained from matrix A by deleting the elements of its first row and first column.
With the matrix to which the minor corresponds, the same procedure for obtaining zero elements in the first column is done. And so on until the final calculation of the determinant.
Now it remains to answer the question: "How to get null elements in the first column"?
Let's describe the algorithm of actions.
If , then the elements of the first row of the matrix are added to the corresponding elements of the kth row, in which . (If without exception all the elements of the first column of the matrix A are zero, then its determinant is zero by the second property and no Gaussian method is needed). After such a transformation, the "new" element will be different from zero. The determinant of the "new" matrix will be equal to the determinant of the original matrix due to the seventh property.
Now we have a matrix that has . When to the elements of the second row, we add the corresponding elements of the first row, multiplied by , to the elements of the third row, the corresponding elements of the first row, multiplied by . And so on. In conclusion, to the elements of the nth row, we add the corresponding elements of the first row, multiplied by . So the transformed matrix A will be obtained, all elements of the first column of which, except for , will be zero. The determinant of the resulting matrix will be equal to the determinant of the original matrix due to the seventh property.
Let's analyze the method when solving an example, so it will be clearer.
Example.
Calculate the determinant of a matrix of order 5 by 5 .
Solution.
Let's use the Gauss method. Let's transform the matrix A so that all elements of its first column, except for , become zero.
Since the element is initially , then we add to the elements of the first row of the matrix the corresponding elements, for example, the second row, since:
The "~" sign means equivalence.
Now we add to the elements of the second row the corresponding elements of the first row, multiplied by , to the elements of the third row - the corresponding elements of the first row, multiplied by
, and proceed similarly up to the sixth line:
We get
with matrix we carry out the same procedure for obtaining zero elements in the first column:
Hence,
Now we perform transformations with the matrix :
Comment.
At some stage of the matrix transformation by the Gauss method, a situation may arise when all elements of the last few rows of the matrix become zero. This will talk about the equality of the determinant to zero.
Summarize.
The determinant of a square matrix whose elements are numbers is a number. We have considered three ways to calculate the determinant:
- through the sum of products of combinations of matrix elements;
- through the expansion of the determinant by the elements of the row or column of the matrix;
- the method of reducing the matrix to the upper triangular one (by the Gauss method).
Formulas were obtained for calculating the determinants of matrices of order 2 by 2 and 3 by 3 .
We have analyzed the properties of the matrix determinant. Some of them allow you to quickly understand that the determinant is zero.
When calculating the determinants of matrices of order higher than 3 by 3, it is advisable to use the Gauss method: perform elementary transformations of the matrix and bring it to the upper triangular one. The determinant of such a matrix is equal to the product of all elements on the main diagonal.
Recall Laplace's theorem:
Laplace's theorem:
Let k rows (or k columns) be arbitrarily chosen in the determinant d of order n, . Then the sum of the products of all k-th order minors contained in the selected rows and their algebraic complements is equal to the determinant d.
To calculate the determinants in the general case, k is taken equal to 1. That is, in the determinant d of order n, a row (or column) is arbitrarily chosen. Then the sum of the products of all elements contained in the selected row (or column) and their algebraic complements is equal to the determinant d.
Example:
Compute determinant
Solution:
Let's choose an arbitrary row or column. For a reason that will become apparent a little later, we will limit our choice to either the third row or the fourth column. And stop at the third line.
Let's use Laplace's theorem.
The first element of the selected row is 10, it is in the third row and first column. Let us calculate the algebraic complement to it, i.e. find the determinant obtained by deleting the column and row on which this element stands (10) and find out the sign.
"plus if the sum of the numbers of all rows and columns in which the minor M is located is even, and minus if this sum is odd."
And we took the minor consisting of one single element 10, which is in the first column of the third row.
So:
The fourth term of this sum is 0, which is why it is worth choosing rows or columns with the maximum number of zero elements.
Answer: -1228
Example:
Calculate the determinant:
Solution:
Let's choose the first column, because two elements in it are equal to 0. Let's expand the determinant in the first column.
We expand each of the third-order determinants in terms of the first and second rows
We expand each of the second-order determinants in the first column
Answer: 48
Comment: when solving this problem, formulas for calculating the determinants of the 2nd and 3rd orders were not used. Only expansion by row or column was used. Which leads to lowering the order of the determinants.