450
Relations, Functions, and Matrices
One might expect that multiplication of matrices would simply involve multiplying corresponding elements in the two matrices, but the definition is more
complicated than that. The definition of matrix multiplication is based on the use
of matrices in mathematics to represent functions called linear transformations,
which map points in the real-number plane to points in the real-number plane.
Although we won’t use matrices in this way, we will use the standard definition
for matrix multiplication.
To compute a times b, a # b, the number of columns in a must equal the
number of rows in b. (This requirement means that the number of elements in a
single row of a equals the number of elements in a single column of b.) Thus we
can compute a # b if a is an n × m matrix and b is an m × p matrix. The result
is an n × p matrix. An entry in row i, column j of a # b is obtained by multiplying
all the elements in row i of a by the corresponding elements in column j of b and
adding the results. Formally, a # b = C, where
c ij = ∙
m
k=1
a ik b kj
example 69
Let
a = c
2
4 3
4 −1 2
d
b = £
5 3
2 2
6 5
§
a is a 2 × 3 matrix and b is a 3 × 2 matrix, so the product a # b exists and is a
2 × 2 matrix C. To find element c l1 , we multiply corresponding elements of row 1
of a and column 1 of b and add the results.
2(5) + 4(2) + 3(6) = 10 + 8 + 18 = 36
c
2
4 3
4 −1 2
d £
5 3
2 2
6 5
§ = c
36
—
—
—
d
Element c 12 is obtained by multiplying corresponding elements of row 1 of a and
column 2 of b and adding the results.
example 68
If a and b are n × m matrices and r and s are scalars, the following matrix
equations are true:
0 + a = a
a + b = b + a
(a + b) + C = a + (b + C)
r (a + b) = ra + rb
(r + s)a = ra + sa
r (sa) = (rs)a
To prove that a + b = b + a, for instance, it is sufficient to note that
a ij + b ij = b ij + a ij for each entry in matrices a and b.
Relations, Functions, and Matrices
One might expect that multiplication of matrices would simply involve multiplying corresponding elements in the two matrices, but the definition is more
complicated than that. The definition of matrix multiplication is based on the use
of matrices in mathematics to represent functions called linear transformations,
which map points in the real-number plane to points in the real-number plane.
Although we won’t use matrices in this way, we will use the standard definition
for matrix multiplication.
To compute a times b, a # b, the number of columns in a must equal the
number of rows in b. (This requirement means that the number of elements in a
single row of a equals the number of elements in a single column of b.) Thus we
can compute a # b if a is an n × m matrix and b is an m × p matrix. The result
is an n × p matrix. An entry in row i, column j of a # b is obtained by multiplying
all the elements in row i of a by the corresponding elements in column j of b and
adding the results. Formally, a # b = C, where
c ij = ∙
m
k=1
a ik b kj
example 69
Let
a = c
2
4 3
4 −1 2
d
b = £
5 3
2 2
6 5
§
a is a 2 × 3 matrix and b is a 3 × 2 matrix, so the product a # b exists and is a
2 × 2 matrix C. To find element c l1 , we multiply corresponding elements of row 1
of a and column 1 of b and add the results.
2(5) + 4(2) + 3(6) = 10 + 8 + 18 = 36
c
2
4 3
4 −1 2
d £
5 3
2 2
6 5
§ = c
36
—
—
—
d
Element c 12 is obtained by multiplying corresponding elements of row 1 of a and
column 2 of b and adding the results.
example 68
If a and b are n × m matrices and r and s are scalars, the following matrix
equations are true:
0 + a = a
a + b = b + a
(a + b) + C = a + (b + C)
r (a + b) = ra + rb
(r + s)a = ra + sa
r (sa) = (rs)a
To prove that a + b = b + a, for instance, it is sufficient to note that
a ij + b ij = b ij + a ij for each entry in matrices a and b.
