Raising a matrix to the power n. Matrix exponentiation online

Linear algebra for dummies

To study linear algebra, you can read and delve into the book “Matrices and Determinants” by I. V. Belousov. However, it is written in strict and dry mathematical language, which is difficult for people with average intelligence to perceive. Therefore, I made a retelling of the most difficult to understand parts of this book, trying to present the material as clearly as possible, using drawings as much as possible. I have omitted the proofs of the theorems. Frankly, I didn’t delve into them myself. I believe Mr. Belousov! Judging by his work, he is a competent and intelligent mathematician. You can download his book at http://eqworld.ipmnet.ru/ru/library/books/Belousov2006ru.pdf If you are going to delve into my work, you need to do this, because I will often refer to Belousov.

Let's start with definitions. What is a matrix? This is a rectangular table of numbers, functions or algebraic expressions. Why are matrices needed? They greatly facilitate complex mathematical calculations. The matrix can have rows and columns (Fig. 1).

Rows and columns are numbered starting from the left

from above (Fig. 1-1). When they say: a matrix of size m n (or m by n), they mean m number of lines, and under n number of columns. For example, the matrix in Figure 1-1 is 4 by 3, not 3 by 4.

Look at fig. 1-3, what matrices are there. If a matrix consists of one row, it is called a row matrix, and if it consists of one column, then it is called a column matrix. A matrix is ​​called square of order n if the number of rows is equal to the number of columns and equal to n. If all elements of a matrix are zero, then it is a zero matrix. A square matrix is ​​called diagonal if all its elements are equal to zero, except those located on the main diagonal.

I’ll immediately explain what the main diagonal is. The row and column numbers on it are the same. It goes from left to right from top to bottom. (Fig. 3) Elements are called diagonal if they are located on the main diagonal. If all diagonal elements are equal to one (and the rest are equal to zero), the matrix is ​​called identity. Two matrices A and B of the same size are said to be equal if all their elements are the same.

2 Operations on matrices and their properties

The product of a matrix and a number x is a matrix of the same size. To obtain this product, you need to multiply each element by this number (Figure 4). To get the sum of two matrices of the same size, you need to add their corresponding elements (Fig. 4). To get the difference A - B of two matrices of the same size, you need to multiply matrix B by -1 and add the resulting matrix with matrix A (Fig. 4). For operations on matrices the following properties are valid: A+B=B+A (commutativity property).

(A + B)+C = A+(B + C) (associativity property). Simply put, changing the places of the terms does not change the sum. The following properties apply to operations on matrices and numbers:

(denote the numbers by the letters x and y, and the matrices by the letters A and B) x(yA)=(xy)A

These properties are similar to the properties that apply to operations on numbers. Look

examples in Figure 5. Also see examples 2.4 - 2.6 from Belousov on page 9.

Matrix multiplication.

The multiplication of two matrices is defined only if (translated into Russian: matrices can be multiplied only if) when the number of columns of the first matrix in the product is equal to the number of rows of the second (Fig. 7, above, blue brackets). To help you remember: the number 1 is more like a column. The result of multiplication is a matrix of size (see Figure 6). To make it easier to remember what needs to be multiplied by what, I propose the following algorithm: look at Figure 7. Multiply matrix A by matrix B.

matrix A two columns,

Matrix B has two rows - you can multiply.

1) Let’s deal with the first column of matrix B (it’s the only one it has). We write this column into a line (transpose

column about transposition below).

2) We copy this line so that we get a matrix the size of matrix A.

3) We multiply the elements of this matrix by the corresponding elements of matrix A.

4) We add up the resulting products in each line and get a product matrix of two rows and one column.

Figure 7-1 shows examples of multiplying matrices that are larger in size.

1) Here the first matrix has three columns, which means the second must have three rows. The algorithm is exactly the same as in the previous example, only here there are three terms in each line, not two.

2) Here the second matrix has two columns. First we perform the algorithm with the first column, then with the second, and we get a “two by two” matrix.

3) Here the second matrix has a column consisting of one element; the column will not change due to transposition. And there is no need to add anything, since the first matrix has only one column. We perform the algorithm three times and get a three-by-three matrix.

The following properties take place:

1. If the sum B + C and the product AB exist, then A (B + C) = AB + AC

2. If the product AB exists, then x (AB) = (xA) B = A (xB).

3. If the products AB and BC exist, then A (BC) = (AB) C.

