When working with matrices, sometimes you need to transpose them, that is, saying in simple words, turn 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 an array, in our case a matrix, that should be transformed.

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, 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.

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 patterns 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 into their dot 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.

In the matrix multiplication operation there is characteristic feature: 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. At the same time, in general case When multiplying matrices, the rule of permutation (commutativity) is not observed, i.e. AB * BA.

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.

To transpose a matrix, you need to write the rows of the matrix into columns.

If , then the transposed matrix

If , then

Exercise 1. Find

  1. Determinants of square matrices.

For square matrices, a number is introduced that is called the determinant.

For second-order matrices (dimension ) the determinant is given by the formula:

For example, for a matrix its determinant is

Example . Calculate determinants of matrices.

For square matrices of the third order (dimension ) there is a “triangle” rule: in the figure, the dotted line means multiply the numbers through which the dotted line passes. The first three numbers must be added, the next three numbers must be subtracted.

Example. Calculate the determinant.

To give general definition determinant, we need to introduce the concept of minor and algebraic complement.

Minor element of the matrix is ​​called the determinant obtained by crossing out - that row and - that column.

Example. Let's find some minors of matrix A.

Algebraic complement element is called number.

This means that if the sum of the indices is even, then they are no different. If the sum of the indices is odd, then they differ only in sign.

For the previous example.

Matrix determinant is the sum of the products of the elements of a certain string

(column) on them algebraic additions. Let's consider this definition on a third-order matrix.

The first entry is called the expansion of the determinant in the first row, the second is the expansion in the second column, and the last is the expansion in the third row. In total, such expansions can be written six times.

Example. Calculate the determinant using the “triangle” rule and expanding it along the first row, then along the third column, then along the second row.

Let's expand the determinant along the first line:

Let's expand the determinant in the third column:

Let's expand the determinant along the second line:

Note that the more zeros, the simpler the calculations. For example, expanding by the first column, we get

Among the properties of determinants there is a property that allows you to receive zeros, namely:

If you add elements of another row (column) to the elements of a certain row (column), multiplied by a non-zero number, then the determinant will not change.

Let's take the same determinant and get zeros, for example, in the first line.

Determinants of higher orders are calculated in the same way.

Task 2. Calculate the fourth order determinant:

1) spreading over any row or any column

2) having previously received zeros


We get an additional zero, for example, in the second column. To do this, multiply the elements of the second line by -1 and add them to the fourth line:

  1. Solving systems of linear algebraic equations using Cramer's method.

We will show the solution of a system of linear algebraic equations using Cramer's method.

Task 2. Solve the system of equations.

We need to calculate four determinants. The first is called the main one and consists of coefficients for the unknowns:

Note that if , the system cannot be solved by Cramer's method.

The three remaining determinants are denoted by , , and are obtained by replacing the corresponding column with a column of right-hand sides.

We find. To do this, change the first column in the main determinant to a column of right-hand sides:

We find. To do this, change the second column in the main determinant to a column of right-hand sides:

We find. To do this, change the third column in the main determinant to a column of right-hand sides:

We find the solution to the system using Cramer’s formulas: , ,

Thus, the solution to the system is , ,

Let’s do a check; to do this, we’ll substitute the found solution into all the equations of the system.

  1. Solving systems of linear algebraic equations using the matrix method.

If a square matrix has a non-zero determinant, there is an inverse matrix such that . The matrix is ​​called the identity matrix and has the form

inverse matrix is found by the formula:

Example. Find the inverse of a matrix

First we calculate the determinant.

Finding algebraic complements:

We write the inverse matrix:

To check the calculations, you need to make sure that .

Let the system be given linear equations:

Let's denote

Then the system of equations can be written in matrix form as , and hence . The resulting formula is called matrix method system solutions.

Task 3. Solve the system using the matrix method.

It is necessary to write out the matrix of the system, find its inverse and then multiply it by the column of right-hand sides.

We have already found the inverse matrix in the previous example, which means we can find a solution:

  1. Solving systems of linear algebraic equations using the Gauss method.

Cramer's method and matrix method only applies to square systems(the number of equations is equal to the number of unknowns), and the determinant must not be equal to zero. If the number of equations is not equal to the number of unknowns, or the determinant of the system is zero, the Gaussian method is used. The Gaussian method can be used to solve any system.

And let's substitute it into the first equation:

Task 5. Solve a system of equations using the Gauss method.

Using the resulting matrix, we restore the system:

We find a solution:

These operations on matrices are not linear.

DEFINITION. Transposed matrix for matrix size
called the size matrix
, obtained from replacing all its rows with columns with the same serial numbers.

