Académique Documents
Professionnel Documents
Culture Documents
You almost certainly met matrices during A-Levels, and youll see them
again in Linear Algebra. In any case you need to know about matrices for
this module. In this chapter I summarize what you need to know. Well
not cover this chapter in the lectures; I expect you to read it on your own.
Even if you think you know all about matrices I advise you to read this
chapter: do you know why matrix multiplication is defined the way it is?
Do you know why matrix multiplication is associative?
A, B , C are matrices. The matrix A has size 23 because it has 2 rows and
3 columns. Likewise B has size 3 2 and C has size 3 3.
Displaying a matrix A by writing
a 11 a 12 a 13 . . . a 1n
a 21 a 22 a 23 . . . a 2n
A = .. .. .
.. ..
. . . .
a m1 a m2 a m3 . . . a mn
Definition. The zero matrix of size m n is the unique m n matrix
whose entries are all 0. This is denoted by 0mn , or simply 0 if no con-
fusion is feared.
Definition. Let A = (a i j )mn and B = (b i j )np . We define the product
AB to be the matrix C = (c i j )mp such that
ci j = ai 1 b1 j + ai 2 b2 j + ai 3 b3 j + + ai n bn j .
Note the following points:
For the product AB to be defined we demand that the number
of columns of A is equal to the number of rows of B .
The i j -th element of AB is obtained by taking the dot product of
the i -th row of A with the j -th column of B .
Example IV.5. Let
1 2 5 3
A= , B= .
1 3 0 2
Both A and B are 2 2. From the definition we know that A B will be a
2 2 matrix. We see that
15+20 1 3 + 2 2 5 7
AB = = .
1 5 + 3 0 1 3 + 3 2 5 3
Likewise
5 1 + 3 1 5 2 3 3 8 1
BA= = .
0 1 2 1 0 2 + 2 3 2 6
We make a very important observation: AB 6= B A in this example. So
matrix multiplication is not commutative.
Example IV.6. Let A be as in the previous example, and let
2 1 3
C= .
3 4 0
Then
8 7 3
AC = .
7 13 3
However, C A is not defined because the number of columns of C is not
equal to the number of rows of A.
Remark. If m 6= n, then we cant multiply two matrices in M mn (R). How-
ever, matrix multiplication is defined on M nn (R) and the result is again
in M nn (R). In other words, multiplication is a binary operation on M nn (R).
Exercise IV.7. CommutativityWhat can go wrong?
Give a pair of matrices A, B , such that AB is defined but B A isnt.
Give a pair of matrices A, B , such that both AB and B A are de-
fined but they have different sizes.
18 IV. MATRICESREAD ON YOUR OWN
1Algebraists have many idiosyncrasies that distinguish them from other mathe-
maticians. I find most of these bewildering. However, they do have a very good point
in the way they write functions. We said that B A means do A first and then B , because
(B A)u = B (Au). However if you use row vectors then u(B A) = (uB )A, so B A means do B
first then A, which seems entirely natural.
IV.6. MULTIPLICATIVE IDENTITY AND MULTIPLICATIVE INVERSE 23
y
projection onto the y-axis
L
S1 S2 S3
x
We want C 1C = I 2 . But
1 a b 0 0 0 b
C C= = .
c d 0 1 0 d
We see that no matter what choices of a, b, c, d we make, this will not
equal I 2 as the bottom-left entries dont match. So C is not invertible.
P ROOF. The proof is mostly left as an exercise for the reader. Parts (a), (b)
follow from the definition and effortless calculations (make sure you do
them). For (c) note that
det(A 1 A) = det(I 2 ) = 1.
Now applying (ii) we have 1 = det(A 1 ) det(A). We see that det(A) 6= 0 and
det(A 1 ) = 1/ det(A).
a b
Exercise IV.14. Suppose u = and v = are non-zero vectors, and
c d
a b
let A be the matrix with columns u and v; i.e. A = . Show (al-
c d
gebraically) that det(A) = 0 if and only if u, v are parallel. Explain this
geometrically.
28 IV. MATRICESREAD ON YOUR OWN
IV.7. Rotations
We saw above some examples of transformations in the plane: reflec-
tion, stretching, projection. In this
section we take a closer look at rota-
x
tions about the origin. Let P = be a point in R2 . Suppose that this
y
point is rotated anticlockwise about the origin
0
through an angle of . We
x
want to write down the new point P 0 = 0 in terms of x, y and . The
y
easiest way to do this to use polar coordinates. Let the distance of P from
the origin O be r and let the angle OP makes with the positive x-axis be
; in other words the polar coordinates for P are (r, ). Thus
x = r cos , y = r sin .
Since we rotated P anticlockwise about the origin through an angle to
obtain P 0 , the polar coordinates for P 0 are (r, + ). Thus
x 0 = r cos( + ), y 0 = r sin( + ).
We expand cos( + ) to obtain
x 0 = r cos( + )
= r cos cos r sin sin
= x cos y sin .
Similarly
y 0 = x sin + y cos .
We can rewrite the two relations
x 0 = x cos y sin , y 0 = x sin + y cos ,
in matrix notation as follows
cos sin x
0
x
= .
y0 sin cos y
Thus anticlockwise rotation about the origin through an angle can be
achieved by multiplying by the matrix 1
cos sin
R = .
sin cos
cos 4 sin 4
x
1Is this clever . . . or lame: x
= ?
sin 4 cos 4 y
y