If the matrix product AB exists, then the matrix product BA may not exist. Even if the products AB and BA exist, they may turn out to be matrices of different sizes.

Both products AB and BA exist and are matrices of the same size only in the case of square matrices A and B of the same order. However, even in this case, AB may not equal BA.

Exponentiation

Raising a matrix to a power only makes sense for square matrices (think why?). Then the positive integer power m of the matrix A is the product of m matrices equal to A. The same as for numbers. By zero degree of a square matrix A we mean an identity matrix of the same order as A. If you have forgotten what an identity matrix is, look at Fig. 3.

Just like with numbers, the following relationships hold:

A mA k=A m+k (A m)k=A mk

See examples from Belousov on page 20.

Transposing matrices

Transpose is the transformation of matrix A to matrix AT,

in which the rows of matrix A are written to the columns AT while maintaining order. (Fig. 8). You can say it another way:

The columns of matrix A are written into the rows of matrix AT, preserving the order. Notice how the transposition changes the size of the matrix, that is, the number of rows and columns. Also note that the elements on the first row, first column, and last row, last column remain in place.

The following properties hold: (AT )T =A (transpose

matrix twice - you get the same matrix)

(xA)T =xAT (by x we ​​mean a number, by A, of course, a matrix) (if you need to multiply a matrix by a number and transpose, you can first multiply, then transpose, or vice versa)

(A+B)T = AT +BT (AB)T =BT AT

Symmetric and antisymmetric matrices

Figure 9, top left, shows a symmetrical matrix. Its elements, symmetrical relative to the main diagonal, are equal. And now the definition: Square matrix

A is called symmetric if AT =A. That is, a symmetric matrix does not change when transposed. In particular, any diagonal matrix is ​​symmetric. (Such a matrix is ​​shown in Fig. 2).

Now look at the antisymmetric matrix (Fig. 9, below). How does it differ from symmetrical? Note that all of its diagonal elements are zero. Antisymmetric matrices have all diagonal elements equal to zero. Think why? Definition: A square matrix A is called

antisymmetric if AT = -A. Let us note some properties of operations on symmetric and antisymmetric

matrices. 1. If A and B are symmetric (antisymmetric) matrices, then A + B is a symmetric (antisymmetric) matrix.

2.If A is a symmetric (antisymmetric) matrix, then xA is also a symmetric (antisymmetric) matrix. (in fact, if you multiply the matrices from Figure 9 by some number, the symmetry will still be preserved)

3. The product AB of two symmetric or two antisymmetric matrices A and B is a symmetric matrix for AB = BA and antisymmetric for AB =-BA.

4. If A is a symmetric matrix, then A m (m = 1, 2, 3, . . .) is a symmetric matrix. If A

An antisymmetric matrix, then Am (m = 1, 2, 3, ...) is a symmetric matrix for even m and antisymmetric for odd.

