Linear Algebra A gentle introduction

Slides:



Advertisements
Similar presentations
CS 450: COMPUTER GRAPHICS LINEAR ALGEBRA REVIEW SPRING 2015 DR. MICHAEL J. REALE.
Advertisements

3D Geometry for Computer Graphics
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.
Geometry (Many slides adapted from Octavia Camps and Amitabh Varshney)
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
Chapter 4.1 Mathematical Concepts
Computer Graphics Recitation 5.
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.
3-D Geometry.
Computer Graphics CSC 630 Lecture 2- Linear Algebra.
Vectors.
Boot Camp in Linear Algebra Joel Barajas Karla L Caballero University of California Silicon Valley Center October 8th, 2008.
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.
Linear Algebra Review By Tim K. Marks UCSD Borrows heavily from: Jana Kosecka Virginia de Sa (UCSD) Cogsci 108F Linear.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 2: Review of Basic Math
1 Matrix Math ©Anthony Steed Overview n To revise Vectors Matrices n New stuff Homogenous co-ordinates 3D transformations as matrices.
Mathematical Fundamentals
Rotations and Translations
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.
Patrick Nichols Thursday, September 18, Linear Algebra Review.
Chapter 2 – Linear Transformations
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Overview Definitions Basic matrix operations (+, -, x) Determinants and inverses.
Matrices, Transformations and the 3D Pipeline Matthew Rusch Paul Keet.
6.837 Linear Algebra Review Rob Jagnow Monday, September 20, 2004.
Introduction to Matrices and Vectors Sebastian van Delden USC Upstate
Robot Kinematics: Position Analysis 2.1 INTRODUCTION  Forward Kinematics: to determine where the robot ’ s hand is? (If all joint variables are known)
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016 Tamara Munzner Math Basics Week 1, Fri.
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
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.
CPT450 – Computer Graphics
CSE 167 [Win 17], Lecture 2: Review of Basic Math Ravi Ramamoorthi
Week 4 - Monday CS361.
Math Fundamentals Maths revisit.
Linear Algebra review (optional)
Mathematics for Computer Graphics
Transforms.
Linear Algebra Lecture 2.
Review of Linear Algebra
Review of Matrix Operations
Problem 1.5: For this problem, we need to figure out the length of the blue segment shown in the figure. This can be solved easily using similar triangles.
Chapter 7 Matrix Mathematics
Review: Transformations
Outline Addition and subtraction of vectors Vector decomposition
Review: Transformations
Linear Algebra Review.
Lecture 03: Linear Algebra
COMP 175: Computer Graphics February 9, 2016
ECE 383/ME 442: Intro to Robotics and Automation
CSE 541 – Numerical Methods
Chapter 3 Linear Algebra
CSE 411 Computer Graphics Lecture #2 Mathematical Foundations
Linear Algebra review (optional)
Math review - scalars, vectors, and matrices
Game Programming Algorithms and Techniques
Presentation transcript:

Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable as calculus, and fortunately it is easier. --Gilbert Strang, MIT

What is a Vector ? Think of a vector as a directed line segment in N-dimensions! (has “length” and “direction”) Basic idea: convert geometry in higher dimensions into algebra! Once you define a “nice” basis along each dimension: x-, y-, z-axis … Vector becomes a 1 x N matrix! v = [a b c]T Geometry starts to become linear algebra on vectors like v! From 2D to 3D In 2D,(a,b) is the point, combined with origin, [a,b]’is a direction. upgrade to 3D, [a b c]’also can decide a direction 2. Emphasize the transpose and column vector y v x

(use the head-to-tail method to combine vectors) Vector Addition: A+B A+B A A+B = C (use the head-to-tail method to combine vectors) B C B A

Scalar Product: av av v A scalar is just a number, no direction included. So scalar product does not change direction. Change only the length (“scaling”), but keep direction fixed. Sneak peek: matrix operation (Av) can change length, direction and also dimensionality!

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

