How to set up smartphones and PCs. Informational portal

Matrix multiplication is a property of the operation of matrix multiplication. Multiplication of a square matrix by a column matrix

This topic will cover operations such as addition and subtraction of matrices, multiplication of a matrix by a number, multiplication of a matrix by a matrix, matrix transposition. All symbols used on this page are taken from the previous topic.

Addition and subtraction of matrices.

The sum $A+B$ of the matrices $A_(m\times n)=(a_(ij))$ and $B_(m\times n)=(b_(ij))$ is the matrix $C_(m\times n) =(c_(ij))$, where $c_(ij)=a_(ij)+b_(ij)$ for all $i=\overline(1,m)$ and $j=\overline(1,n) $.

A similar definition is introduced for the difference of matrices:

The difference $AB$ of the matrices $A_(m\times n)=(a_(ij))$ and $B_(m\times n)=(b_(ij))$ is the matrix $C_(m\times n)=( c_(ij))$, where $c_(ij)=a_(ij)-b_(ij)$ for all $i=\overline(1,m)$ and $j=\overline(1,n)$.

Explanation for the entry $i=\overline(1,m)$: show\hide

The entry "$i=\overline(1,m)$" means that the parameter $i$ changes from 1 to m. For example, the entry $i=\overline(1,5)$ says that the $i$ parameter takes the values ​​1, 2, 3, 4, 5.

It is worth noting that addition and subtraction operations are defined only for matrices of the same size. In general, the addition and subtraction of matrices are operations that are intuitively clear, because they mean, in fact, just the summation or subtraction of the corresponding elements.

Example #1

Three matrices are given:

$$ A=\left(\begin(array) (ccc) -1 & -2 & 1 \\ 5 & 9 & -8 \end(array) \right)\;\; B=\left(\begin(array) (ccc) 10 & -25 & 98 \\ 3 & 0 & -14 \end(array) \right); \;\; F=\left(\begin(array) (cc) 1 & 0 \\ -5 & 4 \end(array) \right). $$

Is it possible to find the matrix $A+F$? Find matrices $C$ and $D$ if $C=A+B$ and $D=A-B$.

Matrix $A$ contains 2 rows and 3 columns (in other words, the size of matrix $A$ is $2\times 3$), and matrix $F$ contains 2 rows and 2 columns. The dimensions of the matrix $A$ and $F$ do not match, so we cannot add them, i.e. the operation $A+F$ for these matrices is not defined.

The sizes of the matrices $A$ and $B$ are the same, i.e. matrix data contains an equal number of rows and columns, so the addition operation is applicable to them.

$$ C=A+B=\left(\begin(array) (ccc) -1 & -2 & 1 \\ 5 & 9 & -8 \end(array) \right)+ \left(\begin(array ) (ccc) 10 & -25 & 98 \\ 3 & 0 & -14 \end(array) \right)=\\= \left(\begin(array) (ccc) -1+10 & -2+( -25) & 1+98 \\ 5+3 & 9+0 & -8+(-14) \end(array) \right)= \left(\begin(array) (ccc) 9 & -27 & 99 \\ 8 & 9 & -22 \end(array) \right) $$

Find the matrix $D=A-B$:

$$ D=AB=\left(\begin(array) (ccc) -1 & -2 & 1 \\ 5 & 9 & -8 \end(array) \right)- \left(\begin(array) ( ccc) 10 & -25 & 98 \\ 3 & 0 & -14 \end(array) \right)=\\= \left(\begin(array) (ccc) -1-10 & -2-(-25 ) & 1-98 \\ 5-3 & 9-0 & -8-(-14) \end(array) \right)= \left(\begin(array) (ccc) -11 & 23 & -97 \ \ 2 & 9 & 6 \end(array) \right) $$

Answer: $C=\left(\begin(array) (ccc) 9 & -27 & 99 \\ 8 & 9 & -22 \end(array) \right)$, $D=\left(\begin(array) (ccc) -11 & 23 & -97 \\ 2 & 9 & 6 \end(array) \right)$.

Multiplying a matrix by a number.

The product of the matrix $A_(m\times n)=(a_(ij))$ and the number $\alpha$ is the matrix $B_(m\times n)=(b_(ij))$, where $b_(ij)= \alpha\cdot a_(ij)$ for all $i=\overline(1,m)$ and $j=\overline(1,n)$.

Simply put, to multiply a matrix by some number means to multiply each element of the given matrix by that number.

Example #2

Given a matrix: $ A=\left(\begin(array) (ccc) -1 & -2 & 7 \\ 4 & 9 & 0 \end(array) \right)$. Find matrices $3\cdot A$, $-5\cdot A$ and $-A$.

