The transposition of the product of matrices is proof. Matrix Transposition in Microsoft Excel

In higher mathematics, such a concept as a transposed matrix is ​​studied. It should be noted that many people think that this is a rather complicated subject that cannot be mastered. However, it is not. In order to understand exactly how such an easy operation is carried out, it is only necessary to familiarize yourself a little with the basic concept - the matrix. The topic can be understood by any student if he takes the time to study it.

What is a matrix?

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

What is a matrix? This is the table in which the elements are placed. It has to be rectangular. In simple terms, a matrix is ​​a table of numbers. It is denoted by any 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 what size a table has, you need to pay attention to the number of rows and columns. The first is denoted by the letter m, and the second - n.

It is imperative to understand what a matrix diagonal is. There is a side and main. 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 among themselves and separately by a number. They can also be transposed.

Transposition process

A transposed matrix is ​​a matrix in which the rows and columns are reversed. This is done as easily as possible. It is denoted as A with a 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 preserved. 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 initial matrix to 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 ​​transposed twice, it will be equal to the original one.
  • If we compare two stacked tables with columns and rows changed, with the sum of the elements on which this operation was performed, then they will be the same.
  • The last property is that if you transpose the tables multiplied with each other, then the value must be equal to the results obtained during the multiplication of the transposed matrices in the reverse order.

Why transpose?

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

Results

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

These operations on matrices are not linear.

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

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

EXAMPLE.

=

; ==

3x2 2x3 3x3 3x3

DEFINITION. If a =, then the matrix BUT called symmetrical.

All diagonal matrices are symmetric, since their elements that are symmetric with respect to the main diagonal are equal.

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

DEFINITION. Let =
is the size matrix
,=
is the size matrix
. The product of these matrices
- matrix =
size
, whose elements are calculated by the formula:

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

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

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 called permutational, if
, otherwise and called non-permutable.

It follows from the definition that only square matrices of the same size can be permutable.

EXAMPLE.


matrices and permutation.

That is
,

means, and are permutation matrices.

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

If the corresponding works are defined, then:

5.

EXAMPLE.

,


2x2 2x1 2x1 1x2

COMMENT. Matrix elements 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

labeled differently:
or
.

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

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

EXAMPLE.
;

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

First, the numbers on the main diagonal and two diagonals parallel to it are multiplied, then the numbers on the other (secondary) diagonal and parallel to it. The sum of the rest 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 deleting an element (more precisely, the first row and the first column, at the intersection of which stands ),
- deleting an element ,
- element .

DEFINITION. Additional minor
element square matrix is called the determinant of the matrix obtained from strikeout -th line and -th column.

EXAMPLE.

DEFINITION. Algebraic addition element square matrix called a number
.

EXAMPLE.

For matrix :

For matrix :
and so on.

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

Let us now pass to the general case.

DEFINITION. determinant square matrix order a number is called, which is written and calculated as follows:

(1.4)

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

EXAMPLE.

Consider (without proof) properties of determinants:

    The determinant can be expanded over 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 this, in particular, it follows that common factor of any row (column) can be taken out of the sign of the determinant. Also, a determinant that has a zero row or zero column is zero.

Equality (1.6) is called -th line.

Equality (1.7) is called decomposition of the determinant by elements -th column.

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

algebraic complements of corresponding elements of another string

(column) is zero, that is, when
and
at
.


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

Especially often when calculating determinants, property 9 is used, since it allows you to get a row or column in any determinant, where all elements, except for one, are equal to zero.

EXAMPLE.

When working with matrices, sometimes you need to transpose them, that is, in simple words, flip them. Of course, you can overwrite the data manually, but Excel offers several ways to make it easier and faster. Let's take a look at them in detail.

Matrix transposition is the process of swapping columns and rows. In Excel, there are two possibilities for transposing: using the function TRANSP and using the Paste Special tool. Let's consider each of these options in more detail.

Method 1: TRANSPOSE operator

Function TRANSP belongs to the category of operators "References and Arrays". The peculiarity is that it, like other functions that work with arrays, the result of issuing is not the contents of the cell, but the whole array of data. The function syntax is quite simple and looks like this:

TRANSPOSE(array)

That is, the only argument of this operator is a reference to an array, in our case, a matrix, which 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 is planned to be the top left cell of the transformed matrix. Next, click on the icon "Insert Function", which is located near the formula bar.
  2. Launching Function Wizards. Open a category "References and Arrays" or "Full alphabetical list". After finding the name "TRANSP", select it and click on the button OK.
  3. The function arguments window is launched TRANSP. The only argument of this operator corresponds to the field "Array". You need to enter the coordinates of the matrix to be flipped into it. 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 address of the area is displayed in the arguments window, click on the button OK.
  4. But, as you can see, in the cell that is designed to display the result, an incorrect value is displayed in the form of an error "#VALUE!". This is due to the peculiarities of the operation of array operators. To correct this error, we select a range of cells in which the number of rows must be equal to the number of columns of the original matrix, and the number of columns must be equal to the number of rows. This correspondence is very important in order for the result to be displayed correctly. In this case, the cell containing the expression "#VALUE!" must be the top left cell of the array to be selected, and it is from this cell that the selection procedure should be started by holding down the left mouse button. After you have made a selection, place the cursor in the formula bar immediately after the operator expression TRANSP, which should be displayed in it. After that, to perform the calculation, you need to click not on the button Enter, as is customary in conventional formulas, and dial a combination Ctrl+Shift+Enter.
  5. After these actions, the matrix was displayed as we need, that is, in a 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. If 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 are not going 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. Moved 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 selection, you can set a standard keyboard shortcut for copying ctrl+c.

  6. Then, without removing the selection from the transposed range, we click on it with the right mouse button. In the context menu in a group "Paste Options" click on the icon "Values", which looks like an icon with numbers.

    Following this, the array formula TRANSP will be deleted, and only one value will remain in the cells, with which you can work in the same way as with the original matrix.

