Linear Transformations and Matrices Jim Van Verth Lars M. Bishop

Slides:



Advertisements
Similar presentations
Our Friend the Dot Product
Advertisements

Vectors, Points, Lines and Planes Jim Van Verth Lars M. Bishop
Affine Transformations
CS 450: COMPUTER GRAPHICS LINEAR ALGEBRA REVIEW SPRING 2015 DR. MICHAEL J. REALE.
Elementary Linear Algebra Anton & Rorres, 9th Edition
Matrices A matrix is a rectangular array of quantities (numbers, expressions or function), arranged in m rows and n columns x 3y.
MF-852 Financial Econometrics
Maths for Computer Graphics
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 12 System of Linear Equations.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 14 Elimination Methods.
Chapter 2 Matrices Definition of a matrix.
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.
Boot Camp in Linear Algebra Joel Barajas Karla L Caballero University of California Silicon Valley Center October 8th, 2008.
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
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
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.
Elementary Linear Algebra Howard Anton Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 1.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 2: Review of Basic Math
Elementary Linear Algebra Howard Anton Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 1.
Chapter 10 Review: Matrix Algebra
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.
Vectors & Matrices Marq Singer
 Row and Reduced Row Echelon  Elementary Matrices.
Matrix Algebra. Quick Review Quick Review Solutions.
MATH 250 Linear Equations and Matrices
ENM 503 Block 2 Lesson 7 – Matrix Methods
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
1 Math Review Coordinate systems 2-D, 3-D Vectors Matrices Matrix operations.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
Matrices. A matrix, A, is a rectangular collection of numbers. A matrix with “m” rows and “n” columns is said to have order m x n. Each entry, or element,
Matrices Addition & Subtraction Scalar Multiplication & Multiplication Determinants Inverses Solving Systems – 2x2 & 3x3 Cramer’s Rule.
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.
6.837 Linear Algebra Review Rob Jagnow Monday, September 20, 2004.
Linear Algebra 1.Basic concepts 2.Matrix operations.
2009/9 1 Matrices(§3.8)  A matrix is a rectangular array of objects (usually numbers).  An m  n (“m by n”) matrix has exactly m horizontal rows, and.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
ME 142 Engineering Computation I Matrix Operations in Excel.
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.
LEARNING OUTCOMES At the end of this topic, student should be able to :  D efination of matrix  Identify the different types of matrices such as rectangular,
CS 450: COMPUTER GRAPHICS TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
Section 2.1 Determinants by Cofactor Expansion. THE DETERMINANT Recall from algebra, that the function f (x) = x 2 is a function from the real numbers.
Linear System of Simultaneous Equations Warm UP First precinct: 6 arrests last week equally divided between felonies and misdemeanors. Second precinct:
Linear Algebra Review Tuesday, September 7, 2010.
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.
Matrices, Vectors, Determinants.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
Lecture 1 Linear algebra Vectors, matrices. Linear algebra Encyclopedia Britannica:“a branch of mathematics that is concerned with mathematical structures.
A very brief introduction to Matrix (Section 2.7) Definitions Some properties Basic matrix operations Zero-One (Boolean) matrices.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
1 Matrix Math ©Anthony Steed Overview n To revise Vectors Matrices.
College Algebra Chapter 6 Matrices and Determinants and Applications
MTH108 Business Math I Lecture 20.
CSE 167 [Win 17], Lecture 2: Review of Basic Math Ravi Ramamoorthi
Chapter 7 Matrix Mathematics
Matrices and Matrix Solutions
Linear independence and matrix rank
Chapter II Mathematics: Basics
Lecture 11 Matrices and Linear Algebra with MATLAB
RECORD. RECORD COLLABORATE: Discuss: Is the statement below correct? Try a 2x2 example.
Linear Algebra review (optional)
Linear Algebra A gentle introduction
Presentation transcript:

Linear Transformations and Matrices Jim Van Verth Lars M. Bishop

Essential Math for Games Transformation Have some geometric data How to apply functions to it? Also desired: combine multiple steps into single operation For vectors: linear transformations

Essential Math for Games Transformations A transformation T : V W is a function that maps elements from vector space V to W The function f(x, y) = x 2 + 2y is a transformation because it maps R 2 into R