$$ 3\cdot A=3\cdot \left(\begin(array) (ccc) -1 & -2 & 7 \\ 4 & 9 & 0 \end(array) \right) =\left(\begin( array) (ccc) 3\cdot(-1) & 3\cdot(-2) & 3\cdot 7 \\ 3\cdot 4 & 3\cdot 9 & 3\cdot 0 \end(array) \right)= \left(\begin(array) (ccc) -3 & -6 & 21 \\ 12& 27 & 0 \end(array) \right).\\ -5\cdot A=-5\cdot \left(\begin (array) (ccc) -1 & -2 & 7 \\ 4 & 9 & 0 \end(array) \right) =\left(\begin(array) (ccc) -5\cdot(-1) & - 5\cdot(-2) & -5\cdot 7 \\ -5\cdot 4 & -5\cdot 9 & -5\cdot 0 \end(array) \right)= \left(\begin(array) ( ccc) 5 & 10 & -35 \\ -20 & -45 & 0 \end(array) \right). $$

The notation $-A$ is shorthand for $-1\cdot A$. That is, to find $-A$, you need to multiply all the elements of the $A$ matrix by (-1). In fact, this means that the sign of all elements of the matrix $A$ will change to the opposite:

$$ -A=-1\cdot A=-1\cdot \left(\begin(array) (ccc) -1 & -2 & 7 \\ 4 & 9 & 0 \end(array) \right)= \ left(\begin(array) (ccc) 1 & 2 & -7 \\ -4 & -9 & 0 \end(array) \right) $$

Answer: $3\cdot A=\left(\begin(array) (ccc) -3 & -6 & 21 \\ 12& 27 & 0 \end(array) \right);\; -5\cdot A=\left(\begin(array) (ccc) 5 & 10 & -35 \\ -20 & -45 & 0 \end(array) \right);\; -A=\left(\begin(array) (ccc) 1 & 2 & -7 \\ -4 & -9 & 0 \end(array) \right)$.

The product of two matrices.

The definition of this operation is cumbersome and, at first glance, incomprehensible. Therefore, I will first indicate a general definition, and then we will analyze in detail what it means and how to work with it.

The product of the matrix $A_(m\times n)=(a_(ij))$ and the matrix $B_(n\times k)=(b_(ij))$ is the matrix $C_(m\times k)=(c_( ij))$, for which each element of $c_(ij)$ is equal to the sum of the products of the corresponding elements of the i-th row of the matrix $A$ and the elements of the j-th column of the matrix $B$: $$c_(ij)=\sum\limits_ (p=1)^(n)a_(ip)b_(pj), \;\; i=\overline(1,m), j=\overline(1,n).$$

Step by step, we will analyze the multiplication of matrices using an example. However, you should immediately pay attention that not all matrices can be multiplied. If we want to multiply matrix $A$ by matrix $B$, then first we need to make sure that the number of columns of matrix $A$ is equal to the number of rows of matrix $B$ (such matrices are often called agreed). For example, matrix $A_(5\times 4)$ (matrix contains 5 rows and 4 columns) cannot be multiplied by matrix $F_(9\times 8)$ (9 rows and 8 columns), since the number of columns of matrix $A $ is not equal to the number of rows of matrix $F$, i.e. $4\neq 9$. But it is possible to multiply the matrix $A_(5\times 4)$ by the matrix $B_(4\times 9)$, since the number of columns of the matrix $A$ is equal to the number of rows of the matrix $B$. In this case, the result of multiplying the matrices $A_(5\times 4)$ and $B_(4\times 9)$ is the matrix $C_(5\times 9)$, containing 5 rows and 9 columns:

Example #3

Given matrices: $ A=\left(\begin(array) (cccc) -1 & 2 & -3 & 0 \\ 5 & 4 & -2 & 1 \\ -8 & 11 & -10 & -5 \end (array) \right)$ and $ B=\left(\begin(array) (cc) -9 & 3 \\ 6 & 20 \\ 7 & 0 \\ 12 & -4 \end(array) \right) $. Find the matrix $C=A\cdot B$.

To begin with, we immediately determine the size of the matrix $C$. Since matrix $A$ has size $3\times 4$ and matrix $B$ has size $4\times 2$, the size of matrix $C$ is $3\times 2$:

