1 / 33

Magnitude of a Vector

Magnitude of a Vector. The magnitude of a vector, denoted as |a|, is defined as the square root of the sum of the squares of its components: |a| = (x 2 + y 2 ) ½ . if a = (1, 2), its magnitude |a| = (1+4) ½ = 5 ½ .

carson
Télécharger la présentation

Magnitude of a Vector

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Magnitude of a Vector • The magnitude of a vector, denoted as |a|, is defined as the square root of the sum of the squares of its components: |a| = (x2 + y2) ½ . if a = (1, 2), its magnitude |a| = (1+4) ½ = 5 ½ . • The distance between any two points p(x1,y1) and q(x2,y2) in a plane is equal to the magnitude of a vector connecting p and q. |p-q| = [(x1-x2)2 + (y1-y2)2] ½ .

  2. Addition of Two Vectors (14, 8) 8 (6, 6) 6 b c = a + b = (8+6, 2+6) c 4 (8, 2) 2 a (0,0) 2 4 6 8 10 12 14 16

  3. Subtraction of Two Vectors 8 (6, 6) 6 b c (2, -4) c = (a – b) = (8-6, 2-6) 4 (8, 2) 2 a (0,0) 2 4 6 8 10 12 14 16

  4. Scalar Multiplication of a Vector h = 2 8 (12, 8) ha = 6 a = (6, 4) 4 2 (0,0) 2 4 6 8 10 12 14 16

  5. Normal Vector A normal vector has a magnitude equal to one. Any vector a = (x, y) can be normalized as a’ = (x’, y’), by dividing its respective components by its magnitude:

  6. Inner Product of Two Vectors Inner product of two vectors is defined as the sum of the product of the respective components of the two vectors having the same number of components. if a = (x1, y1) and b = (x2, y2), the inner product a·b = x1x2 + y1y2

  7. Inner Product of Two Vectors The inner product of two vectors is also directly related to the angle between them, denoted by: a · b = |a| |b| cosθ The cosineof the angle between two vectors is found by: cosθ= a · b / |a| |b|

  8. Matrix A matrix is a rectangular array of numbers (referred to as elements) arranged in rows and columns. a 11 a 12 a 21 a 22 A =

  9. Addition of Two Matrices If two matrices have the same number of rows and columns, they can be added: 4 5 2 3 1 2 3 6 0 3 2 2 and B = A = 7 11 2 6 3 4 A + B =

  10. Product of Two Matrices • The product AB of two matrices A and B is defined if and only if the number of columns in A is equal to the number of rows in B. • If A is an m x p matrix and B is a p x n matrix, the resulting matrix C is an m x n matrix. • Each element of AB is defined as the inner product of the ith row of A and the jth column of B: cij = ai1b1j +ai2b2j+ ... + aip bpj

  11. Product of Two Matrices 4 5 2 3 1 2 3 0 2 6 3 2 If A = , B = (4) (3) + (5) (6) (4) (0) + (5) (3) (4) (2) + (5) (2) (2) (3) + (3) (6) (2) (0) + (3) (3) (2) (2) + (3) (2) (1) (3) + (2) (6) (1) (0) + (2) (3) (1) (2) + (2) (2) then AB = 42 15 18 24 9 10 15 6 6 =

  12. Some Important Matrices (1) • The zero matrix is any matrix whose elements are all zeroes • A square matrix is any matrix having as many rows as columns • The identity matrix, denoted as I, is defined as a square matrix whose diagonal elements are all ones and all other elements are zeroes • Important properties of an identity matrix: IA = AI = A

  13. Some Important Matrices (2) • The transposed matrix of a matrix A, denoted as AT, is formed by interchanging the rows and columns of A such that row i of A becomes column i of AT and column j of A becomes row j of AT • The symmetric matrix S is a square matrix whose elements sij = sji. For symmetric matrix S, ST = S • The reciprocal matrix of a square matrix A, denoted as A-1, is defined by its unique property: AA-1= I

  14. Determinant(行列式) of a Square Matrix • Determinant is a scalar associated with a square matrix • Let C = The determinant of C, denoted as |C|, is ascertained as: |C| = (x1y2– x2y1) x1 x2 y1 y2

  15. Usages of the Determinant (14, 8) 8 a = (4, 6) 6 C = a, b | C | 4 4 10 6 2 = (10, 2) b = 2 (0,0) 2 4 6 8 10 12 14 16

  16. Homogeneous Coordinates • Homogeneous coordinates are the extension of Cartesian coordinates from any dimension into the next higher dimension • The homogeneous representation of a 2-D point (x, y) is (hx, hy, h), where h is any non-zero scalar • When h = 1, the homogeneous coordinate of 2-D point (x, y) is (x, y, 1)

  17. Translation (1) Translation is used to offset the origin of the coordinate system in order to describe the positional changes of a point (x, y). Suppose that Tx and Tyare increments on the X-axis and Y-axis of the new position of a point (x, y), then the new coordinates: x‘ = x + Tx y‘ = y + Ty

  18. Translation (2) 1 0 0 0 1 0 Tx Ty 1 ( x' y' 1 ) = ( x y 1) Y Y' (x', y') y = (x + Tx y + Ty 1) y (x, y) Tx x (0, 0) X Ty x' (0, 0) X'

  19. Rotation of the Coordinate System (1) • The rotation transformation is used to rotate the original coordinate system about the origin by some angle θ measured in the counter-clockwise direction from the X-axis • The rotation tranformations are defined as: x’ = x cosθ + y sinθ y’ = -x sinθ + y cosθ

  20. Rotation of the Coordinate System (2) cosθ -sinθ 0 sinθ cosθ 0 0 0 1 (x’ y’ 1) = (x y 1) Y Y’ (x’, y’) (x, y) y X’ x’ y’ θ x X

  21. Rotation of the Symboles x’ = x cosθ – y sinθ y’ = x sinθ + y cosθ Y 40 cosθ sinθ 0 -sinθ cosθ 0 0 0 1 A Tr= A’ 30 C’ 20 B’ B C (x’ y’ 1) = (x y 1) Tr θ 10 X -30 -20 -10 0 10 20 30

  22. Scaling (1) x’ = Sx· x y’ = Sy· y Y A’ G H 40 A 30 E F B’ C’ G’ H’ 20 B E’ F’ C 10 -30 -20 -10 0 10 20 30 40 X

  23. Scaling (2) x’ = Sx · x y’ = Sy· y Sx = 0.5 Sy = 1 Y Y X X

  24. Concatenation of Point Transformation (1) Very often it is necessary to perform a sequence of point transformations known as concatenation. The matrix form of point transformation facilitates this process, because a series of transformations can be multiplied in order and stored in a single matrix that represents the whole transformation.

  25. Concatenation of Point Transformation (2) The sequence is important! Given a translation matrix T, and a scaling matrix S, a new point p’ = p·T·S. It is not necessarily equal to p·S·T.

  26. Concatenation of Point Transformation (3) The concatenated matrix C = T·S is defined as: 1 0 0 0 1 0 Tx Ty 1 Sx 0 0 0 Sy 0 TxSx TySy 1 Sx 0 0 0 Sy 0 0 0 1 = The concatenated matrix C = S·T is defined as: 1 0 0 0 1 0 Tx Ty 1 Sx 0 0 0 Sy 0 0 0 1 Sx 0 0 0 Sy 0 Tx Ty 1 =

  27. The Representation of a Straight Line Y Ax + By + C = 0 A B C (x y 1) = 0 Ax + By + C = 0 q (x2, y2) y = mx + b; p (x1, y1) m b Where m = (-A / B) X b = (-C/B) (-C/A)

  28. Direction of a Line Segment y1 – y2 x2 – x1 y2x1 – y1x2 A B C Y = | C | p y2 – y1 x1 – x2 y1x2 – y2x1 q A B C v = Ax + By + C = 0 (0, 0) X

  29. Point-Vector Form • The two endpoints of a line segments can also define the straight line passing from p to q in a point-vector form: L = { (x1, y1) + h (x2 – x1, y2 –y1) | h∊ R } • Thepoint-vector form preserves the direction of the line segment between p and q, and for any point lying on the line segment between p an q, the value of h will be in the closed interval [0, 1]. For example if h = 0.5, then the point lies at the middle of the line segment.

  30. Normalized Straight Line • A straight line L, is normalized by dividing its respective parameters by the magnitude of the vector between p and q, (A2 +B2) ½ A’ B’ C’ A / (A2 + B2) ½ B / (A2 + B2) ½ C / (A2 + B2) ½ | v | = 1 q’ A’x + B’y + C’ = 0 p’ =

  31. Questions for Review (1) • If two points p (1, 2) and q (4, 1) are given, what is the magnitude of the vector v starting from the point p and ending at the point q? • If vector a = (1, 2), b = (4, 3), what is (a + b)? What is (a – b)? What is the angle between these two vectors?

  32. Questions for Review (2) 4 5 2 3 1 2 3 0 2 6 3 2 • Suppose A = B = • What is the product of AB? Does the product BA exist? If it exists, what is BA? • What do the point transforming matrices look like for translation of a point, rotation of the point of the symbol, and scaling the symbol?

  33. Questions for Review (3) • Why is the concatenation of the matrices for point transformation important? What are the advantages of the concatenation? • Why can one say that it is important to study the point and line relationships in digital cartography? ****(Many cartographic functions utilize point and line relationships)

More Related