-
To multiply two matrices
- the number of columns in the first matrix
- must be equal to the number of rows in the second matrix
-
For example, consider A=(1374) and B=(105829)
-
You can multiply A×B
- because the number of columns in A (2) matches the number of rows in B (2)
-
But you cannot multiply B×A
- because the number of columns in B (3) does not match the number of rows in A (2)
-
Multiplying matrices involves
-
multiplying the corresponding elements in a row of the first matrix
- with the corresponding elements in a column of the second matrix
- and writing the sum of the products in the answer matrix
-
It is easiest to see this through some examples
-
The process becomes more natural the more times you do it!
-
The answer will be a 2 x 1 matrix
-
Multiply the corresponding elements in the row of the first matrix with the corresponding elements in the column of the second matrix, writing their sum in the answer matrix
- (abcd)(xy)=(ax+bycx+dy)
-
(1234)(1020)=(1×10+2×203×10+4×20)=(10+4030+80)=(50110)
-
The answer will be a 2 x 2 matrix
-
Multiply the corresponding elements in the row of the first matrix with the corresponding elements in the column of the second matrix, writing their sum in the answer matrix
- (abcd)(ABCD)=(aA+bCcA+dCaB+bDcB+dD)
-
(1234)(5102025)=(1×5+2×203×5+4×201×10+2×253×10+4×25)=(5+4015+8010+5030+100)=(456095130)
-
The answer will be a 2 x 3 matrix
-
Multiply the corresponding elements in the row of the first matrix with the corresponding elements in the column of the second matrix, writing their sum in the answer matrix
- (abcd)(ABCDEF)=(aA+bDcA+dDaB+bEcB+dEaC+bFcC+dF)
-
(1374)(105829)=(1+247+320+60+85+2735+36)=(2563983271)=(1×1+3×87×1+4×81×0+3×27×0+4×21×5+3×97×5+4×9)
-
The answer will be a 3 x 3 matrix
-
Multiply the corresponding elements in the row of the first matrix with the corresponding elements in the column of the second matrix, writing their sum in the answer matrix
- (abcdefghi)(ABCDEFGHI)=(aA+bD+cGdA+eD+fGgA+hD+iGaB+bE+cHdB+eE+fHgB+hE+iHaC+bF+cIdC+eF+fIgC+hF+iI)
-
(1030−52710)(023−14060−2)=(0+0+120+5+00−7+42+0+00+0+04+0+03+0+180+10+06−14+6)=(122215010−34−2)=(1×0+0×(−1)+3×40×0+(−5)×(−1)+0×42×0+7×(−1)+1×41×2+0×0+3×00×2+(−5)×0+0×02×2+7×0+1×01×3+0×(−2)+3×60×3+(−5)×(−2)+0×62×3+7×(−2)+1×6)
-
Only square matrices (2 x 2 or 3 x 3) can be squared
-
Do not square each individual element
-
Write out a matrix multiplication
- E.g. if P=(241−3) then P2=P×P=(241−3)(241−3)=(2×2+4×11×2+(−3)×12×4+4×(−3)1×4+(−3)×(−3))=(8−4−113)
-
It is possible to have negative elements after squaring a matrix
-
When multiplying numbers "swapping the order doesn't change the result"
-
This is not true for matrix multiplication
-
For example, (1234)(0151)=(103207) but (0151)(1234)=(34814)
-
When multiplying numbers "it doesn't matter which order you group operations into"
- E.g. to do 8 x 9 x 10, either (8 x 9) x 10 or 8 x (9 x 10) works
-
This is also true for matrix multiplication
-
To multiply three matrices together
-
it's fine to start by multiplying the first two together
- then multiplying the answer with the third matrix
-
or to start by multiplying the second two together
- then multiplying the answer with the first matrix
-
Just don't switch the order
- A(BC) is not the same as (BC)A
-
Multiplying any 2×2 or 3×3 matrix by the corresponding identity matrix leaves it unchanged
- AI=A and IA=A
-
For example, in the 2×2 case
- (abcd)(1001)=(abcd) and (1001)(abcd)=(abcd)
- This result can be proved by multiplying together the two matrices on the left side of each equation
-
The 2×2 identity matrix also leaves a 2×1 matrix unchanged
- (1001)(ab)=(ab)
- This can be relevant to matrix transformations
-
The identity matrix is an important matrix which you should know (or recognise as I in a question)
Worked Example
If P=(31−20), Q=(5−542) and R=(108), find the following:
(i) PR
(ii) PQ
(iii) Q2
Answer:
(i)* Write out *PR in full
(31−20)×(108)
Multiply the matrices
((3×10)+(1×8)(−2×10)+(0×8))
Simplify
Error converting from MathML to accessible text.
(ii)* **Write out *PQ in full
(31−20)×(5−542)
Multiply the matrices
((3×5+1×4)(−2×5+0×4)(3×−5+1×2)(−2×−5+0×2))=((15+4)(−10+0)(−15+2)(10+0))
Simplify
Error converting from MathML to accessible text.
(iii)* **Write out *Q2 as Q×Q
(5−542)×(5−542)
Multiply the matrices
((5×5+−5×4)(4×5+2×4)(5×−5+−5×2)(4×−5+2×2))=((25+−20)(20+8)(−25+−10)(−20+4))
Simplify
Error converting from MathML to accessible text.
Worked Example
If A=(0220) show that A2=4I.
Answer:
Write out A2 as A×A
(0220)×(0220)
Multiply the matrices
(0220)×(0220)=((0×0+2×2)(2×0+0×2)(0×2+2×0)(2×2+0×0))
=(4004)
Write in terms of the identity matrix, I=(1001) by factoring out 4
(4004)=4(1001)=4I