5. An arbitrary square matrix A can be represented as a sum of two matrices. (let's call these matrices, for example A(s) and A(a) )

A=A (s)+A (a)

Matrix A -1 is called the inverse matrix with respect to matrix A if A*A -1 = E, where E is the identity matrix of the nth order. An inverse matrix can only exist for square matrices.

Purpose of the service. Using this service online you can find algebraic complements, transposed matrix A T, allied matrix and inverse matrix. The decision is carried out directly on the website (online) and is free. The calculation results are presented in a report in Word and Excel format (i.e., it is possible to check the solution). see design example.

Instructions. To obtain a solution, it is necessary to specify the dimension of the matrix. Next, fill out matrix A in the new dialog box.

See also Inverse matrix using the Jordano-Gauss method

Algorithm for finding the inverse matrix

  1. Finding the transposed matrix A T .
  2. Definition of algebraic complements. Replace each element of the matrix with its algebraic complement.
  3. Compiling an inverse matrix from algebraic additions: each element of the resulting matrix is ​​divided by the determinant of the original matrix. The resulting matrix is ​​the inverse of the original matrix.
Next algorithm for finding the inverse matrix similar to the previous one except for some steps: first the algebraic complements are calculated, and then the allied matrix C is determined.
  1. Determine whether the matrix is ​​square. If not, then there is no inverse matrix for it.
  2. Calculation of the determinant of the matrix A. If it is not equal to zero, we continue the solution, otherwise the inverse matrix does not exist.
  3. Definition of algebraic complements.
  4. Filling out the union (mutual, adjoint) matrix C .
  5. Compiling an inverse matrix from algebraic additions: each element of the adjoint matrix C is divided by the determinant of the original matrix. The resulting matrix is ​​the inverse of the original matrix.
  6. They do a check: they multiply the original and the resulting matrices. The result should be an identity matrix.

Example No. 1. Let's write the matrix in the form:

Algebraic additions. ∆ 1.2 = -(2·4-(-2·(-2))) = -4 ∆ 2.1 = -(2 4-5 3) = 7 ∆ 2.3 = -(-1 5-(-2 2)) = 1 ∆ 3.2 = -(-1·(-2)-2·3) = 4
A -1 =
0,6 -0,4 0,8
0,7 0,2 0,1
-0,1 0,4 -0,3

Another algorithm for finding the inverse matrix

Let us present another scheme for finding the inverse matrix.
  1. Find the determinant of a given square matrix A.
  2. We find algebraic complements to all elements of the matrix A.
  3. We write algebraic additions of row elements to columns (transposition).
  4. We divide each element of the resulting matrix by the determinant of the matrix A.
As we see, the transposition operation can be applied both at the beginning, on the original matrix, and at the end, on the resulting algebraic additions.

A special case: The inverse of the identity matrix E is the identity matrix E.

Some properties of operations on matrices.
Matrix Expressions

And now there will be a continuation of the topic, in which we will consider not only new material, but also work out operations with matrices.

Some properties of operations on matrices

There are quite a lot of properties that relate to operations with matrices; in the same Wikipedia you can admire the orderly ranks of the corresponding rules. However, in practice, many properties are in a certain sense “dead”, since only a few of them are used in solving real problems. My goal is to look at the practical application of the properties with specific examples, and if you need a rigorous theory, please use another source of information.

Let's look at some exceptions to the rule, which will be required to complete practical tasks.

If a square matrix has inverse matrix, then their multiplication is commutative:

Identity matrix is called a square matrix whose main diagonal units are located, and the remaining elements are equal to zero. For example: , etc.

Wherein the following property is true: if an arbitrary matrix is ​​multiplied left or right onto an identity matrix of suitable sizes, then the result will be the original matrix:

As you can see, the commutativity of matrix multiplication also takes place here.

Let's take some matrix, well, let's say, the matrix from the previous problem: .

Those interested can check and make sure that:

The unit matrix for matrices is an analogue of the numerical unit for numbers, which is especially clear from the examples just discussed.

Commutativity of a numerical factor with respect to matrix multiplication

For matrices and real numbers the following property holds:

That is, the numerical factor can (and should) be moved forward so that it “does not interfere” with multiplying matrices.

Note : generally speaking, the formulation of the property is incomplete - the “lambda” can be placed anywhere between the matrices, even at the end. The rule remains valid if three or more matrices are multiplied.

Example 4

Calculate product

Solution:

(1) According to property move the numerical factor forward. The matrices themselves cannot be rearranged!

(2) – (3) Perform matrix multiplication.

(4) Here you can divide each number by 10, but then decimal fractions will appear among the elements of the matrix, which is not good. However, we notice that all numbers in the matrix are divisible by 5, so we multiply each element by .

Answer:

A little charade for you to solve on your own:

Example 5

Calculate if

The solution and answer are at the end of the lesson.

What technique is important when solving such examples? Let's figure out the numbers last of all .

Let's attach another carriage to the locomotive:

How to multiply three matrices?

First of all, WHAT should be the result of multiplying three matrices? A cat will not give birth to a mouse. If matrix multiplication is feasible, then the result will also be a matrix. Hmmm, well, my algebra teacher doesn’t see how I explain the closedness of the algebraic structure relative to its elements =)

The product of three matrices can be calculated in two ways:

1) find and then multiply by the matrix “ce”: ;

2) either first find , then multiply .

The results will definitely coincide, and in theory this property is called associativity of matrix multiplication:

Example 6

Multiply matrices in two ways

Algorithm solutions two-step: we find the product of two matrices, then again we find the product of two matrices.

1) Use the formula

Action one:

Act two:

2) Use the formula

Action one:

Act two:

Answer:

The first solution is, of course, more familiar and standard, where “everything seems to be in order.” By the way, regarding the order. In the task under consideration, the illusion often arises that we are talking about some kind of permutations of matrices. They are not here. I remind you again that in general IT IS IMPOSSIBLE TO REVERSE MATRICES. So, in the second paragraph, in the second step, we perform multiplication, but in no case do . With ordinary numbers such a number would work, but with matrices it would not.