Inner (dot) Product: v.w or wTv  The inner product is a SCALAR! Do the operation first Example: [a1 a2].[b1 b2]=?? [a1 a2 a3].[b1 b2 b3]= Show m*n n*b trick to emphasize the result of dot product is scalar If vectors v, w are “columns”, then dot product is wTv

Bases & Orthonormal Bases Basis (or axes): frame of reference vs Basis: a space is totally defined by a set of vectors – any point is a linear combination of the basis Ortho-Normal: orthogonal + normal [Sneak peek: Orthogonal: dot product is zero Normal: magnitude is one ]

What is a Matrix? A matrix is a set of elements, organized into rows and columns rows columns

Basic Matrix Operations Addition, Subtraction, Multiplication: creating new matrices (or functions) Just add elements Just subtract elements Addition and subtraction must be done in same dimension Do multiplication together Multiply each row by each column

Matrix Times Matrix

Multiplication Is AB = BA? Maybe, but maybe not! Matrix multiplication AB: apply transformation B first, and then again transform using A! Heads up: multiplication is NOT commutative! Note: If A and B both represent either pure “rotation” or “scaling” they can be interchanged (i.e. AB = BA)

Matrix operating on vectors Matrix is like a function that transforms the vectors on a plane Matrix operating on a general point => transforms x- and y-components System of linear equations: matrix is just the bunch of coeffs ! x’ = ax + by y’ = cx + dy ú û ù ê ë é = ' y x d c b a

Direction Vector Dot Matrix

Matrices: Scaling, Rotation, Identity Pure scaling, no rotation => “diagonal matrix” (note: x-, y-axes could be scaled differently!) Pure rotation, no stretching => “orthogonal matrix” O Identity (“do nothing”) matrix = unit scaling, no rotation! r1 0 0 r2 [0,1]T [0,r2]T scaling [r1,0]T [1,0]T cos -sin sin cos [-sin, cos]T [0,1]T rotation [cos, sin]T  [1,0]T

Scaling P’ P a.k.a: dilation (r >1), contraction (r <1) r 0 0 r

Rotation P P’ cos -sin sin cos

2D Translation P’ t P P x y tx ty P’ t

Inverse of a Matrix Identity matrix: AI = A Inverse exists only for square matrices that are non-singular Maps N-d space to another N-d space bijectively Some matrices have an inverse, such that: AA-1 = I Inversion is tricky: (ABC)-1 = C-1B-1A-1 Derived from non-commutativity property

Determinant of a Matrix Used for inversion If det(A) = 0, then A has no inverse http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/threeD/index.htm

Projection: Using Inner Products (I) p = a (aTx) ||a|| = aTa = 1

Homogeneous Coordinates Represent coordinates as (x,y,h) Actual coordinates drawn will be (x/h,y/h)

Homogeneous Coordinates The transformation matrices become 3x3 matrices, and we have a translation matrix! x’ y’ 1 1 0 tx 0 1 ty 0 0 1 x y 1 = New point Transformation Original point Exercise: Try composite translation.

Homogeneous Transformations

Order of Transformations Note that matrix on the right is the first applied Mathematically, the following are equivalent p’ = ABCp = A(B(Cp)) Note many references use column matrices to represent points. In terms of column matrices p’T = pTCTBTAT T R M

Rotation About a Fixed Point other than the Origin Move fixed point to origin Rotate Move fixed point back M = T(pf) R(q) T(-pf)

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 A×B B A

MAGNITUDE OF THE CROSS PRODUCT

DIRECTION OF THE CROSS PRODUCT The right hand rule determines the direction of the cross product

For more details Prof. Gilbert Strang’s course videos: http://ocw.mit.edu/OcwWeb/Mathematics/18-06Spring-2005/VideoLectures/index.htm Esp. the lectures on eigenvalues/eigenvectors, singular value decomposition & applications of both. (second half of course) Online Linear Algebra Tutorials: http://tutorial.math.lamar.edu/AllBrowsers/2318/2318.asp