Title: ??????12 : Dot Product
1??????12 Dot Product Matrix Operation
- ??????? (Kuang-Chi Chen)
- chichen6_at_mail.tcu.edu.tw
2Linear Equations and MatricesDot Product and
Matrix Multiplication
3Dot Product and Matrix Multiplication
- 1.3 Dot Product and Matrix Multiplication
- Dot Product
- The dot product or inner product of the
n-vectors a and b
4Example 1
- E.g. 1 the dot product of u and v
- uv (1)(2) (-2(3) (3)(-2) (4)(1) -6
5Example 2
- Example 2
- Let and . If
ab -4 , - find x
- ab 4x 2 6 -4
- 4x 8 -4
- x -3
6Example 3
- E.g. 3 Computing a course average
- wg (.10)(78) (.30)(84) (.30)(62)
(.30)(85) - 77.1
7Matrix Multiplication
- Matrix Multiplication
- The product of A and B, denoted by AB C,
- where
- thus
8(contd)
- That is,
-
colj(B) - A
B AB - m?p
p?n m?n
9Example 4
10Example 5
- E.g. 5 Compute the (3, 2) entry of AB
11Example 6 Linear System in Matrix Form
- E.g. 6 Linear system in matrix form
-
- a linear system -
- a matrix form
12Example 7 Find x and y
13AB and BA
- AB and BA
- - BA may not be defined, while BA is defined
- - AB and BA are of different sizes (A2?3 , B3?2)
- - AB and BA are both of the same size and they
may be equal - - AB and BA are both of the same size and they
may not be equal (see example)
14Example 10 AB ? BA
15Example 11 the 2nd column of AB
- E.g. 11 - the second column of AB
16Remark
- Remark inner product and matrix multiplication
- If u and v are n-vectors
- - Both are n?1, then uv uTv
- - Both are 1?n, then uv uvT
- - u is 1?n and v is n?1, then uv uv .
17Example 12 Inner Product Matrix Multiplication
- E.g. 12 inner product and matrix multiplication
18Matrix-vector Product
- The matrix-vector product written in terms of
columns
19(contd)
- A linear combination of the columns of A
20Example 13
21Example 14
22Linear Systems
23Linear Systems (contd)
- We have
- i.e., Ax b
- Here, A is the coefficient matrix (design matrix).
24Augmented Matrix
25Example 15 Augmented Matrix
26Example 16 Augmented Matrix
27Linear Equations and MatricesProperties of
Matrix Operations
28Properties of Matrix Operations
- 1.4 Properties of Matrix Operations
- Theorem 1.1 Properties of matrix addition
- A B B A
commutative law - A (B C) (A B) C associative
law - A O A , (O zero matrix) identity
law - A D O , A (-A) O additive inverse
29Example 1 Zero Matrix
- E.g. 1
- - The 2?2 zero matrix
- - The 2?3 zero matrix
30Example 2
31Example 3 Subtraction
32Properties of Matrix Multiplication
- Theorem 1.2 Properties of matrix multiplication
- (AB)C A(BC) associative
law - A(B C) AB AC distributive
law - (A B)C AC BC .
- No commutative law !
33Example 4 (AB)C A(BC)
- The of multiplications to
compute - A(BC) is 3?4?3 2?3?3 36 18
54 - The of multiplications to
compute - (AB)C is 2?3?4 2?4?3 24 24
48.
34Example 5
35Identity Matrix of Order n
- Definition Identity matrix of order n
- thus, In A A or A In A .
36Example 6
- E.g. 6 Identity matrix
- I2A A AI3 A
37Powers of A Matrix
- Powers of an n?n matrix
- Definition
- thus, A0 In ,
- ApAq Apq ,
- (Ap)q Apq ,
- (AB)p ? ApBp . (why? No commu. law)
38Example 7 No Cancellation Law
- E.g. 7 The cancellation law doesnt hold.
- We know ab ac and a ? 0 ? b c but it
doesnt hold in matrix. (see example)
39Example 8
40Example 9 Markov Chain
- E.g. 9 Example of Markov chain
-
Initial distribution -
of the market
41(contd)
- x2 Ax1 A(Ax0) A2x0 .
- Let x0 a, bT ,
- determine a and b so that the market is stable
- i.e., Ax0 x0 .
42(contd)
We have x0 a, bT , a b 1, and Ax0 x0 ,
i.e., and a
1 b ,
43Properties of Scalar Multiplication
- Theorem 1.3 - Properties of scalar multiplication
- r(sA) (rs)A
(like-associative law) - r(A B) rA rB
(like-distributive law) - (r s)A rA sA
- A(rB) r(AB) (rA)B .
44Example 10
45Properties of Transpose
- Theorem 1.4 Properties of transpose
- (AT)T A (double
transpose law) - (A B)T AT BT
- (AB)T BTAT (Check? If A3?2 , B2?3)
- (rA)T rAT .
46Example 11 Transpose
47Symmetry
- Definition Symmetric
- Let A aijn?n ,
- If AT A , (i.e., aij aji ), then A is
symmetric.
48Example 12 Symmetry
49Linear Equations and MatricesMatrix
Transformation
50Matrix Transformation
- 1.5 Matrix Transformation
- R2 denotes the set of all 2-vectors
- R3 denotes the set of all 3-vectors
- Represented geometrically as directed line
segments in a rectangular coordinate system
51Vector Space 2- 3-vectors
52Example 1 n-Vectors
53Definition of Mapping Function
- If A is an m?n matrix and u is an n-vector, then
Au is an m-vector - - Mapping Rn into Rm
- A mapping function f Rn ? Rm defined by f(u)
Au - - f(u) the image of u
- - the range of f the set of all images of the
vectors in Rm - - f the mapping function
54(No Transcript)
55Example 2 Image
56More Examples of Image
57Example 3
58Solution of Example 3
59Example 4 Reflection
- E.g. 4 Reflection
- Let f R2 ? R2 be the matrix transformation
defined by - The reflection w.r.t. the axis in R2 .
60Example 5 Projection
- Example 5 Projection (3-dim onto 2-dim)
- Let f R3 ? R2 be the matrix transformation
defined by - then
61 contd
- More Projection (3-dim onto xy-plane)
- Let f R3 ? R3 be the matrix transformation
defined by - then
62Example 6
- Example 6
- Let f R3 ? R3 be the matrix transformation
defined by - where
r is a real number, - so we have f(u) ru .
- If r gt 1, then dilation stretches a vector
- if 0 lt r lt 1, then contraction shrinks a
vector.
63Example 7
- Example 7
- - Rotate every point in R2 counterclockwise
through an angle ? about the origin of a
rectangular coordinate system
64(contd)
- Let x r cos ? ,
- y r sin ? ,
- x r cos (? ?) ,
- y r sin (? ?) ,
- since x r cos ? cos ? r sin ? sin ?
, - and y r sin ? cos ? r cos ? sin ? .
65(contd)
- so x x cos ? y sin ? ,
- and y x sin ? y cos ? .
- Thus,
- where u
(x, y)T.
66(contd)
- Similarly, x x cos ? y sin ? ,
- and y -x sin ? y cos ? .
- Thus,
- where u
(x, y)T. - Moreover, f is the inverse function of f .
67(contd)