6.837 Linear Algebra Review Rob Jagnow Monday, September 20, 2004.

Slides:



Advertisements
Similar presentations
Linear Transformations and Matrices Jim Van Verth Lars M. Bishop
Advertisements

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.
Transformations.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
CSC 123 – Computational Art Points and Vectors
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
3-D Geometry.
Computer Graphics CSC 630 Lecture 2- Linear Algebra.
Chapter 2 Matrices Definition of a matrix.
Boot Camp in Linear Algebra Joel Barajas Karla L Caballero University of California Silicon Valley Center October 8th, 2008.
Computer Graphics (Fall 2005) COMS 4160, Lecture 2: Review of Basic Math
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
Week 4 - Monday.  What did we talk about last time?  Vectors.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
2IV60 Computer Graphics Basic Math for CG
Basics of Linear Algebra A review?. Matrix  Mathematical term essentially corresponding to an array  An arrangement of numbers into rows and columns.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 2: Review of Basic Math
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)
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
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
Patrick Nichols Thursday, September 18, Linear Algebra Review.
Recap of linear algebra: vectors, matrices, transformations, … Background knowledge for 3DM Marc van Kreveld.
Modern Navigation Thomas Herring
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
1 Math Review Coordinate systems 2-D, 3-D Vectors Matrices Matrix operations.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
Overview Definitions Basic matrix operations (+, -, x) Determinants and inverses.
Matrices. Definitions  A matrix is an m x n array of scalars, arranged conceptually as m rows and n columns.  m is referred to as the row dimension.
Matrices, Transformations and the 3D Pipeline Matthew Rusch Paul Keet.
Introduction to Matrices and Vectors Sebastian van Delden USC Upstate
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
Review of Matrix Operations Vector: a sequence of elements (the order is important) e.g., x = (2, 1) denotes a vector length = sqrt(2*2+1*1) orientation.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016 Tamara Munzner Math Basics Week 1, Fri.
Ch 6 Vector Spaces. Vector Space Axioms X,Y,Z elements of  and α, β elements of  Def of vector addition Def of multiplication of scalar and vector These.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics Mathematical Fundamentals Lecture 10 Taqdees A. Siddiqi
Linear Algebra Review Tuesday, September 7, 2010.
Unsupervised Learning II Feature Extraction
Boot Camp in Linear Algebra TIM 209 Prof. Ram Akella.
Graphics Graphics Korea University kucg.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Lecture 1 Linear algebra Vectors, matrices. Linear algebra Encyclopedia Britannica:“a branch of mathematics that is concerned with mathematical structures.
Ch. 12 Vocabulary 1.) matrix 2.) element 3.) scalar 4.) scalar multiplication.
Reference: “3D Math Primer for Graphics and Game Development”, chapter 4 INTRO TO MATRICES.
CSE 167 [Win 17], Lecture 2: Review of Basic Math Ravi Ramamoorthi
Week 4 - Monday CS361.
Math Fundamentals Maths revisit.
Linear Algebra review (optional)
Linear Algebra Lecture 2.
Review of Linear Algebra
Review of Matrix Operations
Chapter 7 Matrix Mathematics
Linear Algebra Review.
Lecture 03: Linear Algebra
Chapter II Mathematics: Basics
CSE 541 – Numerical Methods
Chapter 3 Linear Algebra
Basics of Linear Algebra
Linear Algebra review (optional)
Linear Algebra A gentle introduction
Math review - scalars, vectors, and matrices
Game Programming Algorithms and Techniques
3.5 Perform Basic Matrix Operations Algebra II.
Presentation transcript:

6.837 Linear Algebra Review Rob Jagnow Monday, September 20, 2004

6.837 Linear Algebra Review Overview Basic matrix operations (+, -, *) Cross and dot products Determinants and inverses Homogeneous coordinates Orthonormal basis

6.837 Linear Algebra Review Additional Resources Text Book Text Book Check the course website for a copy of these notes

6.837 Linear Algebra Review What is a Matrix? A matrix is a set of elements, organized into rows and columns n columns m rows m×n matrix

6.837 Linear Algebra Review Basic Operations Transpose: Swap rows with columns

6.837 Linear Algebra Review Basic Operations Addition and Subtraction Just add elements Just subtract elements A B A B A+B A A -B A-B A A B

6.837 Linear Algebra Review Basic Operations Multiplication Multiply each row by each column An m×n can be multiplied by an n×p matrix to yield an m×p result

6.837 Linear Algebra Review Multiplication Is AB = BA ? Maybe, but maybe not! Heads up: multiplication is NOT commutative!

6.837 Linear Algebra Review Vector Operations Vector: n × 1 matrix Interpretation: a point or line in n- dimensional space Dot Product, Cross Product, and Magnitude defined on vectors only x y v

6.837 Linear Algebra Review Vector Interpretation Think of a vector as a line in 2D or 3D Think of a matrix as a transformation on a line or set of lines V V’

6.837 Linear Algebra Review Vectors: Dot Product Interpretation: the dot product measures to what degree two vectors are aligned A B A B A=B If A and B have length 1 … A·B = 0A·B = 1 A·B = cos θ θ

