Matrix multiplication
cij = ai1 · b1j + ai2 · b2j + ... + ain · bnj
Properties of matrix multiplication
- (A · B) · C= A · (B · C) - matrix multiplication is associative;
- (z · A) · B= z · (A · B), where z - number;
- A · (B + C) = A · B + A · C - matrix multiplication is distributive;
- In · Anm = Anm · Im= Anm - matrix multiplication by identity matrix;
- A · B ≠ B · A - in general, the matrix multiplication is not commutative.
- The product of two matrices is a matrix with as many rows as they have left the matrix, and as many columns as they have the right matrix.
Examples of matrix multiplication
Find the matrix C is the product of matrices A = | 4 | 2 | and B = | 3 | 1 | . | ||||
9 | 0 | -3 | 4 |
Solution:
С = A · B = | 4 | 2 | · | 3 | 1 | = | 6 | 12 | ||||||
9 | 0 | -3 | 4 | 27 | 9 |
The elements of the matrix C are calculated as follows:
c11 = a11·b11 + a12·b21 = 4·3 + 2·(-3) = 12 - 6 = 6
c12 = a11·b12 + a12·b22 = 4·1 + 2·4 = 4 + 8 = 12
c21 = a21·b11 + a22·b21 = 9·3 + 0·(-3) = 27 + 0 = 27
c22 = a21·b12 + a22·b22 = 9·1 + 0·4 = 9 + 0 = 9
Find the matrix C is the product of matrices A = |
|
and B = |
|
. |
Solution:
C = A · B = |
|
· |
|
= |
|
The elements of the matrix C are calculated as follows:
c11 = a11·b11 + a12·b21 = 2·5 + 1·(-3) = 10 - 3 = 7
c12 = a11·b12 + a12·b22 = 2·(-1) + 1·0 = -2 + 0 = -2
c13 = a11·b13 + a12·b23 = 2·6 + 1·7 = 12 + 7 = 19
c21 = a21·b11 + a22·b21 = (-3)·5 + 0·(-3) = -15 + 0 = -15
c22 = a21·b12 + a22·b22 = (-3)·(-1) + 0·0 = 3 + 0 = 3
c23 = a21·b13 + a22·b23 = (-3)·6 + 0·7 = -18 + 0 = -18
c31 = a31·b11 + a32·b21 = 4·5 + (-1)·(-3) = 20 + 3 = 23
c32 = a31·b12 + a22·b22 = (4)·(-1) + (-1)·0 = -4 + 0 = -4
c33 = a31·b13 + a32·b23 = 4·6 + (-1)·7 = 24 - 7 = 17
Add the comment