The property of associative multiplication is true not only for square, but also for arbitrary matrices - as long as they are multiplied:

Example 7

Find the product of three matrices

This is an example for you to solve on your own. In the sample solution, the calculations are carried out in two ways; analyze which path is more profitable and shorter.

The associativity property of matrix multiplication also applies to a larger number of factors.

Now is the time to return to powers of matrices. The square of the matrix is ​​considered at the very beginning and the question on the agenda is:

How to cube a matrix and higher powers?

These operations are also defined only for square matrices. To cube a square matrix, you need to calculate the product:

In fact, this is a special case of multiplying three matrices, according to the associativity property of matrix multiplication: . And a matrix multiplied by itself is the square of the matrix:

Thus, we get the working formula:

That is, the task is performed in two steps: first, the matrix must be squared, and then the resulting matrix must be multiplied by the matrix.

Example 8

Construct the matrix into a cube.

This is a small problem to solve on your own.

Raising a matrix to the fourth power is carried out in a natural way:

Using the associativity of matrix multiplication, we derive two working formulas. Firstly: – this is the product of three matrices.

1) . In other words, we first find , then multiply it by “be” - we get a cube, and finally, we perform the multiplication again - there will be a fourth power.

2) But there is a solution one step shorter: . That is, in the first step we find a square and, bypassing the cube, perform multiplication

Additional task for Example 8:

Raise the matrix to the fourth power.

As just noted, this can be done in two ways:

1) Since the cube is known, then we perform multiplication.

2) However, if according to the conditions of the problem it is required to construct a matrix only to the fourth power, then it is advantageous to shorten the path - find the square of the matrix and use the formula.

Both solutions and the answer are at the end of the lesson.

Similarly, the matrix is ​​raised to the fifth and higher powers. From practical experience I can say that sometimes I come across examples of raising to the 4th power, but I don’t remember anything about the fifth power. But just in case, I will give the optimal algorithm:

1) find ;
2) find ;
3) raise the matrix to the fifth power: .

These are, perhaps, all the basic properties of matrix operations that can be useful in practical problems.

In the second section of the lesson, an equally colorful crowd is expected.

Matrix Expressions

Let's repeat the usual school expressions with numbers. A numeric expression consists of numbers, mathematical symbols, and parentheses, for example: . When calculating, the familiar algebraic priority applies: first, brackets, then executed exponentiation/rooting, Then multiplication/division and last but not least - addition/subtraction.

If a numeric expression makes sense, then the result of its evaluation is a number, For example:

Matrix Expressions are arranged almost the same way! With the difference that the main characters are matrices. Plus some specific matrix operations, such as transposing and finding the inverse of a matrix.

Consider the matrix expression , where are some matrices. In this matrix expression, three terms and addition/subtraction operations are performed last.

In the first term, you first need to transpose the matrix “be”: , then perform the multiplication and enter the “two” into the resulting matrix. note that the transpose operation has higher priority than multiplication. Parentheses, as in numerical expressions, change the order of actions: - here, multiplication is performed first, then the resulting matrix is ​​transposed and multiplied by 2.

In the second term, matrix multiplication is performed first, and the inverse matrix is ​​found from the product. If you remove the brackets: , then you first need to find the inverse matrix and then multiply the matrices: . Finding the inverse of a matrix also takes precedence over multiplication.

With the third term, everything is obvious: we raise the matrix into a cube and enter the “five” into the resulting matrix.

If a matrix expression makes sense, then the result of its evaluation is a matrix.

All tasks will be from real tests, and we will start with the simplest:

Example 9

Given matrices . Find:

Solution: The order of operations is obvious, multiplication is performed first, then addition.


Addition cannot be performed because the matrices are of different sizes.

Don’t be surprised; obviously impossible actions are often proposed in tasks of this type.

Let's try to calculate the second expression:

Everything is fine here.

Answer: action cannot be performed, .

Here we will continue the topic of operations on matrices started in the first part and look at a couple of examples in which several operations will need to be applied at once.

Raising a matrix to a power.

Let k be a non-negative integer. For any square matrix $A_(n\times n)$ we have: $$ A^k=\underbrace(A\cdot A\cdot \ldots \cdot A)_(k \; times) $$

In this case, we assume that $A^0=E$, where $E$ is the identity matrix of the corresponding order.