6.837 Linear Algebra Review Vectors: Dot Product Think of the dot product as a matrix multiplication The magnitude is the dot product of a vector with itself The dot product is also related to the angle between the two vectors

6.837 Linear Algebra Review Vectors: Cross Product The cross product of vectors A and B is a vector C which is perpendicular to A and B The magnitude of C is proportional to the sin of the angle between A and B The direction of C follows the right hand rule if we are working in a right-handed coordinate system B A A×BA×B

6.837 Linear Algebra Review Vectors: Cross Product The cross-product can be computed as a specially constructed determinant A B A×BA×B

6.837 Linear Algebra Review Inverse of a Matrix Identity matrix: AI = A Some matrices have an inverse, such that: AA -1 = I Inversion is tricky: (ABC) -1 = C -1 B -1 A -1 Derived from non- commutativity property

6.837 Linear Algebra Review Determinant of a Matrix Used for inversion If det(A) = 0, then A has no inverse Can be found using factorials, pivots, and cofactors! Lots of interpretations – for more info, take 18.06

6.837 Linear Algebra Review Determinant of a Matrix For a 3×3 matrix: Sum from left to right Subtract from right to left Note: In the general case, the determinant has n! terms

6.837 Linear Algebra Review Inverse of a Matrix 1.Append the identity matrix to A 2.Subtract multiples of the other rows from the first row to reduce the diagonal element to 1 3.Transform the identity matrix as you go 4.When the original matrix is the identity, the identity has become the inverse!

6.837 Linear Algebra Review Homogeneous Matrices Problem: how to include translations in transformations (and do perspective transforms) Solution: add an extra dimension

6.837 Linear Algebra Review Orthonormal Basis Basis: a space is totally defined by a set of vectors – any point is a linear combination of the basis Orthogonal: dot product is zero Normal: magnitude is one Orthonormal: orthogonal + normal Most common Example:

6.837 Linear Algebra Review Change of Orthonormal Basis Given: coordinate frames xyz and uvn point p = (p x, p y, p z ) Find: p = (p u, p v, p n ) p x y z v u x y v u n p x y u v

6.837 Linear Algebra Review Change of Orthonormal Basis (x. u) u (y. u) u (z. u) u (x. v) v (y. v) v (z. v) v (x. n) n (y. n) n (z. n) n xyzxyz ====== x y z v u n x. u x. v y. v y. u x y v u

6.837 Linear Algebra Review Change of Orthonormal Basis (x. u) u (y. u) u (z. u) u (x. v) v (y. v) v (z. v) v (x. n) n (y. n) n (z. n) n xyzxyz ====== p = (p x, p y, p z ) = p x x + p y y + p z z (x. u) u (y. u) u (z. u) u (x. v) v (y. v) v (z. v) v (x. n) n (y. n) n (z. n) n p x [ p y [ p z [ ] + ] Substitute into equation for p: p =

6.837 Linear Algebra Review Change of Orthonormal Basis (x. u) u (y. u) u (z. u) u (x. v) v (y. v) v (z. v) v (x. n) n (y. n) n (z. n) n p = p x [ p y [ p z [ ] + ] p x (x. u) p x (x. v) p x (x. n) p y (y. u) p y (y. v) p y (y. n) p z (z. u) p z (z. v) p z (z. n) [[[[[[ ] u + ] v + ] n Rewrite: p =

6.837 Linear Algebra Review Change of Orthonormal Basis p x (x. u) p x (x. v) p x (x. n) pupvpnpupvpn ====== p y (y. u) p y (y. v) p y (y. n) p z (z. u) p z (z. v) p z (z. n) p = p x (x. u) p x (x. v) p x (x. n) p y (y. u) p y (y. v) p y (y. n) p z (z. u) p z (z. v) p z (z. n) [[[[[[ ] u + ] v + ] n Expressed in uvn basis: p = (p u, p v, p n ) = p u u + p v v + p n n

6.837 Linear Algebra Review Change of Orthonormal Basis pupvpnpupvpn = pxpypzpxpypz uxvxnxuxvxnx uyvynyuyvyny uzvznzuzvznz In matrix form: u x = x. u where: etc. u y = y. u p x (x. u) p x (x. v) p x (x. n) pupvpnpupvpn ====== p y (y. u) p y (y. v) p y (y. n) p z (z. u) p z (z. v) p z (z. n)

6.837 Linear Algebra Review Change of Orthonormal Basis What's M -1, the inverse? u x = x. u = u. x = x u pupvpnpupvpn = pxpypzpxpypz xuyuzuxuyuzu xvyvzvxvyvzv xnynznxnynzn = M pxpypzpxpypz M -1 = M T pupvpnpupvpn = pxpypzpxpypz uxvxnxuxvxnx uyvynyuyvyny uzvznzuzvznz

6.837 Linear Algebra Review Caveats Right-handed vs. left-handed coordinate systems –OpenGL is right-handed Row-major vs. column-major matrix storage. –matrix.h uses row-major order –OpenGL uses column-major order row-majorcolumn-major

6.837 Linear Algebra Review Questions? ?