So, as a result of the product of the matrices $A$ and $B$, we should get the matrix $C$, consisting of three rows and two columns: $ C=\left(\begin(array) (cc) c_(11) & c_( 12) \\ c_(21) & c_(22) \\ c_(31) & c_(32) \end(array) \right)$. If the designations of the elements raise questions, then you can look at the previous topic: "Matrices. Types of matrices. Basic terms", at the beginning of which the designation of the matrix elements is explained. Our goal is to find the values ​​of all elements of the matrix $C$.

Let's start with the $c_(11)$ element. To get the element $c_(11)$, you need to find the sum of the products of the elements of the first row of the matrix $A$ and the first column of the matrix $B$:

To find the element $c_(11)$ itself, you need to multiply the elements of the first row of the matrix $A$ by the corresponding elements of the first column of the matrix $B$, i.e. the first element to the first, the second to the second, the third to the third, the fourth to the fourth. We summarize the results obtained:

$$ c_(11)=-1\cdot (-9)+2\cdot 6+(-3)\cdot 7 + 0\cdot 12=0. $$

Let's continue the solution and find $c_(12)$. To do this, you have to multiply the elements of the first row of the matrix $A$ and the second column of the matrix $B$:

Similarly to the previous one, we have:

$$ c_(12)=-1\cdot 3+2\cdot 20+(-3)\cdot 0 + 0\cdot (-4)=37. $$

All elements of the first row of the matrix $C$ are found. We pass to the second line, which begins with the element $c_(21)$. To find it, you have to multiply the elements of the second row of the matrix $A$ and the first column of the matrix $B$:

$$ c_(21)=5\cdot (-9)+4\cdot 6+(-2)\cdot 7 + 1\cdot 12=-23. $$

The next element $c_(22)$ is found by multiplying the elements of the second row of the matrix $A$ by the corresponding elements of the second column of the matrix $B$:

$$ c_(22)=5\cdot 3+4\cdot 20+(-2)\cdot 0 + 1\cdot (-4)=91. $$

To find $c_(31)$ we multiply the elements of the third row of the matrix $A$ by the elements of the first column of the matrix $B$:

$$ c_(31)=-8\cdot (-9)+11\cdot 6+(-10)\cdot 7 + (-5)\cdot 12=8. $$

And, finally, to find the element $c_(32)$, you have to multiply the elements of the third row of the matrix $A$ by the corresponding elements of the second column of the matrix $B$:

$$ c_(32)=-8\cdot 3+11\cdot 20+(-10)\cdot 0 + (-5)\cdot (-4)=216. $$

All elements of the matrix $C$ are found, it remains only to write down that $C=\left(\begin(array) (cc) 0 & 37 \\ -23 & 91 \\ 8 & 216 \end(array) \right)$ . Or, to write it in full:

$$ C=A\cdot B =\left(\begin(array) (cccc) -1 & 2 & -3 & 0 \\ 5 & 4 & -2 & 1 \\ -8 & 11 & -10 & - 5 \end(array) \right)\cdot \left(\begin(array) (cc) -9 & 3 \\ 6 & 20 \\ 7 & 0 \\ 12 & -4 \end(array) \right) =\left(\begin(array) (cc) 0 & 37 \\ -23 & 91 \\ 8 & 216 \end(array) \right). $$

Answer: $C=\left(\begin(array) (cc) 0 & 37 \\ -23 & 91 \\ 8 & 216 \end(array) \right)$.

By the way, there is often no reason to describe in detail the location of each element of the result matrix. For matrices, the size of which is small, you can do the following:

It is also worth noting that matrix multiplication is non-commutative. This means that in general $A\cdot B\neq B\cdot A$. Only for some types of matrices, which are called permutational(or commuting), the equality $A\cdot B=B\cdot A$ is true. It is on the basis of the non-commutativity of multiplication that it is required to indicate exactly how we multiply the expression by one or another matrix: on the right or on the left. For example, the phrase "multiply both sides of the equality $3E-F=Y$ by the matrix $A$ on the right" means that you want to get the following equality: $(3E-F)\cdot A=Y\cdot A$.

Transposed with respect to the matrix $A_(m\times n)=(a_(ij))$ is the matrix $A_(n\times m)^(T)=(a_(ij)^(T))$, for elements where $a_(ij)^(T)=a_(ji)$.

Simply put, in order to get the transposed matrix $A^T$, you need to replace the columns in the original matrix $A$ with the corresponding rows according to this principle: there was the first row - the first column will become; there was a second row - the second column will become; there was a third row - there will be a third column and so on. For example, let's find the transposed matrix to the matrix $A_(3\times 5)$:

Accordingly, if the original matrix had size $3\times 5$, then the transposed matrix has size $5\times 3$.

Some properties of operations on matrices.

