Transposing a 3 by 3 matrix. Transposing a matrix in Microsoft Excel

Transposing matrices

Matrix transposition is called replacing the rows of a matrix with its columns while maintaining their order (or, which is the same, replacing the columns of a matrix with its rows).

Let the original matrix be given A:

Then, by definition, the transposed matrix A" has the form:


A shortened form of notation for the operation of transposing a matrix: A transposed matrix is ​​often denoted

Example 3. Let matrices be given A and B:


Then the corresponding transposed matrices have the form:

It is easy to notice two regularities of the matrix transposition operation.

1. A twice transposed matrix is ​​equal to the original matrix:

2. When transposing square matrices, the elements located on the main diagonal do not change their positions, i.e. The main diagonal of a square matrix does not change when transposed.

Matrix multiplication

Matrix multiplication is a specific operation that forms the basis of matrix algebra. The rows and columns of matrices can be considered as row and column vectors of appropriate dimensions; in other words, any matrix can be interpreted as a collection of row vectors or column vectors.

Let two matrices be given: A- size T X P And IN- size p x k. We will consider the matrix A as a totality T row vectors A) dimensions P each, and the matrix IN - as a totality To column vectors b Jt containing each P coordinates each:


Matrix row vectors A and matrix column vectors IN are shown in the notation of these matrices (2.7). Matrix row length A equal to the height of the matrix column IN, and therefore the scalar product of these vectors makes sense.

Definition 3. Product of matrices A And IN is called a matrix C whose elements Su are equal to the scalar products of row vectors A ( matrices A into column vectors bj matrices IN:

Product of matrices A And IN- matrix C - has the size T X To, since the length l of row vectors and column vectors disappears when summing the products of the coordinates of these vectors in their scalar products, as shown in formulas (2.8). Thus, to calculate the elements of the first row of matrix C, it is necessary to sequentially obtain the scalar products of the first row of the matrix A to all matrix columns IN the second row of matrix C is obtained as the scalar product of the second row vector of the matrix A to all column vectors of the matrix IN, and so on. For the convenience of remembering the size of the product of matrices, you need to divide the products of the sizes of the factor matrices: - , then the remaining numbers in relation give the size of the product To

dsnia, t.s. the size of matrix C is equal to T X To.

The operation of matrix multiplication has a characteristic feature: the product of matrices A And IN makes sense if the number of columns in A equal to the number of lines in IN. Then if A and B - rectangular matrices, then the product IN And A will no longer make sense, since the scalar products that form the elements of the corresponding matrix must involve vectors with the same number of coordinates.

If matrices A And IN square, size l x l, makes sense as a product of matrices AB, and the product of matrices VA, and the size of these matrices is the same as that of the original factors. In this case, in the general case of matrix multiplication, the rule of permutation (commutativity) is not observed, i.e. AB * VA.

Let's look at examples of matrix multiplication.


Since the number of matrix columns A equal to the number of rows of the matrix IN, product of matrices AB has the meaning. Using formulas (2.8), we obtain a matrix of size 3x2 in the product:

Work VA does not make sense, since the number of matrix columns IN does not match the number of matrix rows A.

Here we find the matrix products AB And VA:

As can be seen from the results, the product matrix depends on the order of the matrices in the product. In both cases, the matrix products have the same size as the original factors: 2x2.


In this case the matrix IN is a column vector, i.e. a matrix with three rows and one column. In general, vectors are special cases of matrices: a row vector of length P is a matrix with one row and P columns, and the height column vector P- matrix with P rows and one column. The sizes of the given matrices are respectively 2 x 3 and 3 x I, so the product of these matrices is defined. We have

The product produces a matrix of size 2 x 1 or a column vector of height 2.


By sequentially multiplying matrices we find:


Properties of the product of matrices. Let A, B and C are matrices of appropriate sizes (so that matrix products can be determined), and a is a real number. Then the following properties of the product of matrices hold:

  • 1) (AB)C = A(BC);
  • 2) C A + B)C = AC + BC
  • 3) A (B+ C) = AB + AC;
  • 4) a (AB) = (aA)B = A(aB).

The concept of the identity matrix E was introduced in clause 2.1.1. It is easy to see that in matrix algebra it plays the role of unit, i.e. We can note two more properties associated with multiplication by this matrix on the left and on the right:

  • 5 )AE=A;
  • 6) EA = A.

In other words, the product of any matrix by the identity matrix, if it makes sense, does not change the original matrix.

When working with matrices, sometimes you need to transpose them, that is, in simple words, turn them over. Of course, you can enter the data manually, but Excel offers several ways to do this easier and faster. Let's look at them in detail.

Matrix transposition is the process of swapping columns and rows. Excel has two options for transposing: using the function TRANSSP and using the insert special tool. Let's look at each of these options in more detail.

Method 1: TRANSPOSE operator

Function TRANSSP belongs to the category of operators "Links and Arrays". The peculiarity is that, like other functions that work with arrays, the output result is not the contents of the cell, but an entire data array. The function syntax is quite simple and looks like this:

TRANSP(array)

That is, the only argument of this operator is a reference to the array, in our case the matrix, that should be converted.

Let's see how this function can be applied using an example with a real matrix.

  1. We select an empty cell on the sheet, which we plan to make the uppermost left cell of the transformed matrix. Next, click on the icon "Insert Function", which is located near the formula bar.
  2. Launch in progress Function Wizards. Open the category in it "Links and Arrays" or "Complete alphabetical list". After finding the name "TRANSP", select it and click on the button "OK".
  3. The function arguments window opens TRANSSP. The only argument of this operator corresponds to the field "Array". You need to enter the coordinates of the matrix that needs to be turned over. To do this, place the cursor in the field and, holding down the left mouse button, select the entire range of the matrix on the sheet. After the area address is displayed in the arguments window, click on the button "OK".
  4. But, as we see, in the cell that is intended to display the result, an incorrect value is displayed in the form of an error “#VALUE!”. This is due to the way array operators work. To correct this error, select a range of cells in which the number of rows should be equal to the number of columns of the original matrix, and the number of columns should be equal to the number of rows. Such a correspondence is very important for the result to be displayed correctly. In this case, the cell containing the expression “#VALUE!” should be the top left cell of the selected array and it is from this cell that the selection procedure should begin by holding down the left mouse button. After you have made the selection, place the cursor in the formula bar immediately after the operator expression TRANSSP, which should appear in it. After this, to perform the calculation, you need to press the button Enter, as is customary in conventional formulas, and dial the combination Ctrl+Shift+Enter.
  5. After these actions, the matrix was displayed as we needed, that is, in transposed form. But there is another problem. The fact is that now the new matrix is ​​an array linked by a formula that cannot be changed. When you try to make any change to the contents of the matrix, an error will pop up. Some users are quite satisfied with this state of affairs, since they do not intend to make changes to the array, but others need a matrix with which they can fully work.

    To solve this problem, we select the entire transposed range. Moving to the tab "Home" click on the icon "Copy", which is located on the ribbon in the group "Clipboard". Instead of the specified action, after selecting, you can set a standard keyboard shortcut for copying Ctrl+C.

  6. Then, without removing the selection from the transposed range, right-click on it. In the context menu in the group "Insert Options" click on the icon "Values", which looks like a pictogram depicting numbers.

    Following this, the array formula TRANSSP will be deleted, and only one values ​​will remain in the cells, which can be worked with in the same way as with the original matrix.

Method 2: Matrix Transpose Using Paste Special

In addition, the matrix can be transposed using one context menu item called "Insert Special".


After these steps, only the transformed matrix will remain on the sheet.

With the same two methods discussed above, you can transpose not only matrices, but also full-fledged tables into Excel. The procedure will be almost identical.

So, we found out that in Excel the matrix can be transposed, that is, turned over by swapping columns and rows, in two ways. The first option involves using the function TRANSSP, and the second is Paste Special Tools. By and large, the final result obtained when using both of these methods is no different. Both methods work in almost any situation. So when choosing a conversion option, the personal preferences of a particular user come to the fore. That is, which of these methods is more convenient for you personally, use that one.

In higher mathematics, such a concept as a transposed matrix is ​​studied. It should be noted: many people think that this is a rather complex topic that is impossible to master. However, it is not. In order to understand exactly how such an easy operation is carried out, you only need to become a little familiar with the basic concept - the matrix. Any student can understand the topic if they take the time to study it.

What is a matrix?

Matrices are quite common in mathematics. It should be noted that they are also found in computer science. Thanks to them and with their help, it is easy to program and create software.

What is a matrix? This is a table in which the elements are placed. It must have a rectangular appearance. In simplest terms, a matrix is ​​a table of numbers. It is designated using some capital Latin letters. It can be rectangular or square. There are also separate rows and columns, which are called vectors. Such matrices receive only one line of numbers. In order to understand how big a table is, you need to pay attention to the number of rows and columns. The first is denoted by the letter m, and the second by n.

You should definitely understand what a matrix diagonal is. There is a side and a main one. The second is that strip of numbers that goes from left to right from the first to the last element. In this case, the side line will be from right to left.

With matrices you can do almost all the simplest arithmetic operations, that is, add, subtract, multiply with each other and separately by number. They can also be transposed.

Transposition process

A transposed matrix is ​​a matrix in which the rows and columns are swapped. This is done as easily as possible. Denoted as A with superscript T (A T). In principle, it should be said that in higher mathematics this is one of the simplest operations on matrices. The table size is maintained. Such a matrix is ​​called transposed.

Properties of transposed matrices

In order to correctly perform the transposition process, it is necessary to understand what properties of this operation exist.

  • There must be an original matrix for any transposed table. Their determinants must be equal to each other.
  • If there is a scalar unit, then when performing this operation it can be taken out.
  • When a matrix is ​​double transposed, it will be equal to the original one.
  • If you compare two folded tables with swapped columns and rows with the sum of the elements on which this operation was performed, they will be the same.
  • The last property is that if you transpose tables multiplied with each other, then the value must be equal to the results obtained by multiplying the transposed matrices together in reverse order.

Why transpose?

A matrix in mathematics is necessary in order to solve certain problems with it. Some of them require you to calculate the inverse table. To do this, you need to find a determinant. Next, the elements of the future matrix are calculated, then they are transposed. All that remains is to find the directly inverse table. We can say that in such problems you need to find X, and this is quite easy to do with the help of basic knowledge of the theory of equations.

Results

This article examined what a transposed matrix is. This topic will be useful to future engineers who need to be able to correctly calculate complex structures. Sometimes the matrix is ​​not so easy to solve, you have to rack your brain. However, in the course of student mathematics, this operation is carried out as easily as possible and without any effort.

Transposing a matrix through this online calculator will not take you much time, but it will quickly give results and help you better understand the process itself.

Sometimes in algebraic calculations there is a need to swap the rows and columns of a matrix. This operation is called matrix transposition. The rows in order become columns, and the matrix itself becomes transposed. There are certain rules in these calculations, and to understand them and visually familiarize yourself with the process, use this online calculator. It will make your task much easier and help you better understand the theory of matrix transposition. A significant advantage of this calculator is the demonstration of an expanded and detailed solution. Thus, its use promotes a deeper and more informed understanding of algebraic calculations. In addition, with its help you can always check how successfully you completed the task by transposing the matrices manually.

The calculator is very easy to use. To find a transposed matrix online, specify the matrix size by clicking on the “+” or “-” icons until you obtain the desired number of columns and rows. Next, enter the required numbers into the fields. Below is the “Calculate” button - clicking it displays a ready-made solution with a detailed explanation of the algorithm.