









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










®
When we wish to multiply matrices together we have to ensure that the operation is possible - and this is not always so. Also, unlike number arithmetic and algebra, even when the product exists the order of multiplication may have an effect on the result. In this Section we pick our way through the minefield of matrix multiplication.
Before starting this Section you should...
'
&
$
%
On completion you should be able to...
HELM (2008): Section 7.2: Matrix Multiplication
Let A be a 1 × 2 row matrix and B be a 2 × 1 column matrix:
A =
a b
c d
The product of these two matrices is written AB and is the 1 × 1 matrix defined by:
AB =
a b
c d
= [ac + bd]
Note that corresponding elements are multiplied together and the results are then added together. For example
[ 2 − 3
This matrix product is easily generalised to other row and column matrices. For example if C is a 1 × 4 row matrix and D is a 4 × 1 column matrix:
then we define the product of C with D as
The only requirement is that the number of elements of the row matrix is the same as the number of elements of the column matrix.
If A and B are two matrices then the product AB is obtained by multiplying the rows of A with the columns of B in the manner described above. This will only be possible if the number of elements in the rows of A is the same as the number of elements in the columns of B. In particular, we define the product of two 2 × 2 matrices A and B to be another 2 × 2 matrix C whose elements are calculated according to the following pattern [ a b c d
w x y z
aw + by ax + bz cw + dy cx + dz
The rule for calculating the elements of C is described in the following Key Point:
Workbook 7: Matrices
Finally find the two other elements of C = AB and hence write down the matrix C:
Your solution
Answer Row 1 column 1 is 1 × 1 + 2 × (−2) = − 3. Row 2 column 2 is 3 × (−1) + 4 × 1 = 1
C =
Clearly, matrix multiplication is tricky and not at all ‘natural’. However, it is a very important mathematical procedure with many engineering applications so must be mastered.
We have already calculated the product AB where
A =
and B =
Now complete the following task in which you are asked to determine the product BA, i.e. with the matrices in reverse order.
Task For matrices A =
and B =
form the products of
row 1 of B and column 1 of A row 1 of B and column 2 of A row 2 of B and column 1 of A row 2 of B and column 2 of A
Now write down the matrix BA:
Your solution
Answer row 1, column 1 is 1 × 1 + (−1) × 3 = − 2 row 1, column 2 is 1 × 2 + (−1) × 4 = − 2 row 2, column 1 is − 2 × 1 + 1 × 3 = 1 row 2, column 2 is − 2 × 2 + 1 × 4 = 0
BA is
It is clear that AB and BA are not in general the same. In fact it is the exception that AB = BA. In the special case in which AB = BA we say that the matrices A and B commute.
Workbook 7: Matrices
®
Task Calculate AB and BA where
A =
a b c d
and B =
Your solution
Answer AB = BA =
We call B the 2 × 2 zero matrix written 0 so that A × 0 = 0 × A = 0 for any matrix A.
Now in the multiplication of numbers, the equation
ab = 0
implies that either a is zero or b is zero or both are zero. The following task shows that this is not necessarily true for matrices.
Task Carry out the multiplication AB where
A =
Your solution
Answer AB =
Here we have a zero product yet neither A nor B is the zero matrix! Thus the statement AB = 0 does not allow us to conclude that either A = 0 or B = 0.
HELM (2008): Section 7.2: Matrix Multiplication
®
Task Calculate AB =
First find the element in row 2 column 1 of the product:
Your solution
Answer
Row 2 of A is (3, 4 , 0) column 1 of B is
The combination required is 3 × 2 + 4 × 1 + (0) × (0) = 10.
Now complete the multiplication to find all the elements of the matrix AB:
Your solution
Answer In full detail, the elements of AB are:
i.e. AB =
The 3 × 3 unit matrix is: I =
(^) and as in the 2 × 2 case this has the property that
The 3 × 3 zero matrix is
HELM (2008): Section 7.2: Matrix Multiplication
So far, we have just looked at multiplying 2 × 2 matrices and 3 × 3 matrices. However, products between non-square matrices may be possible.
General Matrix Products
The general rule is that an n × p matrix A can be multiplied by a p × m matrix B to form an n × m matrix AB = C.
In words: For the matrix product AB to be defined the number of columns of A must equal the number of rows of B. The elements of C are found in the usual way:
The element in the ith^ row and jth^ column of C is obtained by multiplying the ith^ row of A with the jth^ column of B.
Find the product AB if A =
and B =
Solution Since A is a 2 × 3 and B is a 3 × 2 matrix the product AB can be found and results in a 2 × 2 matrix.
Workbook 7: Matrices
Task Given A =
State which of the products AB, BA, AC, CA, BC, CB, (AB)C, A(CB) is defined and state the size (n × m) of the product when defined.
Your solution AB BA AC CA BC CB (AB)C A(CB)
Answer A B 2 × 3 2 × 2
not possible
possible; result 2 × 3
possible; result 2 × 2
possible; result 3 × 3
B C 2 × 2 3 × 2
not possible
possible; result 3 × 2
(AB)C not possible, AB not defined.
possible; result 2 × 2
We now list together some properties of matrix multiplication and compare them with corresponding properties for multiplication of numbers.
Matrix algebra Number algebra A(B + C) = AB + AC a(b + c) = ab + ac AB 6 = BA in general ab = ba A(BC) = (AB)C a(bc) = (ab)c AI = IA = A 1 .a = a.1 = a A0 = 0A = 0 0 .a = a.0 = 0 AB may not be possible ab is always possible AB = 0 does not imply A = 0 or B = 0 ab = 0 → a = 0 or b = 0
Workbook 7: Matrices
®
A network is a collection of points (nodes) some of which are connected together by lines (paths). The information contained in a network can be conveniently stored in the form of a matrix.
Petrol is delivered to terminals T 1 and T 2. They distribute the fuel to 3 storage depots (S 1 , S 2 , S 3 ). The network diagram below shows what fraction of the fuel goes from each terminal to the three storage depots. In turn the 3 depots supply fuel to 4 petrol stations (P 1 , P 2 , P 3 , P 4 ) as shown in Figure 2:
T 1 T 2
4
6
4
(^4 0). 3
(^5 0). 2
1
6
2
2
2
5
2
2
Figure 2 Show how this situation may be described using matrices.
Solution Denote the amount of fuel, in litres, flowing from T 1 by t 1 and from T 2 by t 2 and the quantity being received at Si by si for i = 1, 2 , 3. This situation is described in the following diagram:
From this diagram we see that s 1 = 0. 4 t 1 + 0. 5 t 2 s 2 = 0. 4 t 1 + 0. 2 t 2 s 3 = 0. 2 t 1 + 0. 3 t 2
or, in matrix form:
s 1 s 2 s 3
t 1 t 2
HELM (2008): Section 7.2: Matrix Multiplication
®
Problem in words
Figure 3 represents a communication network. Vertices a, b, f and g represent offices. Vertices c, d and e represent switching centres. The numbers marked along the edges represent the number of connections between any two vertices. Calculate the number of routes from a and b to f and g
a
b
c
d
e
f
(^1) g
2
Figure 3: A communication network where a, b, f and g are offices and c, d and e are switching centres
Mathematical statement of the problem The number of routes from a to f can be calculated by taking the number via c plus the number via d plus the number via e. In each case this is given by multiplying the number of connections along the edges connecting a to c, c to f etc. This gives the result: Number of routes from a to f = 3 × 2 + 4 × 6 + 1 × 1 = 31.
The nature of matrix multiplication means that the number of routes is obtained by multiplying the matrix representing the number of connections from ab to cde by the matrix representing the number of connections from cde to f g.
Mathematical analysis The matrix representing the number of routes from ab to cde is:
( c^ d^ e a 3 4 1 b 2 1 3
The matrix representing the number of routes from cde to f g is:
f g c 2 1 d 6 3 e 1 2
HELM (2008): Section 7.2: Matrix Multiplication
The product of these two matrices gives the total number of routes.
( 3 4 1 2 1 3
Interpretation We can interpret the resulting (product) matrix by labelling the columns and rows.
f g a 31 17 b 13 11
Hence there are 31 routes from a to f , 17 from a to g, 13 from b to f and 11 from b to g.
Workbook 7: Matrices