Quadratic matrix online. Some properties of operations on matrices. Matrix expressions

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 actions 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 consider the practical application of properties on specific examples, and if you need a rigorous theory, please use another source of information.

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

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

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

In this case, the following property is true: if an arbitrary matrix is ​​multiplied on the left or right by the identity matrix suitable sizes, then the result is 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 number 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 the 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 among the elements of the matrix there will appear decimals, 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 independent decision:

Example 5

Calculate if

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

What technical 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 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 “tse”: ;

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

The solution algorithm is 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 case 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 it's special case multiplication of 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 to 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 is valid: 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 work almost the same way! With the difference that the main characters are matrices. Plus some specific matrix operations, such as transposing and finding inverse 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. Please note that the transpose operation has more high priority than multiplication. Parentheses, as in numerical expressions, change the order of actions: – here the 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 ones tests, and we'll start with the simplest:

Example 9

Given matrices . Find:

Solution: the order of actions is obvious, first multiplication is performed, 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: the action cannot be performed, .

43. Instead of constructing a sequence for an arbitrary one, we can directly construct a sequence of powers of the matrix. This has the advantage that, having we can obtain using a single matrix multiplication. Therefore, we can construct a sequence and get

If all are different, then the degree of the matrix is ​​dominated by the term so that all rows become parallel and all columns become parallel. The rate of convergence is determined by the rate at which it tends to zero. Consequently, a relatively small number of iterations are required even when fairly poorly separated.

In general, sequential matrices will either increase or decrease in size, and even with floating point calculations, overflows or machine nulls are possible. This can be easily avoided by multiplying each matrix by a power of two so that the largest element in modulus is of order zero. This does not introduce additional rounding errors. The number of iterations required for the disappearance of the component with the accepted accuracy, when working with powers of the matrix and with the simple power method, respectively, is determined from the inequalities

If A does not contain any significant number of zeros, then squaring the matrix requires times more work than simple iteration. Therefore, squaring matrices is beneficial if

For a given division of eigenvalues, squaring is less advantageous for large values. On the contrary, for a fixed value, squaring is more advantageous if eigenvalues and poorly separated. If A is symmetric, then all powers of A are also symmetric, so we have a gain from symmetry when raising to a power, but in a simple iterative process there is no gain from symmetry.

For example, the case requires 15 squaring steps or about the steps of a simple power process to destroy the components with working accuracy. Consequently, squaring is more profitable for matrices up to approximately the 2000th order, and for a matrix of the 100th order, squaring is almost 20 times more profitable.

However, this comparison of methods is somewhat questionable for two reasons.

(i) It is unlikely that we would carry out 28,000 steps of a simple power-law process without using some method for accelerating convergence, and methods for accelerating convergence are difficult to apply to the matrix squaring process.

(ii) Most matrices of order greater than 50 encountered in practice usually contain many zeros. This property breaks down when raised to a power, and hence our estimates of the quantity necessary work in two processes are not real.

It should be noted that this operation can only be performed square matrices. Equal number rows and columns – required condition to raise a matrix to a power. During the calculation, the matrix will be multiplied by itself the required number of times.

The 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 series simple actions. 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.

How to insert mathematical formulas to the website?

If you ever need to add one or two mathematical formulas to a web page, then the easiest way to do this is as described in the article: mathematical formulas are easily inserted onto the site in the form of pictures that are automatically generated by Wolfram Alpha. Besides simplicity, this universal method will help improve website visibility search engines. It has been working for a long time (and, I think, will work forever), but is already morally outdated.

If you constantly use mathematical formulas on your site, then I recommend you use MathJax - special library JavaScript, which displays mathematical notation in web browsers using MathML, LaTeX, or ASCIIMathML markup.

There are two ways to get started using MathJax: (1) using simple code you can quickly connect the MathJax script to your website, which will be automatically loaded from remote server(list of servers); (2) download the MathJax script from a remote server to your server and connect it to all pages of your site. The second method - more complex and time-consuming - will speed up the loading of your site's pages, and if the parent MathJax server becomes temporarily unavailable for some reason, this will not affect your own site in any way. Despite these advantages, I chose the first method as it is simpler, faster and does not require technical skills. Follow my example, and in just 5 minutes you will be able to use all the features of MathJax on your site.

You can connect the MathJax library script from a remote server using two code options taken from the main MathJax website or on the documentation page:

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 tracks and loads latest versions 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 for inserting third-party JavaScript code, copy the first or second version of the loading 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.

Any fractal is constructed according to a certain rule, which is consistently applied unlimited amount once. Each such time is called an iteration.

The iterative algorithm for constructing a Menger sponge is quite simple: the original cube with side 1 is divided by planes parallel to its faces into 27 equal cubes. One central cube and 6 cubes adjacent to it along the faces are removed from it. The result is a set consisting of the remaining 20 smaller cubes. Doing the same with each of these cubes, we get a set consisting of 400 smaller cubes. Continuing this process endlessly, we get a Menger sponge.