Method 2: Matrix Transposition with Paste Special

In addition, the matrix can be transposed using a single context menu item called "Paste Special".


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

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

So, we found out that in Excel the matrix can be transposed, that is, flipped by swapping columns and rows in two ways. The first option involves using the function TRANSP, and the second is Paste Special Tools. By and large, the end result that is 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 it.

Matrix transposition

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

Let the initial matrix be given BUT:

Then, according to the definition, the transposed matrix BUT" looks like:


An abbreviated form of the matrix transpose operation: 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 operation of matrix transposition.

1. The 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. Rows and columns of matrices can be viewed as row vectors and column vectors of the corresponding dimensions; in other words, any matrix can be interpreted as a collection of row vectors or column vectors.

Let two matrices be given: BUT- size t X P and AT- size p x k. We will consider the matrix BUT as a set t row vectors a) dimensions P each, and the matrix AT - as a set to column vectors b Jt containing P coordinates each:


Matrix Row Vectors BUT and column vectors of the matrix AT are shown in the representation of these matrices (2.7). Matrix row length BUT equal to the height of the matrix column AT, and therefore the scalar product of these vectors makes sense.

Definition 3. Product of matrices BUT and AT is called a matrix C, whose elements Su are equal to the scalar products of row vectors a ( matrices BUT into column vectors bj matrices AT:

Product of matrices BUT and AT- 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 the matrix C, it is necessary to sequentially obtain the scalar products of the first row of the matrix BUT to all columns of the matrix AT the second row of the matrix C is obtained as the scalar products of the second row vector of the matrix BUT to all column vectors of the matrix AT, 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 matrix factors: - , then the remaining ones in relation to the number give the size of the product to

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

There is a characteristic feature in the operation of matrix multiplication: the product of matrices BUT and AT makes sense if the number of columns in BUT equals the number of lines in AT. Then if A and B - rectangular matrices, then the product AT and BUT 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 BUT and AT 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 permutability (commutativity) rule is not observed, i.e. AB * BA.

Consider examples of matrix multiplication.


Since the number of matrix columns BUT equals the number of matrix rows AT, matrix product AB has the meaning. Using formulas (2.8), we obtain a 3x2 matrix in the product:

Work VA ns makes sense, since the number of columns of the matrix AT does not match the number of matrix rows BUT.

Here we find the products of matrices 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 AT 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 reduced matrices are 2 x 3 and 3 x I, respectively, so the product of these matrices is defined. We have

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


By successive matrix multiplication, we find:


Properties of the product of matrices. Let A, B and C are matrices of appropriate sizes (so that matrix products are defined), 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).

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

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

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, which is called the determinant.

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

For example, for a matrix, its determinant is

Example . Compute matrix determinants.

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

Example. Calculate the determinant.

To give a general definition of the determinant, we must introduce the concept of a minor and an algebraic complement.

Minor matrix element is called the determinant obtained by deleting - that row and - that column.

Example. Find some minors of the matrix A.

Algebraic addition element is called a number.

Hence, if the sum of the indices and is even, then they do not differ in any way. If the sum of indices and is odd, then they differ only in sign.

For the previous example .

matrix determinant is the sum of the products of the elements of some row

(column) to their algebraic complements. 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 according to the "triangle" rule and expand it along the first row, then along the third column, then along the second row.

Let's expand the determinant by the first line:

Let's expand the determinant in the third column:

Let's expand the determinant by the second line:

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

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

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

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

Higher order determinants are calculated in the same way.

Task 2. Calculate the fourth order determinant:

1) expanding 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 row by -1 and add to the fourth row:

  1. Solving systems of linear algebraic equations by the Cramer method.

Let us show the solution of the system of linear algebraic equations by the Cramer method.

Task 2. Solve the system of equations.

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

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

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

We find . To do this, we change the first column in the main determinant to the column of the right parts:

We find . To do this, we change the second column in the main determinant to the column of the right parts:

We find . To do this, we change the third column in the main determinant to the column of the right parts:

The solution of the system is found by Cramer's formulas: , ,

Thus, the solution of the system , ,

Let's make a check, for this we substitute the found solution into all the equations of the system.

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

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

The inverse matrix is ​​found by the formula:

Example. Find inverse matrix to matrix

First, we calculate the determinant.

Finding algebraic additions:

We write the inverse matrix:

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

Let the system of linear equations be given:

Denote

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

Task 3. Solve the system in a matrix way.

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

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

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

The Cramer method and the matrix method are used only for 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 equal to zero, the Gaussian method is applied. The Gaussian method can be applied to solve any systems.

And substitute into the first equation:

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

Using the resulting matrix, we restore the system:

We find a solution:

Have questions?

Report a typo

Text to be sent to our editors: