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.

Slides:



Advertisements
Similar presentations
CSNB143 – Discrete Structure
Advertisements

Chapter Matrices Matrix Arithmetic
1 3D Vector & Matrix Chapter 2. 2 Vector Definition: Vector is a line segment that has the direction. The length of the line segment is called the magnitude.
Matrices A matrix is a rectangular array of quantities (numbers, expressions or function), arranged in m rows and n columns x 3y.
Mathematics. Matrices and Determinants-1 Session.
MF-852 Financial Econometrics
Maths for Computer Graphics
Chapter 4.1 Mathematical Concepts
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Computer Graphics CSC 630 Lecture 2- Linear Algebra.
Ch 7.2: Review of Matrices For theoretical and computation reasons, we review results of matrix theory in this section and the next. A matrix A is an m.
CALCULUS – II Matrix Multiplication by Dr. Eman Saad & Dr. Shorouk Ossama.
Boot Camp in Linear Algebra Joel Barajas Karla L Caballero University of California Silicon Valley Center October 8th, 2008.
Lecture 7: Matrix-Vector Product; Matrix of a Linear Transformation; Matrix-Matrix Product Sections 2.1, 2.2.1,
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
Stats & Linear Models.
3.8 Matrices.
Chapter 1: Matrices Definition 1: A matrix is a rectangular array of numbers arranged in horizontal rows and vertical columns. EXAMPLE:
Compiled By Raj G. Tiwari
Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)
Sundermeyer MAR 550 Spring Laboratory in Oceanography: Data and Methods MAR550, Spring 2013 Miles A. Sundermeyer Linear Algebra & Calculus Review.
1 February 24 Matrices 3.2 Matrices; Row reduction Standard form of a set of linear equations: Chapter 3 Linear Algebra Matrix of coefficients: Augmented.
ECON 1150 Matrix Operations Special Matrices
Elementary Linear Algebra Anton & Rorres, 9th Edition
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Matrices and Vectors Objective.
Chapter 8 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Matrix Operations and Their Applications.
Statistics and Linear Algebra (the real thing). Vector A vector is a rectangular arrangement of number in several rows and one column. A vector is denoted.
8.1 Matrices & Systems of Equations
Chapter 4 – Matrix CSNB 143 Discrete Mathematical Structures.
Sect. 4.2: Orthogonal Transformations
Introduction to Matrices and Vectors Sebastian van Delden USC Upstate
Matrices A matrix is a table or array of numbers arranged in rows and columns The order of a matrix is given by stating its dimensions. This is known as.
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
Prepared by Deluar Jahan Moloy Lecturer Northern University Bangladesh
Chapter 6 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Matrix Operations and Their Applications.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.
Matrices Section 2.6. Section Summary Definition of a Matrix Matrix Arithmetic Transposes and Powers of Arithmetic Zero-One matrices.
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
Chun-Yuan Lin Mathematics for Computer Graphics 2015/12/15 1 CG.
1.3 Matrices and Matrix Operations. A matrix is a rectangular array of numbers. The numbers in the arry are called the Entries in the matrix. The size.
Matrices and Determinants
MATRICES Operations with Matrices Properties of Matrix Operations
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
 An image is the new figure, and the preimage is the original figure  Transformations-move or change a figure in some way to produce an image.
Boot Camp in Linear Algebra TIM 209 Prof. Ram Akella.
1 Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors. Review Matrices.
Matrix Algebra Definitions Operations Matrix algebra is a means of making calculations upon arrays of numbers (or data). Most data sets are matrix-type.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
= y1y1 y2y2 y3y y 1 = = 14 xxx Calculate y 1 : ROW 1 Matrix-Vector multiplication.
MATRICES A rectangular arrangement of elements is called matrix. Types of matrices: Null matrix: A matrix whose all elements are zero is called a null.
Matrices. Matrix A matrix is an ordered rectangular array of numbers. The entry in the i th row and j th column is denoted by a ij. Ex. 4 Columns 3 Rows.
Matrices Introduction.
MTH108 Business Math I Lecture 20.
12-1 Organizing Data Using Matrices
Transforms.
2D Transformations with Matrices
Chapter 5 2-D Transformations.
Matrices and Vectors Review Objective
Linear Algebra Review.
Matrices Introduction.
Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors.
MATRICES Operations with Matrices Properties of Matrix Operations
Presentation transcript:

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 ½. The distance between any two points p(x 1,y 1 ) and q(x 2,y 2 ) in a plane is equal to the magnitude of a vector connecting p and q. |p-q| = [(x 1 -x 2 ) 2 + (y 1 -y 2 ) 2 ] ½.

Addition of Two Vectors (0,0) a b c (8, 2) (6, 6) (14, 8) c = a + b = (8+6, 2+6)

Subtraction of Two Vectors (0,0) a b c (8, 2) (6, 6) (2, -4) c = (a – b) = (8-6, 2-6)

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

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:

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 = (x 1, y 1 ) and b = (x 2, y 2 ), the inner product a·b = x 1 x 2 + y 1 y 2

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

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

Addition of Two Matrices If two matrices have the same number of rows and columns, they can be added: A = and B = A + B =

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 : c ij = a i1 b 1j +a i2 b 2j a ip b pj Product of Two Matrices

If A =, B = then AB = (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) =

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

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

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 | = (x 1 y 2 – x 2 y 1 ) x1 x2 y1 y2

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

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)

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 T x and T y are increments on the X-axis and Y-axis of the new position of a point (x, y), then the new coordinates: x‘ = x + T x y‘ = y + T y Translation (1)

Translation (2) (0, 0) X Y X'X' Y'Y' (x', y') (x, y) x'x' x y y TxTx TyTy ( x' y' 1 ) = ( x y 1) T x T y 1 = (x + T x y + T y 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θ Rotation of the Coordinate System (1)

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

Rotation of the Symboles X Y θ A B C A’A’ B’B’ C’C’ x’ = x cosθ – y sinθ y’ = x sinθ + y cosθ Tr =Tr = cosθ sinθ 0 -sinθ cosθ (x’ y’ 1) = (x y 1) T r

Scaling (1) X A B C Y B’B’ C’C’ A’A’ E F G H E’E’F’F’ G’G’ H’H’ x’ = S x · x y’ = S y · y

Scaling (2) X X Y Y S x = 0.5 S y = 1 x’ = S x · x y’ = S y · y

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.

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. Concatenation of Point Transformation (2)

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

The Representation of a Straight Line Ax + By + C = 0 X Y p (x 1, y 1 ) q (x 2, y 2 ) b m ABCABC (x y 1) = 0 y = mx + b; Where m = (-A / B) b = (-C/B) (-C/A)

Direction of a Line Segment A B C A B C y 1 – y 2 x 2 – x 1 y 2 x 1 – y 1 x 2 y 2 – y 1 x 1 – x 2 y 1 x 2 – y 2 x 1 = = Ax + By + C = 0 (0, 0) X Y p q v | C |

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 } The point-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. Point-Vector Form

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

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?

Suppose A = Questions for Review (2) 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?

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 ) Questions for Review (3)