Matrices
We can add together 2 matrices but the rules are specific. They can be added by adding the elements in the corresponding positions. Therefore each matrix must have the same dimensions.
[2 3 1 [7 8 4
5 8 7] 3 12 8]
= [9 11 5
8 20 15]
We can also use the same rules when subtracting 2 matrices.
Scaler Multiplication
A scaler multiplication means that we are going to multiply each element by the same constant.
Ex. 1.12 x A 1.12= constant
A= elements
1.12 x [27 34 27
13 17 31
14 20 14]
= [30.24 38.08 30.24
14.56 19.04 34.72
15.68 22.40 15.68]
Matrix X Matrix
In order to multiply a matrix by a matrix we need to have the same number of columns and rows in the first matrix as there are in the second matrix.
Ex. Matrix A
3x4
3 rows & 4 columns
Matrix B
4x2
4 rows & 2 columns
This will work because the 2 inside numbers are the same. However if the 2 inside numbers are different this will not work.
Ex. Matrix A
2x3
2 rows & 3 columns
Matrix B
2x3
2 rows & 3 columns
To multiply one matrix times another we take the elements from the row times by the elements from the column and find the sum. If there is only one row but 2 columns like below we would just add the first number in the first row by the first number in the second column.
[4 3 5] [2 -1
3 4
7 6]
The first matrix is a 1x3 and the second is a 3x2. Outside numbers are the same so we know that this will work. Now imagine if we crossed out the outside numbers we would get a 1x2 matrix. This is true with these equations.
4x2= 8
3x3= 9
5x7= 35
8+9+35= 52
4x-1= -4
3x4= 12
5x6= 30
-4+12+30= 38
[52 38]
1x2 Matrix.
No comments:
Post a Comment