That is, if =
, That
,=1,2,…,
,=1,2,…,.

EXAMPLE.

=

; ==

3x2 2x3 3x3 3x3

DEFINITION. If =, then the matrix A called symmetrical.

All diagonal matrices are symmetric, since their elements are equal, symmetric about the main diagonal.

Obviously, the following properties of the transposition operation are valid:

DEFINITION. Let =
– size matrix
,=
– size matrix
. Product of these matrices
- matrix =
size
, the elements of which are calculated by the formula:

, =1,2,…,
,=1,2,…,,

that is, the element th line and th matrix column equal to the sum of the products of the corresponding elements th row of the matrix And th matrix column .

EXAMPLE.

=
, =

2x3 3x1 2x3 3x1 2x1

Work
- does not exist.

PROPERTIES OF THE OPERATION OF MATRIX MULTIPLICATION

1.
, even if both products are defined.

EXAMPLE.
,

, Although

DEFINITION. Matrices And are called permutable, If
, otherwise And are called non-permutable.

From the definition it follows that only square matrices one size.

EXAMPLE.


matrices And permutable.

That is
,

Means, And – permutation matrices.

In general, the identity matrix commutes with any square matrix of the same order, and for any matrix
. This is a matrix property explains why it is called unit: when multiplying numbers, the number 1 has this property.

If the corresponding products are defined, then:

5.

EXAMPLE.

,


2x2 2x1 2x1 1x2

COMMENT. The elements of the matrix can be not only numbers, but also functions. Such a matrix is ​​called functional.

EXAMPLE.

Determinants and their properties

Each square matrix can, according to certain rules, be associated with a certain number, which is called its determinant.

Consider a second order square matrix:

Its determinant is a number that is written and calculated as follows:

(1.1)

Such a determinant is called second order determinant and maybe

be designated differently:
or
.

Third order determinant is the number corresponding to a square matrix
, which is calculated according to the rule:

This rule for calculating the third-order determinant is called the triangle rule and can be represented schematically as follows:

EXAMPLE.
;

If we assign the first and then the second column to the right of the determinant, then the triangle rule can be modified:

First, the numbers on the main diagonal and two diagonals parallel to it are multiplied, then the numbers on the other (side) diagonal and those parallel to it are multiplied. The sum of the remaining products is subtracted from the sum of the first three products.

Grouping the terms in (1.2) and using (1.1), we note that

(1.3)

That is, when calculating the third-order determinant, second-order determinants are used, and
is the matrix determinant obtained from by crossing out an element (more precisely, the first row and the first column, at the intersection of which there is ),
– by crossing out an element ,
– element .

DEFINITION. Additional minor
element square matrix is the determinant of the matrix obtained from by crossing out -th line and th column.

EXAMPLE.

DEFINITION. Algebraic complement element square matrix called number
.

EXAMPLE.

For matrix :

For matrix :
and so on.

So, taking into account the formulated definitions, (1.3) can be rewritten as: .

Let us now move on to the general case.

DEFINITION. Determinant square matrix order is a number that is written and calculated as follows:

(1.4)

Equality (1.4) is called expansion of the determinant into the elements of the first lines. In this formula, the algebraic complements are calculated as determinants
-th order. Thus, when calculating the 4th order determinant using formula (1.4), it is necessary, generally speaking, to calculate 4 3rd order determinants; when calculating a 5th order determinant - 5 4th order determinants, etc. However, if, for example, in the 4th order determinant the first line contains 3 zero elements, then in formula (1.4) only one non-zero term will remain.

EXAMPLE.

Let's consider (without proof) properties of determinants:

    The determinant can be expanded into the elements of the first column:

EXAMPLE.

COMMENT. The considered examples allow us to conclude: the determinant of a triangular matrix is ​​equal to the product of the elements of the main diagonal.


It follows that the rows and columns of the determinant are equal.

From here, in particular, it follows that common factor of any string (column) can be taken out beyond the sign of the determinant. Also, a determinant that has a zero row or a zero column is equal to zero.

Equality (1.6) is called th line.

Equality (1.7) is called expansion of the determinant into elements th column.

    The sum of the products of all elements of a certain row (column) by

algebraic complements of corresponding elements of another row

(column) is equal to zero, that is, when
And
at
.


EXAMPLE.
, since the elements of the first and second rows of this determinant are respectively proportional (property 6).

Property 9 is used especially often when calculating determinants, since it allows any determinant to obtain a row or column where all elements except one are equal to zero.

EXAMPLE.

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 first to 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 are calculated future matrix, 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.