Finding the inverse matrix. Some properties of operations on matrices. Matrix expressions Square all negative elements of the matrix

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.

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 appropriate 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 in 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)$.

In July 2020, NASA launches an expedition to Mars. The spacecraft will deliver to Mars an electronic medium with the names of all registered expedition participants.


If this post solved your problem or you just liked it, share the link to it with your friends on social networks.

One of these code options needs to be copied and pasted into the code of your web page, preferably between tags and or immediately after the tag. According to the first option, MathJax loads faster and slows down the page less. But the second option automatically monitors and loads the latest versions of MathJax. If you insert the first code, it will need to be updated periodically. If you insert the second code, the pages will load more slowly, but you will not need to constantly monitor MathJax updates.

The easiest way to connect MathJax is in Blogger or WordPress: in the site control panel, add a widget designed to insert third-party JavaScript code, copy the first or second version of the download code presented above into it, and place the widget closer to the beginning of the template (by the way, this is not at all necessary , since the MathJax script is loaded asynchronously). That's all. Now learn the markup syntax of MathML, LaTeX, and ASCIIMathML, and you are ready to insert mathematical formulas into your site's web pages.

Another New Year's Eve... frosty weather and snowflakes on the window glass... All this prompted me to write again about... fractals, and what Wolfram Alpha knows about it. There is an interesting article on this subject, which contains examples of two-dimensional fractal structures. Here we will look at more complex examples of three-dimensional fractals.

A fractal can be visually represented (described) as a geometric figure or body (meaning that both are a set, in this case, a set of points), the details of which have the same shape as the original figure itself. That is, this is a self-similar structure, examining the details of which when magnified, we will see the same shape as without magnification. Whereas in the case of an ordinary geometric figure (not a fractal), upon magnification we will see details that have a simpler shape than the original figure itself. For example, at a high enough magnification, part of an ellipse looks like a straight line segment. This does not happen with fractals: with any increase in them, we will again see the same complex shape, which will be repeated again and again with each increase.

Benoit Mandelbrot, the founder of the science of fractals, wrote in his article Fractals and Art in the Name of Science: “Fractals are geometric shapes that are as complex in their details as in their overall form. That is, if part of the fractal will be enlarged to the size of the whole, it will appear as a whole, either exactly, or perhaps with a slight deformation."

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 by m the number of rows, and by n the 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) Copy this line so that we get a matrix the size of matrix A.

3) Multiply the elements of this matrix by the corresponding elements of matrix A.

4) We add the resulting products in each row 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 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)