ENGG2013 Unit 4 Checking out at sushi bar Jan, 2011.
Row and Column Vectors column vector row vector n-dimensional column vector kshumENGG20132 n A list of n numbers written vertically Convention: a vector is by default a column vector in ENGG2013. Convention: The components in a vector are sometime called “scalar”.
Illustration kshumENGG20133 x y (0,0) (5,3) 5 3 (4,4) (1,-1)
Notation using column vector kshumENGG20134 x y 5 3
Notation from Physics kshumENGG20135 x y zhas the same meaning as
Interpretation of vector (I) kshumENGG20136 y (5,3) 5 3 location or
Interpretation of vector (2) kshumENGG20137 y (0,0) (5,3) 5 3 an arrow from the origin or
Interpretation of vector (3) kshumENGG20138 y (0,0) (5,3) 5 3 Any arrow in the same direction with the same length or
Mathematical Notation The set of all 2-D vectors with real numbers as components is denoted by The set of all 3-D vectors with real numbers as components is denoted by The set of all n-D vectors with real numbers as components: kshumENGG20139
Equality for vectors... … is just equality in each component Examples kshumENGG201310
Vector addition … … is just component-wise addition kshumENGG But has no meaning.
Scalar Multiplication Multiply each component by the scalar constant. Interpreted as lengthening, or shortening the vector, but keeping the same direction. kshumENGG x y z
Dot product A.k.a. scalar product, or inner product. For 2-D vector, It measures the “angle” between two vectors. – The dot product of two vectors is zero if the two vectors are perpendicular kshumENGG201313
Dot product in general For n-dimensional vectors in general, we define the dot product as Example kshumENGG Two n-dim vectors are said to be perpendicular, or orthogonal, if their dot product is equal to 0.
Simple properties kshumENGG For any two vectors u, v and w of the same dimension, and constants c and d.
Matrix-vector multiplication Given an m n matrix A, and an n-dimensional vector x, the product of A and x is an m-dimensional vector defined as kshumENGG For double subscripts, the first subscript is the row index and the second is the column index
Just compute dot products m times kshumENGG Dot product of the first row in the matrix and the column vector Dot product of the second row in the matrix and the column vector Dot product of the last row in the matrix and the column vector
Example kshumENGG is un-defined. 2x4 3x1 2x4 4x1 2x1
Checking out in a sushi bar Four prices – Red plate: $10 – Blue plate: $20 – Green plate: $35 – Pink plate: $50 kshumENGG Customer A Customer B RBGP
Nutrition problem kshumENGG In matrix notation: Amounts of food A, B, C and D Requirements of the four nutrients (protein) (carbohydrate) (vitamin A) (vitamin C)
Vector equation Equation involving vectors. E.g. Find a and b such that kshumENGG201321
The nutrition problem as vector equation Just another way to write the same thing. kshumENGG201322
Four different perspectives kshumENGG A system of linear equations Ax = b Augmented matrix Vector equation