Docsity

Linear Algebra Review: Matrices, Vector Operations, Determinants, and Inverses, Slides of Computer Science

Partial preview of the text

Download Linear Algebra Review: Matrices, Vector Operations, Determinants, and Inverses and more Slides Computer Science in PDF only on Docsity!

6.837 Linear Algebra Review6.837 Linear Algebra Review

6.837 Linear Algebra Review6.837 Linear Algebra Review

OverviewOverview

  • Basic matrix operations (+, -, *) • Cross and dot products • Determinants and inverses • Homogeneous coordinates • Orthonormal basis

6.837 Linear Algebra Review6.837 Linear Algebra Review

What is a Matrix?What is a Matrix?

  • A matrix is a set of elements, organizedinto rows and columns

d

c

b

a

rows

columns

6.837 Linear Algebra Review6.837 Linear Algebra Review

Basic OperationsBasic Operations

  • Addition, Subtraction, Multiplication

h d g c

f b e a h g

f e d c

b a^

Just add elements

⎤ ⎥ ⎦

h d g c

f b e a h g

f e d c

b a^

Just subtract elements ⎤ ⎥ ⎦

dh cf dg ce

bh af bg ae h g

f e d c

b a^

Multiply each rowby each column

6.837 Linear Algebra Review6.837 Linear Algebra Review

Vector OperationsVector Operations

  • Vector: 1 x N matrix • Interpretation: a linein N dimensionalspace • Dot Product, CrossProduct, andMagnitude defined onvectors only

⎤ ⎥ ⎥ ⎥⎦ ⎡ ⎢ ⎢ ⎢⎣ =

a b^ c G v

x

y

v

6.837 Linear Algebra Review6.837 Linear Algebra Review

Vector InterpretationVector Interpretation

  • Think of a vector as a line in 2D or 3D • Think of a matrix as a transformation on a lineor set of lines

6.837 Linear Algebra Review6.837 Linear Algebra Review

⎤ ⎥ ⎦ ⎡ ⎢ ⎣ ⎤ =⎥ ⎦

⎡⎤ ⎢⎥ ⎣⎦ ⎡ ⎢ ⎣

' x^ ' y

d c

b a x^ y

V

V’

Vectors: Dot ProductVectors: Dot Product [^

]^

cf be ad d ec f ba ab ba

T^

⎤ ⎥=⎥ ⎥⎦ ⎡ ⎢ ⎢ ⎢⎣

= =⋅

Think of the dot product asa matrix multiplication The magnitude is the dotproduct of a vector with itself

cc bb aa aa a^

T^

= 2 =

The dot product is also related tothe angle between the two vectors– but it doesn’t tell us the angle

) cos(

θ ba ba =⋅

6.837 Linear Algebra Review6.837 Linear Algebra Review

Vectors: Cross ProductVectors: Cross Product

  • The cross product of vectors A and B is a vectorC which is perpendicular to A and B • The magnitude of C is proportional to the cosineof the angle between A and B • The direction of C follows the

right hand rule

this why we call it a “right-handed coordinatesystem”

) sin(

θ

b a b a^

= ×

6.837 Linear Algebra Review6.837 Linear Algebra Review

Docsity.com

Determinant of a MatrixDeterminant of a Matrix

  • Used for inversion • If det(A) = 0, then Ahas no inverse • Can be found usingfactorials, pivots, andcofactors! • Lots of interpretations– for more info, take18.

⎤ ⎥ ⎦ ⎡ = ⎢ ⎣

d c

b a A

bc

ad

A^

det(

⎤ ⎥ ⎦ ⎡ ⎢−⎣

−

− −=

a c

b d bc ad A^

1 1

6.837 Linear Algebra Review6.837 Linear Algebra Review

Docsity.com

Determinant of a MatrixDeterminant of a Matrix

ceg
bdi
afh
cdh
bfg
aei
i
h
g
f
e
d
c
b
a
i
h
g
f
e
d
c
b
a i
h
g
f
e
d
c
b
a i
h
g
f
e
d
c
b
a

Sum from left to right Subtract from right to left Note: N! terms

6.837 Linear Algebra Review6.837 Linear Algebra Review

Homogeneous MatricesHomogeneous Matrices

  • Problem: how to include translations intransformations (and do perspective transforms) • Solution: add an extra dimension

[^

]

z y x z y x

6.837 Linear Algebra Review6.837 Linear Algebra Review

Orthonormal BasisOrthonormal

Basis

  • Basis: a space is totally defined by a set ofvectors – any point is a

linear combination

of the basis • Ortho-Normal: orthogonal + normal • Orthogonal: dot product is zero • Normal: magnitude is one • Example: X, Y, Z (but don’t have to be!)

6.837 Linear Algebra Review6.837 Linear Algebra Review

Orthonormal BasisOrthonormal

Basis

nc

nb

na

vc

vb

va

uc

ub

ua

n

v

u

n

v

u

n v u c b a

3 3 3

2 2 2

1 1 1

0 (not an actual formula – just a way of thinking about it)

To change a point from one coordinate system toanother, compute the dot product of eachcoordinate row with each of the basis vectors.

6.837 Linear Algebra Review6.837 Linear Algebra Review

Questions?Questions?^ 6.837 Linear Algebra Review6.837 Linear Algebra Review