Example No. 4

Given a matrix $ A=\left(\begin(array) (cc) 1 & 2 \\ -1 & -3 \end(array) \right)$. Find matrices $A^2$ and $A^6$.

According to the definition, $A^2=A\cdot A$, i.e. to find $A^2$ we just need to multiply the matrix $A$ by itself. The operation of matrix multiplication was discussed in the first part of the topic, so here we will simply write down the solution process without detailed explanations:

$$ A^2=A\cdot A=\left(\begin(array) (cc) 1 & 2 \\ -1 & -3 \end(array) \right)\cdot \left(\begin(array) (cc) 1 & 2 \\ -1 & -3 \end(array) \right)= \left(\begin(array) (cc) 1\cdot 1+2\cdot (-1) & 1\cdot 2 +2\cdot (-3) \\ -1\cdot 1+(-3)\cdot (-1) & -1\cdot 2+(-3)\cdot (-3) \end(array) \right )= \left(\begin(array) (cc) -1 & -4 \\ 2 & 7 \end(array) \right). $$

To find the matrix $A^6$ we have two options. Option one: it’s trivial to continue multiplying $A^2$ by the matrix $A$:

$$ A^6=A^2\cdot A\cdot A\cdot A\cdot A. $$

However, you can take a slightly simpler route, using the associativity property of matrix multiplication. Let's place parentheses in the expression for $A^6$:

$$ A^6=A^2\cdot A\cdot A\cdot A\cdot A=A^2\cdot (A\cdot A)\cdot (A\cdot A)=A^2\cdot A^2 \cdot A^2. $$

If solving the first method would require four multiplication operations, then the second method would require only two. Therefore, let's go the second way:

$$ A^6=A^2\cdot A^2\cdot A^2=\left(\begin(array) (cc) -1 & -4 \\ 2 & 7 \end(array) \right)\ cdot \left(\begin(array) (cc) -1 & -4 \\ 2 & 7 \end(array) \right)\cdot \left(\begin(array) (cc) -1 & -4 \\ 2 & 7 \end(array) \right)=\\= \left(\begin(array) (cc) -1\cdot (-1)+(-4)\cdot 2 & -1\cdot (-4 )+(-4)\cdot 7 \\ 2\cdot (-1)+7\cdot 2 & 2\cdot (-4)+7\cdot 7 \end(array) \right)\cdot \left(\ begin(array) (cc) -1 & -4 \\ 2 & 7 \end(array) \right)= \left(\begin(array) (cc) -7 & -24 \\ 12 & 41 \end( array) \right)\cdot \left(\begin(array) (cc) -1 & -4 \\ 2 & 7 \end(array) \right)=\\= \left(\begin(array) (cc ) -7\cdot(-1)+(-24)\cdot 2 & -7\cdot (-4)+(-24)\cdot 7 \\ 12\cdot (-1)+41\cdot 2 & 12 \cdot (-4)+41\cdot 7 \end(array) \right)= \left(\begin(array) (cc) -41 & -140 \\ 70 & 239 \end(array) \right). $$

Answer: $A^2=\left(\begin(array) (cc) -1 & -4 \\ 2 & 7 \end(array) \right)$, $A^6=\left(\begin(array) (cc) -41 & -140 \\ 70 & 239 \end(array) \right)$.

Example No. 5

Given matrices $ A=\left(\begin(array) (cccc) 1 & 0 & -1 & 2 \\ 3 & -2 & 5 & 0 \\ -1 & 4 & -3 & 6 \end(array) \right)$, $ B=\left(\begin(array) (ccc) -9 & 1 & 0 \\ 2 & -1 & 4 \\ 0 & -2 & 3 \\ 1 & 5 & 0 \end (array) \right)$, $ C=\left(\begin(array) (ccc) -5 & -20 & 13 \\ 10 & 12 & 9 \\ 3 & -15 & 8 \end(array) \ right)$. Find the matrix $D=2AB-3C^T+7E$.

We begin calculating the matrix $D$ by finding the result of the product $AB$. Matrices $A$ and $B$ can be multiplied, since the number of columns of matrix $A$ is equal to the number of rows of matrix $B$. Let's denote $F=AB$. In this case, the matrix $F$ will have three columns and three rows, i.e. will be square (if this conclusion does not seem obvious, see the description of matrix multiplication in the first part of this topic). Let's find the matrix $F$ by calculating all its elements:

