Professional Documents
Culture Documents
1 Matrix Operations
1
The double subscript notation refers to the en-
tries of the matrix A: the entry of A in row i
and column j is denoted by aij .
a11 a12 . . . a1n
a a22 . . . a2n
A = [aij ]m×n = 21
... ... ... ...
am1 am2 . . . amn
2
• A square matrix:
an m × n matrix with
2 3 4
m = n. eg. 4 −1 0
1 1 −5
•
An identity
matrix: a 1 scalar matrix. eg.
1 0 0
0 1 0
0 0 1
3
Two matrices are equal if they have the same
size and if their corresponding entries are equal
i.e.
A = [aij ]m×n = B = [bij ]r×s
if and only if
4
Matrix addition and scalar multiplication
Example
2 1 0 3 −4 3 5 1
If A = −1 0 2 4 and B = 2 2 0 −1
4 −2 7 0 3 2 −4 5
−2 4 5 4
then A + B = 1 2 2 3.
7 0 3 5
" #
3 2
If C = , then C + A =?
1 6
5
If A = [aij ] is a m × n matrix and c is a scalar,
then the scalar multiple cA is the m×n matrix
obtained by multiplying each entry of A by c,
i.e.,
cA = [caij ]
Example
" # " #
2 3 4 0 2 7
Let A = and B = .
1 3 1 −1 3 −5
" # " #
4 6 8 0 −2 −7
Then 2A = and (−1)B = .
2 6 2 1 −3 5
6
If A = [aij ] and B = [bij ] are both m × n matri-
ces, then their difference A − B is the m × n
matrix obtained by adding A and the negative
of B, i.e.
A − B = A + (−B)
Example
2 1 0 3 −4 3 5 1
Let A = −1 0 2 4, B = 2 2 0 −1
4 −2 7 0 3 2 −4 5
" #
3 2
and C =
1 6
6 −2 −5 2
Then A − B = −3 −2 2 5 .
1 −4 11 −5
C − B =?.
7
A matrix all of whose entries are zero is called
a zero matrix and is denoted by O (Om×n if
the size is important).
A+O =A=O+A
A − A = O = −A + A
8
Example
" # " #
3 −1 0 1 −1 1
Let A = , B = and
1 2 −4 −2 0 6
" #
1 0 −2
C= . Compute A + B − C.
3 1 1
Example
" #
3 −1 4
Solve for a, b, c, d, e and f if A = ,
2 0 6
" # " #
a b c 7 −7 14
B= and 3A − 2B = ,
d e f 6 −6 14
9
Matrix multiplication
Some remarks:
10
The (i, j) entry of the matrix AB is the dot
product of the ith row of A and the j th column
of B:
n
X
cij = aik bkj
k=1
a a12 . . . a1n
11
b . . . b1j . . . b1r
... ... ... ...
11
b21 . . . b2j . . . b2r
a ai2 . . . ain
i1 ...
. . . ... . . . ...
... ... ... .
.
.
bn1 . . . bnj . . . bnr
am1 am2 . . . amn
11
Example
3 0 " #
4 −1
Let A = −1 2 and B = Compute
0 2
1 1
AB and BA if possible.
12
Example Compute the following products
" #" #
3 1 2 −1
1.
5 2 −5 3
" 3 #
5 0 −7
2. 1
1 5 9
−1
h i 3 0
3. 1 3 −3 −2 1
0 6
1 h i
4. 1 4 0 1
−3
13
Note that a system
x + 2y − z = 5
−x − y + z = −2
2x + y − 2z = 1
1 2 −1 x 5
−1 −1 1 y = −2
2 1 −2 z 1
or
Ax = b
14
Theorem 1 (Theorem 3.1) Let A be an n ×
m matrix; ei a 1 × n standard unit vector; ej an
m × 1 standard unit vector. Then
1 2 3 0 2
4 5 6 1 = 5
7 8 9 0 8
h i 1 2 3 h i
0 0 1 4 5 6 = 7 8 9
7 8 9
15
Partitioned Matrices
Let A be m × n and B be n × r
If we hpartition B in terms ofiits column vectors:
B = b1 ... b2 ... · · · ... br , then
16
Example (Example
" #
3.9) " #
3 0 4 −2 1
Let A = and B = . Com-
−1 5 0 2 3
pute AB using the matrix-column representa-
tion of the product.
17
Using the matrix-column representation we can
write the columns of AB as a linear combina-
tion of the columns of A:
" # " #
3 0 4 −2 1
Let A = and B = . Then
−1 5 0 2 3
18
Let A be m × n and B be n × r.
If we partition
A in terms of its row vectors,
A1
···
A2
A = ···
then
...
···
Am
A1 A1 B
··· ···
A2 A2 B
AB = · · · B = ···
... ...
··· ···
Am Am B
This is called the row-matrix representation
of AB.
19
Example (Example
" #
3.10) " #
3 0 4 −2 1
Let A = and B = . Com-
−1 5 0 2 3
pute AB using the row-matrix representation
of the product.
20
Using the row-matrix representation we can
write the rows of AB as a linear combination
of the rows of B:
" # " #
3 0 4 −2 1
Let A = and B = . Then
−1 5 0 2 3
A1 B
···
A2 B
AB = · · ·
...
···
Am B
where
h i h i h i
A1B = 3 0 B = 3 4 −2 1 + 0 0 2 3
h i h i h i
A2B = −1 5 B = −1 4 −2 1 + 5 0 2 3
21
Let A be m × n and B be n × r. If we partition
A into columns and B into rows then
B1
· · ·
B
i 2
a1 ... a2 ... · · · ... a
h
AB = n · · ·
...
· · ·
Bn
22
Example (Example
" #
3.11) " #
3 0 4 −2 1
Let A = and B = . Com-
−1 5 0 2 3
pute the outer product expansion of AB.
23
Partitioned conformably for block multipli-
cation
.
.
.
2 3 .. 0
1 −1 . 0 0 ... 0
0 .
. −1 1
1 . 0 0 .
.
AB = · · · · · · . · · ·
.
· · · · · · .. · · · · · ·
.
. 0 0 .. 1
0 0 .. 2 3
0 0 ... 1
.
.
A11 . A12
B11 ... B
12
= · · · ... · · · · · · ... · · ·
A21 ... A22 B21 ... B
22
" #
A11B11 + A12B21 A11B12 + A12B22
=
A21B12 + A22B21 A21B12 + A22B22
24
Matrix Powers
1. Ar As = Ar+s
2. (Ar )s = Ars
25
Example (Example 3.13)
" #
1 1
• Let A = . Compute A2 and A3.
1 1
" #
1 0
• Find An if A = .
−1 1
26
The Transpose of a Matrix
27
A square matrix A is symmetric if AT = A,
i.e., if A is equal to its own transpose.
28
Exercises
29