O Matrix Multiplication Properties of Matrices Commutativity Composition
O Matrix Multiplication Properties of Matrices Commutativity Composition
3 4 7
2 1 3
3 4 7
2 1 3
_
_
1
3
5
_
_
as follows
Ax = 1v
1
+ 3v
2
+ 5v
3
= 1
3
2
+ 3
4
1
+ 5
7
3
22
2
.
If x =
_
_
2
4
5
_
_
, then we can nd
3 4 7
2 1 3
_
_
2
4
5
_
_
as follows
Ax = 2v
1
+ 4v
2
+ 5v
3
= 2
3
2
+ 4
4
1
+ 5
7
3
57
7
.
D.A. Smith 3 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Theorem
If the column vectors of an n m matrix A are v
1
, v
2
, ..., v
m
and x is a
vector with entries x
1
, x
2
, ..., x
m
, then Ax = x
1
v
1
+ x
2
v
2
+ + x
m
v
m
.
Proof.
The proof follows from the following equation.
Ax =
_
_
| |
v
1
v
m
| |
_
_
x =
_
_
v
11
v
1m
.
.
.
.
.
.
.
.
.
v
n1
v
nm
_
_
_
_
x
1
x
2
.
.
.
x
m
_
_
=
_
_
v
11
x
1
+ v
12
x
2
+ + v
1m
x
m
.
.
.
v
n1
x
1
+ v
n2
x
2
+ + v
nm
x
m
_
_
n1
= x
1
v
1
+ x
2
v
2
+ + x
m
v
m
D.A. Smith 4 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Corollary
Let A be an n m matrix, x and y be m1 column vectors, and let k be a
scalar. Then the following hold.
1. A(x +y) = A(x) + A(y)
2. A(kx) = kA(x)
Proof.
Since the column vectors x andy are matrices and the matrices
A(x +y), A(x) + A(y), A(kx), and kA(x) are dened. Using properties
of matrices already proven, A(x +y) = A(x) + A(y) and
A(kx) = kA(x) easily follows.
D.A. Smith 5 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Every year Money magazine selects several cities in the United States
as the best" cities to live in, based on a wide array of statistics about
each city.
This is an example of how the editors of Money might arrive at a single
number that consolidates the statistics about a city.
We will analyze Los Angeles, Chicago and New York City, based on
four criteria: average high temperature in July (Fahrenheit), number of
colleges and universities in a 30-mile radius, number of toxic waste
sites in the Superfund environmental clean-up program and a personal
crime index based on FBI statistics (average = 100, smaller is safer).
It should be apparent how to generalize the example to a greater
number of cities and a greater number of statistics.
City Temp College Superfund Crime
Los Angeles 77 28 93 254
Chicago 84 38 85 363
New York 84 99 1 193
D.A. Smith 6 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Now we must combine the statistics for each city.
We could accomplish this by weighting each category, scaling the
values and summing them. The sizes of the weights would depend
upon the numerical size of each statistic generally, but more
importantly, they would reect the editors opinions or beliefs about
which statistics were most important to their readers.
Is the crime index more important than the number of colleges and
universities? Of course, there is no right answer to this question.
Suppose the editors nally decide on the following weights to employ:
temperature, 0.23; colleges, 0.46; Superfund, 0.05; crime, 0.20.
Notice how negative weights are used for undesirable statistics.
City Temp College Superfund Crime
Los Angeles 77 28 93 254
Chicago 84 38 85 363
New York 84 99 1 193
D.A. Smith 7 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Suppose the editors nally decide on the following weights to employ:
temperature, 0.23; colleges, 0.46; Superfund, 0.05; crime, 0.20.
Notice how negative weights are used for undesirable statistics.
Then, for example, the editors would compute for Los Angeles,
(0.23)(77) + (0.46)(28) + (0.05)(93) + (0.20)(254) = 24.86.
_
0.23
0.46
0.05
0.20
_
_
then the matrix-vector product yields A w =
(0.23)
_
_
77
84
84
_
_
+ (0.46)
_
_
28
38
99
_
_
+ (0.05)
_
_
93
85
1
_
_
+ (0.20)
_
_
254
363
193
_
_
=
_
_
24.86
40.05
26.21
_
_
D.A. Smith 8 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Theorem
Let B be an n p matrix and A and p m matrix with columns v
1
, ..., v
m
. Then
the product BA is BA = B
v
1
v
m
Bv
1
Bv
m
.
Let B =
3 4 7
2 1 3
and A =
_
_
1 2
3 4
1 5
_
_
. Then
BA =
3 4 7
2 1 3
_
_
1 2
3 4
1 5
_
_
=
3 4 7
2 1 3
v
1
v
2
3 4 7
2 1 3
v
1
3 4 7
2 1 3
v
2
=
_
_
3 4 7
2 1 3
_
_
1
3
5
_
_
3 4 7
2 1 3
_
_
2
4
5
_
_
_
_
=
22 57
2 7
4 5 6
1 8 9
and B =
_
_
1 2 3
2 1 5
2 5 1
_
_
Solution: Since A is a 2 3 matrix and B is a 3 3 matrix we see that
AB is dened as a 2 3 matrix and BA is not dened.
AB =
_
4 5 6
_
_
1
2
2
_
_
4 5 6
_
_
2
1
5
_
_
4 5 6
_
_
3
5
1
_
_
1 8 9
_
_
1
2
2
_
_
1 8 9
_
_
2
1
5
_
_
1 8 9
_
_
3
5
1
_
_
_
_
=
2 43 19
3 51 52
t
A
it
(BC)
tj
=
t
A
it
s
B
ts
C
sj
=
s
A
it
B
ts
C
sj
=
t
A
it
B
ts
C
sj
=
t
A
it
B
ts
C
sj
=
s
(AB
is
)C
sj
= [(AB)C]
ij
.
D.A. Smith 12 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Proof of A(B + C) = AB + AC:
(2) Let A
ij
, B
ij
, and C
ij
denote the entries of matrices A, B and C of
sizes mn, n p, and n p, respectively. Then
B + C = [B
ij
+ C
ij
], so the (i, j)th entry of A(B + C) is
n
k=1
A
ik
B
kj
+ C
kj
=
n
k=1
A
ik
B
kj
+ A
ik
C
kj
=
n
k=1
A
ik
B
kj
+
n
k=1
A
ik
C
kj
this is the (i, j)th entry of AB + AC because the sums on the right
are the (i, j)th entries of AB and AC, respectively. Hence
A(B + C) = AB + AC.
(3) The proof of this part is left for the reader as an exercise.
D.A. Smith 13 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Proof of AI = A:
(4)
_
_
a
11
a
12
a
1n
a
21
a
22
a
2n
.
.
.
.
.
.
.
.
.
.
.
.
a
m1
a
m2
a
mn
_
_
_
_
1 0 0 0
0 1 0 0
0 0 1 0
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0 0 0 1
_
_
=
_
_
a
11
a
12
a
1n
a
21
a
22
a
2n
.
.
.
.
.
.
.
.
.
.
.
.
a
m1
a
m2
a
mn
_
_
and the (i, j)th entry of AI is the ith row of A times the jth column of I
a
i1
a
i2
a
ij
a
in
0
0
.
.
.
1
.
.
.
0
Position j
So the (i, j)th entry of AI is a
ij
, the (i, j)th entry of A. Thus, AI = A.
D.A. Smith 14 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
The matrix properties listed
1. A(BC) = (AB)C
2. A(B + C) = AB + AC
3. (B + C)A = BA + CA
4. AI = A
5. IA = A
are called the
1. associative,
2. left distributive,
3. right distributive,
4. left identity, and
5. right identity
property for matrix multiplication,
respectively.
D.A. Smith 15 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Example
Find all matrices that commute with A =
1 2
0 1
.
Solution: Let B =
a b
c d
1 2
0 1
a b
c d
a + 2c b + 2d
c d
BA =
a b
c d
1 2
0 1
a 2a + b
c 2c + d
.
Since a + 2c = a it follows that c = 0.
Since b + 2d = 2a + b it follows that a = d.
Thus all matrices that commute with A have the form
a b
0 a
.
D.A. Smith 16 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Example
Suppose that A, B, and C are n n matrices and that both A and B
commute with C. Show that AB commutes with C.
Solution: To show that AB commutes with C we need to show
(AB)C = C(AB). This is easy since
(AB)C = A(BC) = A(CB) = (AC)B = (CA)B = C(AB).
Can you justify each step?
D.A. Smith 17 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Example
Show that AB = BA if and only if (A B)(A + B) = A
2
B
2
.
Solution: Suppose AB = BA, we will show (AB)(A + B) = A
2
B
2
.
Starting with the left-hand side we obtain
(A B)(A + B) = (A B)A + (A B)B = A
2
BA + AB B
2
= A
2
BA + BA B
2
= A
2
B
2
Now suppose (AB)(A+B) = A
2
B
2
, we will show AB = BA. This
is easy since
(A B)(A + B) = A
2
BA + AB B
2
= A
2
B
2
implies BA + AB = 0 as desired.
D.A. Smith 18 /20
Matrix Multiplication Properties of Matrices Commutativity Composition
Recall on an earlier slide we showed:
AB =
4 5 6
1 8 9
_
_
1 2 3
2 1 5
2 5 1
_
_
=
2 43 19
3 51 52
.
The corresponding linear transformations T : R
3
R
2
and
S : R
3
R
3
and are dened by T(x) = Ax and S(x) = Bx where
y
1
= 4x
1
5x
2
+ 6x
3
y
2
= x
1
+ 8x
2
9x
3
_
_
y
1
= x
1
+ 2x
2
3x
3
y
2
= 2x
1
1x
2
+ 5x
3
y
3
= 2x
1
+ 5x
2
1x
3
Notice S T is not dened; however, T S is dened! The linear
transformation T S : R
3
R
2
is dened by (T S)(x) = (AB)x
2 43 19
3 51 52
y
1
= 2x
1
+ 43x
2
19x
3
y
2
= 3x
1
51x
2
+ 52x
3
D.A. Smith 19 /20
THE END
Thank you for your time and attention.
http://www.uta.edu/faculty/dsmith/
Mon. & Wed. & Fri. 3:00 to 4:00 pm. Pickard Hall 443
[email protected]