It is assumed here that $\alpha$, $\beta$ are some numbers, and $A$, $B$, $C$ are matrices. For the first four properties, I indicated the names, the rest can be named by analogy with the first four.

  1. $A+B=B+A$ (commutativity of addition)
  2. $A+(B+C)=(A+B)+C$ (addition associativity)
  3. $(\alpha+\beta)\cdot A=\alpha A+\beta A$ (distributivity of multiplication by a matrix with respect to addition of numbers)
  4. $\alpha\cdot(A+B)=\alpha A+\alpha B$ (distributivity of multiplication by a number with respect to matrix addition)
  5. $A(BC)=(AB)C$
  6. $(\alpha\beta)A=\alpha(\beta A)$
  7. $A\cdot (B+C)=AB+AC$, $(B+C)\cdot A=BA+CA$.
  8. $A\cdot E=A$, $E\cdot A=A$, where $E$ is the identity matrix of the corresponding order.
  9. $A\cdot O=O$, $O\cdot A=O$, where $O$ is a zero matrix of the corresponding size.
  10. $\left(A^T \right)^T=A$
  11. $(A+B)^T=A^T+B^T$
  12. $(AB)^T=B^T\cdot A^T$
  13. $\left(\alpha A \right)^T=\alpha A^T$

In the next part, the operation of raising a matrix to a non-negative integer power will be considered, and examples will be solved in which several operations on matrices will be required.

Matrix addition:

Matrix subtraction and addition is reduced to the corresponding operations on their elements. Matrix addition operation entered only for matrices the same size, i.e. for matrices, which have the same number of rows and columns, respectively. sum of matrices A and B is called the matrix C, whose elements are equal to the sum of the corresponding elements. C \u003d A + B c ij \u003d a ij + b ij matrix difference.

Multiplying a matrix by a number:

Matrix multiplication (division) operation of any size by an arbitrary number is reduced to multiplying (dividing) each element matrices for this number. Matrix product And the number k is called the matrix B, such that

b ij = k × a ij . B \u003d k × A b ij \u003d k × a ij. The matrix- A \u003d (-1) × A is called the opposite matrix BUT.

Matrix addition and matrix multiplication properties:

Matrix addition operations And matrix multiplications on a number have the following properties: 1. A + B = B + A; 2. A + (B + C) = (A + B) + C; 3. A + 0 = A; 4. A - A \u003d 0; 5. 1 × A = A; 6. α × (A + B) = αA + αB; 7. (α + β) × A = αA + βA; 8. α × (βА) = (αβ) × А; , where A, B and C are matrices, α and β are numbers.

Matrix Multiplication (Matrix Product):

The operation of multiplying two matrices is entered only for the case when the number of columns of the first matrices equals the number of rows of the second matrices. Matrix product And m × n on matrix In n×p , is called the matrixС m×p such that с ik = a i1 × b 1k + a i2 × b 2k + ... + a in × b nk , i.e. find the sum of the products of the elements of the i -th row matrices And on the corresponding elements of the j -th column matrices B. If matrices A and B are square of the same size, then the products AB and BA always exist. It is easy to show that A × E = E × A = A, where A is a square the matrix, E - single the matrix the same size.

Matrix multiplication properties:

Matrix multiplication not commutative, i.e. AB ≠ BA even if both products are defined. However, if for any matrices relation AB = BA is satisfied, then such matrices are called permutations. The most typical example is the single the matrix, which is permutable with any other matrix the same size. Permutation can only be square matrices of the same order. A × E = E × A = A

Matrix multiplication has the following properties: 1. A × (B × C) = (A × B) × C; 2. A × (B + C) = AB + AC; 3. (A + B) × C = AC + BC; 4. α × (AB) = (αA) × B; 5. A × 0 = 0; 0 × A = 0; 6. (AB) T = B T A T; 7. (ABC) T = C T B T A T; 8. (A + B) T = A T + B T;

2. Determinants of the 2nd and 3rd orders. Properties of determinants.

matrix determinant second order, or determinant second order, called the number, which is calculated by the formula:

matrix determinant third order, or determinant third order, called the number, which is calculated by the formula:

This number represents an algebraic sum consisting of six terms. Each term contains exactly one element from each row and each column matrices. Each term consists of the product of three factors.

Signs with which members matrix determinant are included in the formula finding matrix determinant the third order can be determined using the above scheme, which is called the rule of triangles or the Sarrus rule. The first three terms are taken with a plus sign and are determined from the left figure, and the next three terms are taken with a minus sign and are determined from the right figure.