$$ F=A\cdot B=\left(\begin(array) (cccc) 1 & 0 & -1 & 2 \\ 3 & -2 & 5 & 0 \\ -1 & 4 & -3 & 6 \ end(array) \right)\cdot \left(\begin(array) (ccc) -9 & 1 & 0 \\ 2 & -1 & 4 \\ 0 & -2 & 3 \\ 1 & 5 & 0 \ end(array) \right)\\ \begin(aligned) & f_(11)=1\cdot (-9)+0\cdot 2+(-1)\cdot 0+2\cdot 1=-7; \\ & f_(12)=1\cdot 1+0\cdot (-1)+(-1)\cdot (-2)+2\cdot 5=13; \\ & f_(13)=1\cdot 0+0\cdot 4+(-1)\cdot 3+2\cdot 0=-3;\\ \\ & f_(21)=3\cdot (-9 )+(-2)\cdot 2+5\cdot 0+0\cdot 1=-31;\\ & f_(22)=3\cdot 1+(-2)\cdot (-1)+5\cdot (-2)+0\cdot 5=-5;\\ & f_(23)=3\cdot 0+(-2)\cdot 4+5\cdot 3+0\cdot 0=7;\\ \\ & f_(31)=-1\cdot (-9)+4\cdot 2+(-3)\cdot 0+6\cdot 1=23; \\ & f_(32)=-1\cdot 1+4\cdot (-1)+(-3)\cdot (-2)+6\cdot 5=31;\\ & f_(33)=-1 \cdot 0+4\cdot 4+(-3)\cdot 3+6\cdot 0=7. \end(aligned) $$

So $F=\left(\begin(array) (ccc) -7 & 13 & -3 \\ -31 & -5 & 7 \\ 23 & 31 & 7 \end(array) \right)$. Let's go further. Matrix $C^T$ is the transposed matrix for matrix $C$, i.e. $ C^T=\left(\begin(array) (ccc) -5 & 10 & 3 \\ -20 & 12 & -15 \\ 13 & 9 & 8 \end(array) \right) $. As for the matrix $E$, it is the identity matrix. In this case, the order of this matrix is ​​three, i.e. $E=\left(\begin(array) (ccc) 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end(array) \right)$.

In principle, we can continue to go step by step, but it is better to consider the remaining expression as a whole, without being distracted by auxiliary actions. In fact, we are left with only the operations of multiplying matrices by a number, as well as the operations of addition and subtraction.

$$ D=2AB-3C^T+7E=2\cdot \left(\begin(array) (ccc) -7 & 13 & -3 \\ -31 & -5 & 7 \\ 23 & 31 & 7 \ end(array) \right)-3\cdot \left(\begin(array) (ccc) -5 & 10 & 3 \\ -20 & 12 & -15 \\ 13 & 9 & 8 \end(array) \ right)+7\cdot \left(\begin(array) (ccc) 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end(array) \right) $$

Let's multiply the matrices on the right side of the equality by the corresponding numbers (i.e. by 2, 3 and 7):

$$ 2\cdot \left(\begin(array) (ccc) -7 & 13 & -3 \\ -31 & -5 & 7 \\ 23 & 31 & 7 \end(array) \right)-3\ cdot \left(\begin(array) (ccc) -5 & 10 & 3 \\ -20 & 12 & -15 \\ 13 & 9 & 8 \end(array) \right)+7\cdot \left(\ begin(array) (ccc) 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end(array) \right)=\\= \left(\begin(array) (ccc) - 14 & 26 & -6 \\ -62 & -10 & 14 \\ 46 & 62 & 14 \end(array) \right)-\left(\begin(array) (ccc) -15 & 13 & 9 \\ -60 & 36 & -45 \\ 39 & 27 & 24 \end(array) \right)+\left(\begin(array) (ccc) 7 & 0 & 0 \\ 0 & 7 & 0 \\ 0 & 0 & 7 \end(array) \right) $$

Let's perform the last steps: subtraction and addition:

$$ \left(\begin(array) (ccc) -14 & 26 & -6 \\ -62 & -10 & 14 \\ 46 & 62 & 14 \end(array) \right)-\left(\begin (array) (ccc) -15 & 30 & 9 \\ -60 & 36 & -45 \\ 39 & 27 & 24 \end(array) \right)+\left(\begin(array) (ccc) 7 & 0 & 0 \\ 0 & 7 & 0 \\ 0 & 0 & 7 \end(array) \right)=\\ =\left(\begin(array) (ccc) -14-(-15)+7 & 26-30+0 & -6-9+0 \\ -62-(-60)+0 & -10-36+7 & 14-(-45)+0 \\ 46-39+0 & 62-27 +0 & 14-24+7 \end(array) \right)= \left(\begin(array) (ccc) 8 & -4 & -15 \\ -2 & -39 & 59 \\ 7 & 35 & -3 \end(array) \right). $$

Problem solved, $D=\left(\begin(array) (ccc) 8 & -4 & -15 \\ -2 & -39 & 59 \\ 7 & 35 & -3 \end(array) \right)$ .

Answer: $D=\left(\begin(array) (ccc) 8 & -4 & -15 \\ -2 & -39 & 59 \\ 7 & 35 & -3 \end(array) \right)$.

Example No. 6

Let $f(x)=2x^2+3x-9$ and matrix $ A=\left(\begin(array) (cc) -3 & 1 \\ 5 & 0 \end(array) \right) $. Find the value of $f(A)$.

If $f(x)=2x^2+3x-9$, then $f(A)$ is understood as the matrix:

$$ f(A)=2A^2+3A-9E. $$

This is how a polynomial from a matrix is ​​defined. So, we need to substitute the matrix $A$ into the expression for $f(A)$ and get the result. Since all the actions were discussed in detail earlier, here I will simply give the solution. If the process of performing the operation $A^2=A\cdot A$ is unclear to you, then I advise you to look at the description of matrix multiplication in the first part of this topic.

$$ f(A)=2A^2+3A-9E=2A\cdot A+3A-9E=2 \left(\begin(array) (cc) -3 & 1 \\ 5 & 0 \end(array) \right)\cdot \left(\begin(array) (cc) -3 & 1 \\ 5 & 0 \end(array) \right)+3 \left(\begin(array) (cc) -3 & 1 \\ 5 & 0 \end(array) \right)-9\left(\begin(array) (cc) 1 & 0 \\ 0 & 1 \end(array) \right)=\\ =2 \left( \begin(array) (cc) (-3)\cdot(-3)+1\cdot 5 & (-3)\cdot 1+1\cdot 0 \\ 5\cdot(-3)+0\cdot 5 & 5\cdot 1+0\cdot 0 \end(array) \right)+3 \left(\begin(array) (cc) -3 & 1 \\ 5 & 0 \end(array) \right)-9 \left(\begin(array) (cc) 1 & 0 \\ 0 & 1 \end(array) \right)=\\ =2 \left(\begin(array) (cc) 14 & -3 \\ - 15 & 5 \end(array) \right)+3 \left(\begin(array) (cc) -3 & 1 \\ 5 & 0 \end(array) \right)-9\left(\begin(array ) (cc) 1 & 0 \\ 0 & 1 \end(array) \right) =\left(\begin(array) (cc) 28 & -6 \\ -30 & 10 \end(array) \right) +\left(\begin(array) (cc) -9 & 3 \\ 15 & 0 \end(array) \right)-\left(\begin(array) (cc) 9 & 0 \\ 0 & 9 \ end(array) \right)=\left(\begin(array) (cc) 10 & -3 \\ -15 & 1 \end(array) \right). $$

Answer: $f(A)=\left(\begin(array) (cc) 10 & -3 \\ -15 & 1 \end(array) \right)$.

It should be noted that only square matrices can be used for this operation. An equal number of rows and columns is a prerequisite for raising a matrix to a power. During the calculation, the matrix will be multiplied by itself the required number of times.

This online calculator is designed to perform the operation of raising a matrix to a power. Thanks to its use, you will not only quickly cope with this task, but also get a clear and detailed idea of ​​the progress of the calculation itself. This will help to better consolidate the material obtained in theory. Having seen a detailed calculation algorithm in front of you, you will better understand all its subtleties and subsequently be able to avoid mistakes in manual calculations. In addition, it never hurts to double-check your calculations, and this is also best done here.

In order to raise a matrix to a power online, you will need a number of simple steps. First of all, specify the matrix size by clicking on the “+” or “-” icons to the left of it. Then enter the numbers in the matrix field. You also need to indicate the power to which the matrix is ​​raised. And then all you have to do is click on the “Calculate” button at the bottom of the field. The result obtained will be reliable and accurate if you carefully and correctly entered all the values. Along with it, you will be provided with a detailed transcript of the solution.