??????12 : Dot Product - PowerPoint PPT Presentation

About This Presentation
Title:

??????12 : Dot Product

Description:

12 : Dot Product & Matrix Operation (Kuang-Chi Chen) chichen6_at_mail.tcu.edu.tw Linear Equations and Matrices Dot Product and ... – PowerPoint PPT presentation

Number of Views:152
Avg rating:3.0/5.0
Slides: 68
Provided by: KC66
Category:
Tags: dot | equation | product

less

Transcript and Presenter's Notes

Title: ??????12 : Dot Product


1
??????12 Dot Product Matrix Operation
  • ??????? (Kuang-Chi Chen)
  • chichen6_at_mail.tcu.edu.tw

2
Linear Equations and MatricesDot Product and
Matrix Multiplication
3
Dot 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

4
Example 1
  • E.g. 1 the dot product of u and v
  • uv (1)(2) (-2(3) (3)(-2) (4)(1) -6

5
Example 2
  • Example 2
  • Let and . If
    ab -4 ,
  • find x
  • ab 4x 2 6 -4
  • 4x 8 -4
  • x -3

6
Example 3
  • E.g. 3 Computing a course average
  • wg (.10)(78) (.30)(84) (.30)(62)
    (.30)(85)
  • 77.1

7
Matrix 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

9
Example 4
  • Example 4

10
Example 5
  • E.g. 5 Compute the (3, 2) entry of AB

11
Example 6 Linear System in Matrix Form
  • E.g. 6 Linear system in matrix form

  • - a linear system

  • - a matrix form

12
Example 7 Find x and y
  • E.g. 7 Find x and y

13
AB 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)

14
Example 10 AB ? BA
  • E.g. 10 - AB ? BA

15
Example 11 the 2nd column of AB
  • E.g. 11 - the second column of AB

16
Remark
  • 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 .

17
Example 12 Inner Product Matrix Multiplication
  • E.g. 12 inner product and matrix multiplication

18
Matrix-vector Product
  • The matrix-vector product written in terms of
    columns

19
(contd)
- A linear combination of the columns of A
20
Example 13
  • Example 13

21
Example 14
  • E.g. 14

22
Linear Systems
  • Linear Systems
  • Define

23
Linear Systems (contd)
  • We have
  • i.e., Ax b
  • Here, A is the coefficient matrix (design matrix).

24
Augmented Matrix
  • Augmented Matrix

25
Example 15 Augmented Matrix
  • E.g. 15

26
Example 16 Augmented Matrix
  • Example 16

27
Linear Equations and MatricesProperties of
Matrix Operations
28
Properties 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

29
Example 1 Zero Matrix
  • E.g. 1
  • - The 2?2 zero matrix
  • - The 2?3 zero matrix

30
Example 2
  • Example 2
  • A (-A) O

31
Example 3 Subtraction
  • E.g. 3 Subtraction

32
Properties 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 !

33
Example 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.

34
Example 5
  • E.g. 5 A(B C) AB AC

35
Identity Matrix of Order n
  • Definition Identity matrix of order n
  • thus, In A A or A In A .

36
Example 6
  • E.g. 6 Identity matrix
  • I2A A AI3 A

37
Powers 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)

38
Example 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)

39
Example 8
  • Example 8
  • ,
    but B? C .

40
Example 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 ,
43
Properties 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 .

44
Example 10
  • Example 10
  • r -2 ,

45
Properties 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 .

46
Example 11 Transpose
  • E.g. 11 Transpose

47
Symmetry
  • Definition Symmetric
  • Let A aijn?n ,
  • If AT A , (i.e., aij aji ), then A is
    symmetric.

48
Example 12 Symmetry
  • E.g. 12 Symmetry

49
Linear Equations and MatricesMatrix
Transformation
50
Matrix 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

51
Vector Space 2- 3-vectors
  • Let

52
Example 1 n-Vectors
  • Example 1

53
Definition 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)
55
Example 2 Image
  • Example 2

56
More Examples of Image
57
Example 3
  • Example 3

58
Solution of Example 3
59
Example 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 .

60
Example 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

62
Example 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.

63
Example 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)
  • Note
Write a Comment
User Comments (0)
About PowerShow.com