Class Notes
(808,240)

Canada
(493,101)

Western University
(47,684)

Mathematics
(261)

Mathematics 1229A/B
(198)

Prof
(7)

Lecture

# unit07.pdf

Unlock Document

Western University

Mathematics

Mathematics 1229A/B

Prof

Fall

Description

Math 1229A/B
Unit 7:
Matrix Operations
(text reference: Section 3.1)
▯V. Olds 2010 Unit 7 91
7 Matrix Operations
At the beginning of Unit 6, we deﬁned the mathematical construct called a matrix. Next we
learn more about matrices, especially how to do matrix arithmetic. First, we should review the
deﬁnition of a matrix. And deﬁne one more term, that we didn’t need in what we have done so far.
Deﬁnition: A matrix is a rectangular array of numbers:
a11 a12 a13 ▯▯▯ a1n
a21 a22 a23 ▯▯▯ a2n
. . . .
. . . .
am1 am2 am3 ▯▯▯ amn
The horizontal lines of numbers are called rows and the vertical lines of numbers are
called columns. The number, aij in row i and column j is called the (i,j)-entry of the
matrix. A matrix with m rows and n columns is called an m × n matrix (pronounced
“m by n”). The numbers m and n are called the dimensions of the matrix.
When one of the dimensions of a matrix is 1, so that the matrix has only one row or one column,
the matrix is very similar to a vector. Because of that, we sometimes use the word vector in describ-
ing the matrix. But we need be clear about which dimension is 1, so we qualify the term vector.
This also helps to remind us that we’re really talking about a matrix, rather than an actual vector.
Deﬁnition: For any value n > 1, a 1 × n matrix can be referred to as a row vector.
Similarly, for any value m > 1, an m×1 matrix can be referred to as a column vector.
Example 7.1. Describe each of the following matrices, and identify both the (1,2)-entry and the
(2,1)-entry, if the matrix has one.
1 2
▯ ▯ 3 4 0 ▯ ▯ ▯ ▯
(a) 1 2 3 (b) 5 6 (c) 1 (d) −3 0 3 2 (e) −32
4 5 5 7
7 8 2
9 10
Solution:
▯ ▯
(a) Since the matrix 1 2 3 has 2 rows and 3 columns, it is a 2 × 3 matrix. The (1,2)-entry
4 5 5
of this matrix is 2 (i.e. the number in row 1, column 2), and the (2,1)-entry is 4 (i.e. the number
in row 2, column 1). (Notice that both in stating the dimensions of the matrix and in referring to a
particular entry, the ﬁrst number always refers to row(s).)
1 2
3 4
(b) The matrix 5 6 has 5 rows and 2 columns, so it is a 5 × 2 matrix. The (1,2)-entry is 2
7 8
9 10
and the (2,1)-entry is 3. 92 Unit 7
0
(c) We have the matrix 1 , which has 3 rows and only 1 column, so this is a 3×1 column vector.
2
Since it doesn’t have any column 2, there is no (1,2)-entry. The (2,1)-entry is 1.
▯ ▯
3
(d) This matrix, −3 0 2 , has only 1 row, with 4 columns, so it is a 1×4 row vector. The
7
(1,2)-entry is 0, and of course there is no (2,1)-entry.
▯ ▯
(e) Is that a matrix? Just −32 ? Sure it is. We can tell by the square brackets around it (as
well as by the fact that the question said that each of the question parts involved a matrix). This
matrix has only 1 row and 1 column. It is a 1 × 1 matrix, and therefore has neither a (1,2)-entry
nor a (2,1)-entry. Its only entry is the (1,1)-entry, which is −32. Note: According to our deﬁnitions
of row vector and column vector, the “other” dimension must be bigger than 1, so a 1 × 1 matrix
is not considered to be either of these things. We just call it a 1 × 1 matrix (which helps us to re-
member that it is a matrix, rather than just a scalar which happens to be written in square brackets.)
There is some more terminology and notation for matrices that we should talk about. In vectors,
we talk about corresponding components, meaning the numbers in the same position in 2 vectors in
the same space. Similarly, when we’re talking about two matrices which have the same dimensions,
we use the term corresponding entries to refer to the numbers in the same positions in the 2
matrices. So for instance if we have two m × n matrices, i.e. with the same values of m and of
n for each, the (1,1)-entries of the 2 matrices are corresponding entries. And the (3,2)-entries of
the matrices, if there are any, are also corresponding entries. In general, the (i,j)-entry of one ma-
trix and the (i,j)-entry of the other matrix, for the same values of i and j, are corresponding entries.
Matrices are named with capital letters. And when a matrix is named with a particular capital
letter, we often use the lower case version of the same letter, subscripted with row and column
indices, to denote entries in the matrix. For instance, if we have a matrix called A, we can ijtoa
denote the (i,j)-entry of A. And then sometimes we want to deﬁne a matrix as the matrix A whose
(i,j)-entry is calledij . We do this by saying “Let A = [aij”, or “Consider the matrix A = [aij”.
So [a ] simply denotes the matrix containing entries which are referred to as a . For instance, we
ij ij
could say “Consider the 2 × 3 matrix A = [a ]ijith a ij= i − j”, which deﬁnes A to be the 2 × 3
matrix in which each entry is its row number minus its column number. So we would have
▯ 0 −1 −2 ▯
A =
1 0 −1
Here is some more terminology that we use:
Deﬁnition:
• Any matrix in which every entry is zero is called a zero matrix. So for any positive
integers m and n, there is an m × n zero matrix.
Notice: This is similar to the idea of the zero vector in ℜ .
• For any n > 1, any n × n matrix is called a square matrix of order n.
That is, a square matrix is just a matrix which has the same number of rows and
columns. And the order of the matrix is the number of rows (or the number of
columns).
• In a square matrix of order n, the entries aii for i = 1,...,n are called the main
diagonal of the matrix.
That is, the main diagonal of a square matrix runs diagonally, from the top left
corner to the bottom right corner of the matrix. Unit 7 93
• Any matrix in which the only non-zero entries appear on the main diagonal is called
a diagonal matrix.
So in a diagonal matrix, all the entrieijfor i ▯= j are 0. Of course, there may
also be some zeroes along the main diagonal.
• The identity matrix of order n is the n×n diagonal matrix in which a ii1 for
all i = 1,...,n. The identity matrix of order n is often denoted I , or just I.
n
That is, an identity matrix is a square matrix which has 1’s all along the main
diagonal, and 0’s everywhere else.
Consider the matrices shown here:
▯ ▯ ▯ ▯ ▯ ▯
0 0 1 2 0 0 0
A = B = C =
0 0 3 4 0 0 0
1 0 0 0
1 0 0
0 1 0 0
D = 0 2 0 I4= 0 0 1 0
0 0 −5
0 0 0 1
Here, A is the 2×2 zero matrix. It is also a square matrix of order 2. And since it is a square matrix,
and all oﬀ-diagonal entries are 0, we could also say that it is a diagonal matrix. (Any square zero
matrix can be said to be a diagonal matrix. But diagonal matrices usually do have some non-zero
entries.) B is another square matrix of order 2. And C is another zero matrix — the 2 × 3 zero
matrix. Matrix D is a square matrix of order 3, and since all the non-zero entries are along the
main diagonal, with zeroes everywhere else, it is a diagonal matrix.4And I , of course, is the identity
matrix of order 4. Which means it’s also a square matrix, and a diagonal matrix. (Notice: We’ve
seen identity matrices before. A square matrix in RREF which doesn’t have any rows of only zeroes
is always an identity matrix.)
Some matrix concepts, deﬁnitions, and/or arithmetic operations are just like the corresponding
concepts, deﬁnitions and/or arithmetic operations for vectors in ℜ . We’ve already seen some, like
the zero matrix. Next we learn some more.
Deﬁnition:
• Matrix Equality: Two matrices are said to be equal if and only if they have the
same dimensions, and their corresponding entries are equal.
That is, A = B if and only if A and B are both m × n matrices (for the same m
and n) and it is true thatij= bijfor all values of i and j.
• Matrix Addition: If A and B have the same dimensions, then the sum of matrices
A and B is obtained by summing the corresponding entries.
So if A and B are both m×n matrices, the matrix C = A+B has c ij= a ij ij for
all i and j. Notice that if A and B do not have the same dimensions, then A + B
is not deﬁned. We can only add matrices which have the same dimensions.
• Scalar Multiplication: For any matrix A and any scalar c, the scalar multiple
cA is obtained by multiplying every element of A by c.
So the matrix B = cA has bij= c(aij for all i and j.
• Negation: For any matrix A, the negative of A, denoted −A, is the matrix
(−1)A. That is, each entry of −A is the negative of the corresponding entry of A,
so if B = −A, then bij= −a ijfor all i and j. 94 Unit 7
• Matrix Subtraction: For any matrices A and B which have the same dimensions,
the matrix diﬀerence A − B is deﬁned to be the sum of A and −B.
That is, if C = A − B, then C = A + (−B), so = a − b for all i and j.
ij ij ij
Notice that each of these works in exactly the same way as the analogous operation for vectors.
Vectors can only be equal, or be added or subtracted, if they’re from the same space. For matrices,
they must have the same dimensions. That is, in both cases, they must have the same number of
entries (components), in the same conﬁguration. And the scalar multiplication operation multiplies
every element by the scalar, both for vectors and for matrices. Likewise, juv = (−1)v, we
have −A = (−1)A for any matrix A.
Example 7.2. State whether matrices A and B are equal.
▯ ▯ ▯ ▯
(a) A = 1 −2 3 B = 1 −2 3
4 0 6 4 0 6
▯ ▯ ▯ ▯
(b) A = 1 0 3 B = 1 0 3
5 1 −2 5 1 2
▯ ▯
1 2 3 1 4
(c) A = B = 2 5
4 5 6 3 6
▯ ▯ 1 0
(d) A = 1 0 B = 0 1
0 1
0 0
Solution:
▯ ▯
(a) A = 1 −2 3 = B
4 0 6
Since A and B are both 2 × 3 matrices andij= bijfor each pair (i,j), they are equal matrices.
▯ 1 0 3 ▯ ▯ 1 0 3 ▯
(b) A = ▯= B =
5 1 −2 5 1 2
Although A and B are both 2 × 3 matrices, with many of their entries identical, there is a combi-
nation ij for whichij▯= bij(i.e. 23= −2 whereas b 23= 2). Therefore, A and B are not equal
matrices.
▯ ▯
1 2 3 1 4
(c) A = ▯= B = 2 5
4 5 6 3 6
Here, A has dimension 2 × 3, whereas B has dimension 3 × 2, so they cannot be equal matrices, no
matter how similar their entries may be.
▯ ▯
1 0 1 0
(d) A = ▯= B = 0 1
0 1 0 0
Again, A and B do not have the same dimension (A is 2×2 while B is 3×2), so they are not equal. Unit 7 95
Before we look at more examples, there is one more matrix operation we should deﬁne. This
one is not like any operation on vectors, because it involves changing the dimensions of the matrix,
by interchanging the rows and columns, which has no counterpart in the context of vectors, since a
vector has only one dimension. Eﬀectively, we turn the matrix sideways, so that the rows become
columns and the columns become rows. We refer to this as transposing, i.e. ﬁnding the transpose
of, the matrix.
Deﬁnition: For any m × n matrix A, the transpose of A, denoted A , is the n × m
matrix whose (i,j)-entry is the (j,i)-entry of A. That is, if B = A , = an bfor
ij ji
all values of i and j.
▯ ▯
1 2 3
For instance, to ﬁnd the transpose of A = , the entries in the ﬁrst row of A become
4 5 6
the entries in the ﬁrst column of and the entries of the second row of A become the entries of
T T
the second column of A . Or, looked at the other way, the ﬁrst column of A is the ﬁrst row of A ,
the second column of A is the second row of and the third column of A is the third row of A .
It doesn’t matter whether we think of switching rows to columns or switching columns to rows —
T
the eﬀect is the same. In terms of entries, iijB = [b ] where B = A , since A is a 2×3 matrix then
B is a 3×2 matrix, with11 = a11 b12= a21 b21= a 12b22 = a22 b31= a13 and 32 = a23 We get
▯ 1 2 3 ▯T 1 4
A T = = 2 5
4 5 6
3 6
2 3 ▯ ▯
1 a b
Example 7.3. If A = −1 4 and B = c 2 −1 , are there any values of a, b and c for
0 −2
T
which A = 2B ?
Solution:
We see that A is a 3 × 2 matrix and B is a 2 × 3 matrix, so this a 3 × 2 matrix. Recall that
T
taking a scalar multiple of a matrix does not change the dimensions of the matrixwill also
be a 3 × 2 matrix. Therefore it may be possible to ﬁnd values of a, b and c for which A = 2B . (If
T
the dimensions of B were not the same as the dimensions as A then it would not be possible for
2B T to be equal to A.) We need to ﬁnd and then 2B . For B T we simply interchange the rows
and columns of B. And then for 2B we multiply each entry of Bby 2. We get:
▯ ▯ 1 c 1 c 2(1) 2(c) 2 2c
B = 1 a b ⇒ B T = a 2 ⇒ 2B T = 2 a 2 = 2(a) 2(2) = 2a 4
c 2 −1
b −1 b −1 2(b) 2(−1) 2b −2
Comparing this last matrix to matrix A, we see that all of the known values match. That is, both
matrices have 2 has their (1,1)-entry, 4 as their (2,2)-entry and −2 as their (3,2)-entry, so it will
be possible to ﬁnd values of a, b and c which make these matrices equal. (If there was any entry
for which known values in the 2 matrices were not identical, then it would not be possible for the
matrices to be equal.)
2 3 2 2c
We need to have −1 4 = 2a 4 , so it must be true that 2c = 3, 2a = −1 and 2b = 0.
0 −2 2b −2
3 1
We see that we need c =2, a = −2and b = 0. 96 Unit 7
Example 7.4. Find the sum of matrices A and B, if possible, in each of the following.
▯ ▯ ▯ ▯
2 −1 3 1 5 0
(a) A = B =
0 2 5 −2 4 −6
▯ ▯ ▯ ▯
−2 3 1 3 −2
(b) A = 1 4 B = −2 1 −3
5
T ▯ ▯
(c) A = 0 − B = 2 7 −4
−3
Solution:
(a) Recall that in order to add two matrices they must have the same dimensions. Since A is a 2×3
matrix and B is also a 2×3 matrix, the sum A+B is deﬁned. Also recall that the sum of two matri-
ces is the matrix whose entries are the sums of the corresponding entries of the two matrices. We get
▯ ▯ ▯ ▯ ▯ ▯ ▯ ▯
2 −1 3 1 5 0 (2 + 1) (−1 + 5) (3 + 0) 3 4 3
A + B = 0 2 5 + −2 4 −6 = (0 − 2) (2 + 4) (5 − 6) = −2 6 −1
(b) This time, A is a 2 × 2 matrix while B is a 2 × 3 matrix. Matrix addition can only be per-
formed when the matrices to be added have the same dimensions, so in this case A+B is not deﬁned.
(c) We see that A is a 3×1 column vector. And sinis a 1×3 row vector, then so andB
therefore B is a 3 × 1 column vector. (Notice: The transpose of the transpose of a matrix is just
the original matrix. So B = (B ) .) Therefore it will be possible to add A and B. But of course,
we need to ﬁnd B. Recall that the negative of a matrix can be obtained by changing the sign of
each entry in the matrix. And of course the negative of the negative of a matrix is just the original
matrix (i.e. −(−M) = M for any matrix M). So here= −(−B ).
−2
T ▯ ▯ T ▯ ▯ ▯ ▯
−B = 2 7 −4 ⇒ B = − 2 7 −4 = −2 −7 4 ⇒ B = −7
4
Now that we have found B (which is, as we knew it would be, a (3 × 1) matrix, so that it can be
added to A), we ﬁnd A + B:
5 −2 5 − 2 3
A + B = 0 + −7 = 0 − 7 = −7
−3 4 −3 + 4 1
Notice: We could have done this more directly as follows, using the fact that the transpose of the
transpose of a matrix is the matrix itself. (That is, if we switch the rows and columns, and then
switch them again, we have just put them back where they were in the ﬁrst place.) So we can
T T
consider B as (B ) , and of course adding can be considered as subtracting the negative of the
matrix, and to subtract one matrix from another we just subtract the corresponding components.
Furthermore, whether we change the signs of a matrix before or after transposing it clearly makes
T T
no diﬀerence. That is, (−= −(B ), so we have
T T T T
A + B = A − (−B) = A − [−(B ) ] = A − (−B )
Therefore to add A and B we can subtract the transposefrom A:
5 5 2 5 − 2 3
T T ▯ ▯T
A+B = A−(−B ) = 0 − 2 7 −4 = 0 − 7 = 0 − 7 = −7
−3 −3 −4 −3 − (−4) 1 Unit 7 97
T T
Example 7.5. Given A and B as follows, ﬁnd (a) 3A − B and (b) (2A − 3I + B ) .
▯ ▯ ▯ ▯
1 2 1 2
A = B =
3 4 −2 0
Solution:
(a) Notice that since A and B are both 2 × 2 matrices, the stated operations are all deﬁned. We
ﬁnd 3A by multiplying each element of A by 3, and then subtract B by subtracting corresponding
components:
▯ ▯ ▯ ▯ ▯ ▯ ▯ ▯
1 2 1 2 3(1) 3(2) 1 2
3A − B = 3 − = −
3 4 −2 0 3(3) 3(4) −2 0
▯ ▯ ▯ ▯
3 − 1 6 − 2 2 4
= =
9 − (−2) 12 − 0 11 12
(b) Recall that I is an identity matrix, i.e. a square matrix whose main diagonal elements are all
1’s and whose oﬀ-diagonal elements are all 0’s. Since I here appears in a sum/diﬀerence of 2 × 2
matrices, clearly i2 is I , i.e. the identity matrix of order 2, which is meant. (That is, we assume that
I here means the particular identity matrix for which the required calculation is deﬁned.) We start
by ﬁnding the matrix whose transpose will be the ﬁnal answer. That is, we can ﬁnd 2A − 3I + B ,
and then take the transpose of that matrix to get (2A − 3I + B ) . We have:
▯ ▯ ▯ ▯ ▯ ▯T
2A − 3I + BT = 2 1 2 − 3 1 0 + 1 2
3 4 0 1 −2 0
▯ ▯ ▯ ▯ ▯ ▯
= 2 4 − 3 0 + 1 −2
6 8 0 3 2 0
▯ ▯ ▯ ▯
= 2 − 3 + 1 4 − 0 + (−2) = 0 2
6 − 0 + 2 8 − 3 + 0 8 5
▯ ▯
Therefore (2A − 3I + B ) = 0 8
2 5
So far we have mostly been dealing with arithmetic operations for matrices which are very similar
to the corresponding arithmetic operations for vectors. But with matrices, there is also a multipli-
cation operation deﬁned. Recall that with vectors, we don’t have a multiplication operation. We do
have two diﬀerent kinds of products, the dot product and the cross product, but neither of these is
considered to be multiplication, so for vectors there is nothing that directly corresponds to multi-
plication. And the dot product operation for vectors is not one which could easily and directly be
3
extended to the context of matrices. Also, the cross product is only deﬁned for vectors in ℜ , so
it is very exclusive and cannot be extended to matrices. However, part of the multiplication op-
eration for matrices will look very familiar, because it does involve what is eﬀectively the dot product.
Matrix Multiplication
Matrix multiplication is more complicated than the other matrix operations that we’ve looked at
so far. It’s not hard, just somewhat more complicated. Once you get the hang of it, it’s easy. But
let’s work up to it gradually, to make sure you remember the steps. First, we’ll look at the rules
about which matrices can be multiplied together?. 98 Unit 7
Deﬁnition: Consider 2 matrices A and B. The matrix product AB is only deﬁned if
A is an m × n matrix and B is an n × p matrix. That is, two matrices can be multiplied
together only when the number of columns in the ﬁrst matrix of the product is the same
as the number of rows in the second matrix of the product.
Well, that’s probably not what you were expecting! It seems a little quirky, but it’s not that
hard a rule. And there’s a good reason for it. Once we learn how to calculate a matrix product,
you’ll see why we need those dimensions to match. And then it will be easy to remember, because if
they don’t match, you won’t be able to calculate the entries of the product matrix. You can think
of it as the “inner” dimensions of the product. That is, if we multiply an m × n matrix times an
n × p matrix, we’re doing (m × n) × (n × p) and it’s those two inside dimensions, that are right
next to each other but from diﬀerent matrices, that have to be the same. (Of course, when we say
(m × n) × (n × p), the middle × doesn’t mean the same thing that the other two do. But the fact
that it looks the same is kind of helpful. Or we could write it as (m×n)▯(n×p), because sometimes
we use ▯ to represent multiplication. And using the ▯ might be even better, to help you remember
what to do ... but we’re not there yet.)
So for instance, if A is a 2 × 3 matrix, and B is a 3 × 2 matrix, then we can form the matrix
product AB, because (2×3)×(3×2) has the 2 inner dimensions matching. We can always mutliply
a “something” by 3 times a 3 by “anything”. Likewise, we can multiply a 3 × 2 times a 2 × 3, so
the matrix product BA is also deﬁned. However, the products A(B ) and (A )B are not deﬁned,
T T
because for A(B ) we’re trying to multiply a 2 × 3 times a 2 × 3, and for (A )B we’re trying to
multiply a 3 × 2 times a 3 × 2. In both of those, the number of rows in the second matrix is not the
same as the number of columns in the ﬁrst matrix.
And now, suppose that we also have C, which is a 2 × 2 matrix. Then we can use C in a matrix
product as the ﬁrst matrix if it’s multiplying a matrix that has 2 rows, or as the second matrix in
the product if it’s being multiplied by a matrix that has 2 columns. So the matrix product CA is
deﬁned (i.e. (2 × 2) × (2 × 3) works) and the matrix product BC is deﬁned (i.e. (3 × 2) × (2 × 2)
works). But the matrix product AC is not deﬁned (because (2 × 3) × (2 × 2) doesn’t match) and
neither is the matrix product CB (because (2 × 2) × (3 × 2) doesn’t match either). On the other
T T
hand, the products (A )C and C(B ) are deﬁned.
A couple of notes about notation
1. We always just write the names of the matrices beside each other to express a matrix
product. We don’t use a × or a ▯ to indicate that we’re multiplying. Just the same
as with unknowns. We never write x × y, we just write xy to say x times y. With
numbers, we need a multiplication symbol between them, or brackets, because two
number written beside each other means something else ... another number. (e.g. if
we write 62, that doesn’t mean 6 times 2, it means sixty-two.) But if A is a matrix
and B is a matrix, then AB never means anything but A times B, so we don’t need
a symbol to say “times”.
2. When we write a T to indicate the transpose of a matrix, it always means just the
matrix it’s attached to, i.e. right beside. So we don’t usually write something like
A(B ). There’s no need for the brackets. We just write AB T and we know that it
T
means A times the transpose of B, because the is on the B. If we wanted to say
“the transpose of the product matrix AB”, then we would have to write it as (AB) .
We need the brackets, so that the transpose can be “attached” to the brackets to
show that it’s the whole thing inside the brackets that is being transposed. Unit 7 99
Example 7.6. Consider the matrices shown here:
▯ ▯ ▯ ▯ 5 1 0 −2 5
A = 2 −1 3 B = −2 3 C = 0 D = 0 3 4 −1
0 2 5 1 4
−3 5 −1 2 4
How many diﬀerent matrix products of the form M 1 a2e deﬁned, where each of M an1 M is 2
either one of the given matrices or the transpose of one of the given matrices?
Solution:
A is a 2×3 matrix, so A is a 3×2 matrix. Both B and B T are 2×2 matrices. C is a 3×1 matrix
T T
and D is a 3 × 4 matrix, so Cis a 1 × 3 matrix and D is a 4 × 3 matrix.
Let’s consider the matrices, one by one, as the ﬁrst matrix in the product, and see which of the 8
matrices could be the second matrix in the product. We can form a matrix product of the form
AM for any matrix M which has 3 rows, i.e. as long as M is a 3 × n matrix for any value n.
T
Therefore the products AA , AC and AD are all deﬁned. For the matrix product BM, M must be
a 2 × n matrix. A satisﬁes this requirement, as do B itself, and its transpose, so the products BA,
T T
BB and BB are all deﬁned. For CM we would need M to be a 1 × n matrix. Only C meets
this requirement, so the only product of this form which is deﬁned is CC . And DM requires that
T T
M be a 4×n matrix, which only describes D , so DD is the only product with D as the ﬁrst matrix.
T
Of course, we could also have a transposed matrix as the ﬁrst matrix in the product. For A M we
need M to be a 2×n matrix, and that means that A A, A B and A BT T are all deﬁned. Since B
is a 2 × 2 matrix, we can again have any of those same matrices as the second matrix in a product
B M, so B A, B B and B B T T are deﬁned. C M needs M to be a 3 × n matrix, so C C, C DT
T T T
and C A are all deﬁned. Similarly, since also has 3 columns, it can multiply any of those same
matrices, that all have 3 rows, so D C, D D and D A T are all deﬁned.
Using only these 4 matrices and their transposes, any of 20 diﬀerent matrix products can be formed.
Notice: For any matrix M, if M is an m × n matrix, then MT is an n × m matrix, so both MM T
T T T
and M M are deﬁned. And if M is a square matrix, then both MM and M M are also deﬁned.
Okay, so we know which matrix products are deﬁned. But what do we get when we multiply one
matrix by another? That is, if the matrix product AB is deﬁned, what does it produce? Well, it
gives a new matrix. And the 2 inner dimensions, that are the same, collapse in on themselves and
disappear, as we see in the following.
Deﬁnition: If A is an m×n matrix and B is an n×p matrix, then the product matrix
AB has dimensions m×p. That is, multiplying and m×n matrix times an n×p matrix
produces an m × p matrix.
For instance, if we multiply a 3 × 4 matrix times a 4 × 2 matrix, we get a 3 × 2 matrix. If we
multiply a 2 × 1 matrix times a 1 × 2 matrix we get a 2 × 2 matrix, but if we reverse the order of
the matrices in the product, so that we’re multiplying a 1 ×2 matrix times a 2× 1 matrix, we get a
1 × 1 matrix, i.e. a matrix containing only a single number.
Example 7.7. Recall the matrices deﬁned in Example 7.6. Which of the matrix products identiﬁed
in that example as be

More
Less
Related notes for Mathematics 1229A/B