Determine the number of terms to find matrix determinant, in an algebraic sum, you can calculate the factorial: 2! = 1 × 2 = 2 3! = 1 x 2 x 3 = 6

Matrix Determinant Properties

Matrix determinant properties:

Property #1:

Matrix determinant will not change if its rows are replaced by columns, each row by a column with the same number, and vice versa (Transposition). |A| = |A| T

Consequence:

Columns and rows matrix determinant are equal, therefore, the properties inherent in rows are also carried out for columns.

Property #2:

When swapping 2 rows or columns matrix determinant will change sign to the opposite, keeping the absolute value, i.e.:

Property #3:

Matrix determinant, which has two identical rows, is equal to zero.

Property #4:

The common factor of elements of any series matrix determinant can be taken out of the sign determinant.

Consequences from properties #3 and #4:

If all elements of a certain series (row or column) are proportional to the corresponding elements of a parallel series, then such matrix determinant equals zero.

Property #5:

matrix determinant are equal to zero, then matrix determinant equals zero.

Property #6:

If all elements of any row or column determinant presented as a sum of 2 terms, then determinant matrices can be represented as the sum of 2 determinants according to the formula:

Property #7:

If to any row (or column) determinant add the corresponding elements of another row (or column) multiplied by the same number, then matrix determinant will not change its value.

An example of applying properties to a calculation matrix determinant:

1st year, higher mathematics, study matrices and basic actions on them. Here we systematize the main operations that can be performed with matrices. How to get started with matrices? Of course, from the simplest - definitions, basic concepts and simplest operations. We assure you that matrices will be understood by everyone who devotes at least a little time to them!

Matrix Definition

The matrix is a rectangular table of elements. Well, if in simple terms - a table of numbers.

Matrices are usually denoted by uppercase Latin letters. For example, matrix A , the matrix B etc. Matrices can be of different sizes: rectangular, square, there are also row matrices and column matrices called vectors. The size of the matrix is ​​determined by the number of rows and columns. For example, let's write a rectangular matrix of size m on the n , where m is the number of lines, and n is the number of columns.

Elements for which i=j (a11, a22, .. ) form the main diagonal of the matrix, and are called diagonal.

What can be done with matrices? Add/Subtract, multiply by a number, multiply among themselves, transpose. Now about all these basic operations on matrices in order.

Matrix addition and subtraction operations

We warn you right away that you can only add matrices of the same size. The result is a matrix of the same size. Adding (or subtracting) matrices is easy − just add their corresponding elements . Let's take an example. Let's perform the addition of two matrices A and B of size two by two.

Subtraction is performed by analogy, only with the opposite sign.

Any matrix can be multiplied by an arbitrary number. To do this, you need to multiply by this number each of its elements. For example, let's multiply the matrix A from the first example by the number 5:

Matrix multiplication operation

Not all matrices can be multiplied with each other. For example, we have two matrices - A and B. They can be multiplied by each other only if the number of columns of matrix A is equal to the number of rows of matrix B. Moreover, each element of the resulting matrix in the i-th row and j-th column will be equal to the sum of the products of the corresponding elements in the i-th row of the first factor and the j-th column of the second. To understand this algorithm, let's write down how two square matrices are multiplied:

And an example with real numbers. Let's multiply the matrices:

Matrix transposition operation

Matrix transposition is an operation where the corresponding rows and columns are swapped. For example, we transpose the matrix A from the first example:

Matrix determinant

The determinant, oh the determinant, is one of the basic concepts of linear algebra. Once upon a time, people came up with linear equations, and after them they had to invent a determinant. In the end, it's up to you to deal with all this, so the last push!

The determinant is a numerical characteristic of a square matrix, which is needed to solve many problems.
To calculate the determinant of the simplest square matrix, you need to calculate the difference between the products of the elements of the main and secondary diagonals.

The determinant of a matrix of the first order, that is, consisting of one element, is equal to this element.

What if the matrix is ​​three by three? This is more difficult, but it can be done.

For such a matrix, the value of the determinant is equal to the sum of the products of the elements of the main diagonal and the products of the elements lying on triangles with a face parallel to the main diagonal, from which the product of the elements of the secondary diagonal and the product of the elements lying on triangles with a face parallel to the secondary diagonal are subtracted.

Fortunately, it is rarely necessary to calculate the determinants of large matrices in practice.

Here we have considered the basic operations on matrices. Of course, in real life you can never even come across a hint of a matrix system of equations, or vice versa, you may encounter much more complex cases when you really have to rack your brains. It is for such cases that there is a professional student service. Ask for help, get a high-quality and detailed solution, enjoy academic success and free time.

Top Related Articles