Basic Matrix Operations: Example 1)
Basic Matrix Operations: Example 1)
Basic Matrix Operations: Example 1)
A matrix is a rectangular or square grid of numbers arranged into rows and columns. Each
number in the matrix is called an element, and they are arranged in what is called an array. The
plural of “matrix” is “matrices”. Matrices are often used in algebra to solve for unknown values
in linear equations, and in geometry when solving for vectors and vector operations.
Example 1) Matrix M M=[ ]
- There are 2 rows and 3 columns in matrix M. M would be called a 2 x 3 (i.e. “2 by 3”) matrix.
We can add matrices together as long as their dimensions are the same, i.e. both matrices
have the same number of rows and columns. To add two matrices, we add the numbers of each
matrix that are in the same element position.
Example 2) [ ] + [ ] = [ ]
We can subtract matrices in a similar way to addition. Both matrices need to have the same
dimensions, and we subtract the numbers of the second matrix from the first that are in the
same element position.
Example 3) [ ] [ ] = [ ]
We can multiply a matrix by some value by multiplying each element with that value. The value
can be positive or negative.
Example 4) 2x [ ] = [ ]
1x [ ] [ ]
Example 5) =
- We can get the negative of a matrix by using the above multiplication method:
Example 6) [ ] = [ ]
We can multiply a matrix (A) by another matrix (B) if the number of columns in A is equal to the
number of rows in B (in bold). Multiplication of A by B is typically written as A(B) or (A)B.
Example 7) A=[ ] B=[ ]
2x3 3x1
- A has 2 rows and 3 columns and B has 3 rows and 1 column so we can multiply A by B.
Notice that we can’t multiply B by A in this particular case because the number of columns in B
is not equal to the number of rows in A (in bold).
Example 8) B=[ ] A=[ ]
3x1 2x3
A(B) = [ ][ ] = [ ]
- Let’s look at the first row of A and the first column of B. Element a is multiplied by element e.
Element b is multiplied by element g. The value of the element in the first row and first column
of A(B) is the sum of the products (ae + bg).
A=[ ] B=[ ]
Example 9)
2. x 3 3 x 1.
A(B) = [ () ( ) () ] = [ ]
( ) () ( )( )
To transpose a matrix, we swap the rows for the columns. To indicate that we are transposing a
matrix, we add a “T” to the top right-hand corner of the matrix.
T
Example 10) [ ] = [ ]
Practice Questions
Given the following matrices, please solve the questions below and if you can’t solve the
problem, explain why:
A=[ ] B=[ ] C=[ ] D=[ ] E=[ ]
F=[ ]
1) A + F
2) E – D
3) C + B
4) C(D)
5) A(F)
6) CT
7) FT(E)
Solutions
1) A + F = [ ] [ ] = [ ]
2) E – D = [ ]–[ ] = [ ]
3) C + B = [ ] +[ ]
This problem cannot be solved because the matrices have different dimensions.
4) C(D) = [ ][ ] = [ ]
5) A(F) = [ ][ ]
2x3 2x3
This problem cannot be solved because the number of columns in A does not equal to
the number of rows in F.
T
6) CT = [
] = [ ]
T
7) FT(E) = [ ] [ ] = [ ][ ] = [ ]