Professional Documents
Culture Documents
David Godfrey
Matrices lecture 1 objectives
Slide number 2
What is a matrix?
Slide number 3
Order of matrices…
• Order 4 × 3: 3 columns →
−5 0 1
4 rows 2 3 −4
↓ −9 2 6
3 1 4
• Order 3 × 4: 4 columns→
−5 0 1 2
3 rows
3 −4 −9 2
↓
3 1 4 2
Slide number 4
…Order of matrices
• Order 2 × 4: 4 columns→
2 rows −23 −0.5 4.3 12
↓
8 2 8 1
• Order 1 × 6: 6 columns→
1 rows
[2 1 1 −2 1 −5]
↓
• Order 3 × 1: 1 columns→
3
3 rows
−1
↓
5
Slide number 5
Specifying matrix elements
• a12 = 0
column j→
−5 0 1 • a21 = 2
A= row i 2 3 −4
• a23 = -4
↓ −9 2 6
3 1 4 • a32 = 2
• a41 = 3
• aij denotes the
element of the • a43 = 4
matrix A on the ith
row and jth column.
Slide number 6
What are matrices used for?
• Transformations
• Transitions
• Linear equations
Slide number 7
Matrix operations: scalar multiplication
− 5 0 1 − 15 0 3
2 3 − 4 6 9 − 12
3 =
− 9 2 6 − 27 6 18
3 1 4 9 3 12
− 5 0 1 10 0 −2
2 3 − 4 − 4 − 6 8
−2 =
− 9 2 6 18 − 4 − 12
3 1 4 − 6 − 2 −8
Slide number 8
Matrix operations: addition…
− 5 0 1 1 3 2 − 4 3 3
2 3 − 4 − 1 4 − 5 1 7 − 9
+ =
− 9 2 6 3 1 − 2 − 6 3 4
3 1 4 4 −2 0 7 −1 4
− 5 0 1 1 3 2 − 6 − 3 − 1
2 3 − 4 − 1 4 − 5 3 − 1 1
− =
− 9 2 6 3 1 − 2 − 12 1 8
3 1 4 4 −2 0 −1 3 4
Slide number 9
…Matrix operations: addition
Slide number 10
Matrix operations: multiplication…
Slide number 11
…Matrix operations: multiplication…
• Example 1…
2 −1
−1 0 2 0
3 −2 =
3 1 1
1 −4
(−1×2)+(0×3)+(2×1) =0
2 −1
−1 0 2 0 −7
3 −2 =
3 1 1
1 −4
(−1×−1)+(0×−2)+(2×−4) =−7
Slide number 12
…Matrix operations: multiplication…
• …Example 1
2 −1
−1 0 2 0 −7
3 −2 =
3 1 1 10
1 −4
(3×2)+(1×3)+(1×1) =10
2 −1
−1 0 2 0 −7
3 −2 =
3 1 1
10 −9
1 −4
(3×−1)+(1×−2)+(1×−4) =−9
Slide number 13
…Matrix operations: multiplication…
• Example 2…
2 − 3 3 − 1 3
1 − 4 1 2 =
(2 × 3) + (−3 × 1) = 3
2 − 3 3 − 1 3 − 8
1 − 4 1 2 =
(2 × −1) + (−3 × 2) = −8
Slide number 14
…Matrix operations: multiplication…
• …Example 2
2 − 3 3 − 1 3 − 8
1 − 4 1 2 = − 1
(1× 3) + (−4 × 1) = −1
2 − 3 3 − 1 3 − 8
1 − 4 1 2 = − 1 − 9
(1× −1) + (−4 × 2) = −9
Slide number 15
…Matrix operations: multiplication…
• Example 3
1 −5 3
− 2 6 − 1 0 2
8 = invalid!
3 1 1
4 2 − 1
Slide number 16
…Matrix operations: multiplication…
• Example 4
1
[4 −2] =[−6]
5
(4×1)+(−2×5) =−6
Slide number 17
…Matrix operations: multiplication…
• Example 5…
1 4
5[ 4 − 2] =
(1× 4) = 4
1 4 − 2
5[ 4 − 2] =
(1× −2) = −2
Slide number 18
…Matrix operations: multiplication…
• …Example 5
1 4 − 2
5[ 4 − 2] = 20
(5 × 4) = 20
1 4 −2
5[ 4 − 2] = 20 − 10
(5 × −2) = −10
Slide number 19
…Matrix operations: multiplication
1 2 2 0 2 2
0 1 0 1 = 0 1
Slide number 20
Matrix operations: transpose…
• (A B)T = BT AT
• Note the reversal of order.
• Justification (not a proof):
e.g. if A is 3 × 2 and B is 2 × 4
then AT is 2 × 3 and BT is 4 × 2
so AT BT cannot be multiplied
but BT AT can be multiplied.
Slide number 22
Special matrices: row and column
Slide number 23
Special matrices: square
Slide number 24
Special matrices: diagonal
Slide number 25
Special matrices: triangular
1 0 0 0
− 3 2 0 0
0 −5 3 0
5 0 7 4
• An upper triangular matrix is a square matrix having
all elements below the leading diagonal zero.
e.g.
1 2
0 −1
Slide number 26
Special matrices: null
0 0
0 0 0 0 0
0 0
0 0 0
0 = 0 0 0 =
0 0 0 0
0 0
0 0 0 0 0
0
Slide number 27
Special matrices: identity…
Slide number 28
…Special matrices: identity
Slide number 29
Determinant of a 2×2 matrix…
Slide number 30
…Determinant of a 2×2 matrix…
−2 5 −2 5
det = = (−2×3)−(1×5)=−11
1 3 1 3
Slide number 31
…Determinant of a 2×2 matrix
• |A B| = |A| |B|
• Note the order is not important.
• Justification (not a proof):
We will shortly see that A and B can represent
geometric transformations, and A B represents the
combined transformation of B followed by A. The
determinant represents the factor by which the area is
changed, so the combined transformation changes area
by a factor |A B|. Looking at the individual
transformations, the area of the first is changed by a
factor |B|, and the second by |A|. The overall
transformation is thus changed by a factor |B| |A|, which
is the same as |A| |B|.
Slide number 32
Inverse of a matrix
Slide number 33
Inverse of a 2×2 matrix…
• Note:
The leading term is 1/determinant;
The diagonal elements are swapped;
The cross-diagonal elements change their
sign.
Slide number 34
…Inverse of a 2×2 matrix…
• Example 1
−1
1 2 1 4 − 2 1 4 − 2
− 1 4 = 1 2 1 1 = 6 1 1
−1 4
• Note that A A-1 = I (right inverse)
1 2 1 4 − 2 1 0
− 1 4 6 1 1 = 0 1
and A-1 A = I (left inverse)
1 4 − 2 1 2 1 0
=
6 1 1 − 1 4 0 1
Slide number 35
…Inverse of a 2×2 matrix…
• Example 2
−1
2 2 1 3 −2 1 3 −2 0.3 −0.2
= = =
−2 3 2 22 2 102 2 0.2 0.2
−2 3
• Note that A A-1 = I (right inverse)
2 2 0.3 − 0.2 1 0
− 2 3 0.2 0.2 = 0 1
and A-1 A = I (left inverse)
0.3 − 0.2 2 2 1 0
0.2 0.2 − 2 3 = 0 1
Slide number 36
…Inverse of a 2×2 matrix…
• Example 3
−1
2 2 1 3 −2 13 −2
= = = invalid!
3 3 2 2−3 2 02 2
3 3
• Note that the determinant is zero so the
inverse does not exist for this matrix.
• Matrices with zero determinant can have no
inverse.
• Such matrices are called singular.
Slide number 37
…Inverse of a 2×2 matrix
Slide number 38
Matrices lecture 1 objectives
Slide number 39