Essential Math for Games Linear Transformation Two basic properties: T(x + y) = T(x) + T(y) T(ax) = aT(x) Follows that T(0) = 0 T(ax+y) = aT(x) + T(y)

Essential Math for Games Linear Transformations Basis vectors span vector space Know where basis goes, know where rest goes So we can do the following: Transform basis Store as columns in a matrix Use matrix to perform linear transforms

Essential Math for Games Linear Transforms Example: (1,0) maps to (1,2) (0,1) maps to (2,1) Matrix is

Essential Math for Games What is a Matrix? Rectangular m x n array of numbers M rows by n columns If n=m, matrix is square

Essential Math for Games Matrix Concepts Number at row i and column j of matrix A is element A ij Elements in row i make row vector Elems in column j make column vector If at least one A ii (diagonal from upper left to lower right) are non-zero and all others are zero, is diagonal matrix

Essential Math for Games Transpose Represented by A T Swap rows and columns along diagonal A T ij = A ji Diagonal is invariant

Essential Math for Games Transpose Transpose swaps transformed basis vectors from columns to rows Useful identity

Essential Math for Games Transforming Vectors Represent vector as matrix with one column # of components = columns in matrix Take dot product of vector w/each row Store results in new vector

Essential Math for Games Transforming Vectors Example: 2D vector Example: 3D vector to 2D vector

Essential Math for Games Row Vectors Can also use row vectors Transformed basis stored as rows Dot product with columns Pre-multiply instead of post-multiply If column default, represent row vector by v T

Essential Math for Games Row vs. Column Using column vectors, others use row vectors Keep your order straight! Transpose to convert from row to column (and vice versa) Row vector order (DirectX) Column vector order (us, OpenGL)

Essential Math for Games Matrix Product Want to combine transforms What matrix represents ? Idea: Columns of matrix for S are xformed basis Transform again by T

Essential Math for Games Matrix Product In general, element AB ij is dot product of row i from A and column j from B or

Essential Math for Games Matrix product (contd) Number of rows in A must equal number of columns in B Generally not commutative Is associative

Essential Math for Games Block Matrices Can represent matrix with submatrices Product of block matrix contains sums of products of submatrices

Essential Math for Games Identity Identity matrix I is square matrix with main diagonal of all 1s Multiplying by I has no effect A I = A

Essential Math for Games Inverse A -1 is inverse of matrix A such that A -1 reverses what A does A is orthogonal if A T = A -1 Component vectors are at right angles and unit length I.e. orthonormal basis

Essential Math for Games Computing Inverse Only square matrices have inverse Inverse doesnt always exist Zero row, column means no inverse Use Gaussian elimination or Cramers rule (see references)

Essential Math for Games Computing Inverses Most interactive apps avoid ever computing a general inverse Properties of the matrices used in most apps can simplify inverse If you know the underlying structure of the matrix, you can use the following:

Essential Math for Games Computing Inverse If orthogonal, A -1 = A T Inverse of diagonal matrix is diagonal matrix with A -1 ii = 1/A ii If know underlying structure can use Well use this to avoid explicit inverses

Essential Math for Games Storage Format Row major Stored in order of rows Used by DirectX

Essential Math for Games Storage Format (contd) Column Major Order Stored in order of columns Used by OpenGL, and us

Essential Math for Games Storage Format (contd) Note: storage format not the same as multiplying by row vector Same memory footprint: Matrix for multiplying column vectors in column major format Matrix for multiplying row vectors in row major format I.e. two transposes return same matrix

Essential Math for Games System of Linear Equations Define system of m linear equations with n unknowns b 1 = a 11 x 1 + a 12 x 2 + … + a 1n x n b 2 = a 21 x 1 + a 22 x 2 + … + a 2n x n … b m = a m1 x 1 + a m2 x 2 + … + a mn x n

Essential Math for Games System of Linear Equations Matrix multiplication encapsulates linear system

Essential Math for Games Matrix multiplication encapsulates linear system Solve for x Multiplying by inverse imprecise Use Gaussian elimination, or other methods (see refs) System of Linear Equations

Essential Math for Games References Anton, Howard and Chris Rorres, Elementary Linear Algebra, 7 th Ed, Wiley & Sons, Axler, Sheldon, Linear Algebra Done Right, Springer Verlag, Blinn, Jim, Notation, Notation, Notation, Morgan Kaufmann, 2002.