MATH 4A - Linear Algebra With Applications: Lecture 7: Matrix Operations
MATH 4A - Linear Algebra With Applications: Lecture 7: Matrix Operations
15 April 2019
Lecture plan
2 Matrix multiplication
Motivation
So far, we’ve done two types of things things with matrices:
1 Used them to solve linear systems.
2 Showed that every linear transformation has a matrix.
We still have two leftover issues, respectively:
1 What is going on geometrically with row operations? Note
that if all we wanted to do was solve linear systems, we’ve
succeeded at that wonderfully. We’ve even succeeded at
proving the row reduction method works. However, I would
say that at this point, it’s still unclear what the heck row
operations are doing intuitively/geometrically.
2 Use matrices to actually say something interesting about
linear transformations, beyond just that every linear
transformation has a matrix.
The algebra of matrix operations we develop today will allow us to
address these issues.
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
Caveat
In order to add two matrices A and B, they must have the same
size. For example, it does not make sense to add
1 2 3 4 0
A= and B = ,
0 0 1 3 2
iClicker 1
(a) 21
(b) 30
(c) 41
(d) 25
(e) 16
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
Theorem
Let A, B and C be matrices of the same size, and let r and s be
two scalars. Then:
(a) (Commutativity of matrix addition) A + B = B + A
(b) (Associativity of matrix addition) (A + B) + C = A + (B + C )
(c) (0 matrix is an additive identity) A + 0 = A
(d) (Linearity of scalar multiplication) r (A + B) = rA + rB
(e) (Linearity of scalar multiplication) (r + s)A = rA + sB
(f) (Associativity of scalar multiplication) r (sA) = (rs)A
iClicker 2
Let
1 2 3 4 32 21 1 0
4 8 12 16 0 0 0 0
A=
8 16 24 32 and B =
97 32 1 −2
−1 −2 13 32 5 7 8 9
Recall last week that we said there wasn’t a good (or rather,
useful) way to define multiplication of two column vectors in Rn .
iClicker 3
(a) 19
(b) This question makes no sense.
(c) 34
(d) 27
(e) 18
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
1 4 5 3 2
AB =
9 0 0 4 8
1·5+4·0 1·3+4·4 1·2+4·8
=
9·5+0·0 9·3+0·4 9·2+0·8
5 19 34
=
45 27 18
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
iClicker 4
(a) 19
(b) This question makes no sense.
(c) 34
(d) 27
(e) 18
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
S ◦ T : Rn → Rp
Applying S ◦ T
Applying T Applying S
S(T (x))
x
T (x)
Rn Rm Rp
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
Applying S ◦ T
S(T (x))
x
T (x)
Rn Rm Rp
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
AB.
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
Identity matrix
For example:
1 0 0 0
1 0 0
1 0 0 1 0 0
I1 = 1 , I2 = , I3 = 0 1 0 , I4 =
0 1 0 0 1 0
0 0 1
0 0 0 1
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
Im x = x
Im B = B
AIm = A.
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
Theorem
Let A, B and C be matrices. Then, whenever the following matrix
products make sense, we have identities:
(a) (associativity of matrix multiplication) A(BC ) = (AB)C
(b) (left distributive law) A(B + C ) = AB + AC
(c) (right distributive law) (B + C )A = BA + CA
(d) (commutativity of scalar multiplication)
r (AB) = (rA)B = A(rB) for any scalar r
(e) (identity matrices are multiplicative identities) Im A = A = AIn
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
Caveats
1 0 0 1 0 1 0 0 0 1 1 0
= 6= =
0 0 0 0 0 0 0 0 0 0 0 0
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
0 1 0 0 0 1 1 0
=
0 0 0 0 0 0 0 0
(because
both matrix products are 0) but we can’t cancel out
0 1
because
0 0
0 0 1 0
6=
0 0 0 0
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
0 1 1 0
=0
0 0 0 0
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
Powers of a matrix
Ak = AA · · · A (k times)
Transpose of a matrix
Examples of transpose
Let
4 2
a b
A= B = 9 1 C= 0 0 0
c d
0 3
Then
0
a c 4 9 0
AT = BT = CT = 0
b d 2 1 3
0
Sums and scalar multiples of matrices Matrix multiplication Other operations: power and transpose
Properties of transpose
Theorem
Let A and B denote two matrices whose sizes are appropriate for
the following sums or products
(a) (AT )T = A
(b) (A + B)T = AT + B T
(c) For any scalar r , (rA)T = rAT
(d) (AB)T = B T AT