Wallpaper Groups Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises Geometric Transformations and Wallpaper Groups Vector and Matrix Algebra Lance Drager Department of Mathematics and Statistics Texas Tech University Lubbock, Texas 2010 Math Camp Wallpaper Groups Outline Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises 1 Vectors Geometric Vectors Vectors in Coordinates The Dot Product 2 Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises Wallpaper Groups Vectors Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • Our setting is the Euclidean Plane • A vector is a quantity that has a magnitude and a direction. Wallpaper Groups Vector Operations Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • We’ll use letters like u, v , w , . . . to stand for vectors. • 0 is the vector with magnitude zero. Just draw it as a point. • kuk denotes the magnitude of the vector u. • A scalar is a quantity with a magnitude but no direction, i.e., just a number. • Two operations on vectors • Scalar Multiplication • Vector Addition. Wallpaper Groups Scalar Multiplication Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • Scalar multiplication sv . • if s = 0, then sv is the zero vector. • if s > 0, then sv has the same direction as v and magnitude skv k. • if s < 0, then sv points in the opposite direction to v and has magnitude |s| times kv k. • ksv k = |s| kv k. Wallpaper Groups Visualizing Scalar Multiplication Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product 2v Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises v (−1/2)v Wallpaper Groups Visualizing Vector Addition Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises u+v v u Wallpaper Groups Visualizing Vector Subtraction u − v = u + (−v ) Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product u−v Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises v −v u u−v −v Wallpaper Groups Lance Drager Vectors in Coordinates Vectors Geometric Vectors Vectors in Coordinates The Dot Product • We can put a coordinate system on the plane. y Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises y (x, y) x • Distance formula: dist((0, 0), (x, y )) = x p x2 + y2 Wallpaper Groups Lance Drager Components of a Vector Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices • Coordinates give one-to-one correspondences Vectors ↔ Points ↔ (u1 , u2 ) ∈ R2 y What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises P u (u1 , u2 ) x • Write a vector as (u1 , u2 ). We call u1 and u2 the q components of u. kuk = u12 + u22 Wallpaper Groups Scalar Multiplication in Coordinates Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product y (v1 , v2 ) v = su Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises u (u1 , u2) x u2 v2 v2 = = kuk kv k skuk v2 = su2 s(u1 , u2 ) = (su1 , su2 ) Wallpaper Groups Vector Addition in Coordinates Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product y (w1 , w2 ) v1 (v1 , v2 ) Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises w v (u1 , u2 ) u u1 v1 x w1 = u1 + v1 (u1 , u2 ) + (v1 , v2 ) = (u1 + v1 , u2 + v2 ) Wallpaper Groups Standard Basis Vectors Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises (u1 , u2 ) = u1 (1, 0) + u2 (0, 1) = u1 e1 + u2 e2 e1 = (1, 0), e2 = (0, 1) y u2 e2 u e2 e1 u1 e1 x Wallpaper Groups A Nonstandard Basis Lance Drager Vectors y Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises βv w αu v u x w = αu + βv Wallpaper Groups Rules of Vector Algebra Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • (u + v ) + w = u + (v + w ). (Associative Law) • u + v = v + u. (Commutative Law) • 0 + v = v . (Additive Identity) • v + (−v ) = 0. (Additive Inverse) • s(u + v ) = su + sv . (Distributive Law) • (s + t)u = su + tu. (Distributive Law) • 1u = u. Wallpaper Groups Lance Drager Trig before Dot Product Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises Give me an Intro to Trig Wallpaper Groups Dot Product Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • The angle θ between two vectors. v θ u • Definition of dot product u · v = kuk kv k cos(θ). 0 · v = 0. • u · u = kuk2 . • u · v = 0 ⇐⇒ u ⊥ v . Wallpaper Groups Law of Cosines from Trig Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises c b θ a c 2 = a2 + b 2 − 2ab cos(θ). Wallpaper Groups Formula for Dot Product Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product u−v Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises v θ u ku − v k2 = kuk2 + kv k2 − 2kuk kv k cos(θ) = kuk2 + kv k2 − 2u · v 2u · v = kuk2 + kv k2 − ku − v k2 . Wallpaper Groups Lance Drager Dot Product in Components Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises 2u · v = kuk2 + kv k2 − ku − v k2 = k(u1 , u2 )k2 + k(v1 , v2 )k2 − k(u1 − v1 , u2 − v2 )k2 = u12 + u22 + v12 + v22 − [(u1 − v1 )2 + (u2 − v2 )2 ] = u12 + u22 + v12 + v22 − (u1 − v1 )2 − (u2 − v2 )2 = u12 + u22 + v12 + v22 − (u12 − 2u1 v1 + v12 ) − (u22 − 2u2 v2 + v = u12 + u22 + v12 + v22 − u12 + 2u1 v1 − v12 − u22 + 2u2 v2 − v22 = 2u1 v1 + 2u2 v2 . u · v = u1 v1 + u2 v2 . Wallpaper Groups Lance Drager Properties of Dot Product Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • Rules of Algebra for Dot Product 2 • u · u = kuk . • u · v = v · u. • (su) · v = s(u · v ) = u · (sv ) • u · (v + w ) = u · v + u · w . • Compute the angle in terms of components u·v θ = arccos . kuk kv k • Exercise: If u and v are orthogonal unit vectors (i.e., kuk = 1) and w = αu + βv , show α = w · u and β = w · v . Wallpaper Groups Matrices Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • An m × n matrix is a rectangular array of numbers with m rows and n columns. • Example: A= −1 2 3 2 0 5 , 2 × 3. • If the matrix is called A, aij denotes the entry in row i and column j. For example, a23 = 5. Wallpaper Groups Matrices Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • A general matrix a11 a21 A = a31 .. . a12 a22 a32 .. . a13 a23 a33 .. . ... ... ... .. . a1n a2n a3n , .. . m × n. am1 am2 am3 . . . amn • Matrix addition and scalar multiplication are defined slotwise, 1 0 like vectors 3 7 4 1+7 3+4 8 7 + = = 5 10 1 0 + 10 5 + 1 10 6 Wallpaper Groups Matrix Multiplication 1 Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product • Size condition for multiplication: (m × n) · (n × p) = m × p. Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • (1 × n) · (n × 1) = 1 × 1 a1 a2 a3 b1 b2 . . . an b3 = a1 b1 +a2 b2 +a3 b3 +· · ·+an bn . .. . bn Wallpaper Groups Matrix Multiplication 2 Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product • Entries of C = AB cij = Rowi (A) Colj (B). Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • Important Cases: a11 a12 x1 a11 x1 + a12 x2 Ax = = . a21 a22 x2 a21 x1 + a22 x2 a a b11 b12 AB = 11 12 a21 a22 b21 b22 a11 b11 + a12 b21 a11 b12 + a12 b22 = . a21 b11 + a22 b22 a21 b12 + a22 b22 Wallpaper Groups Lance Drager Multiplication is not Commutative! Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • If AB and BA are the same size, they must both be n × n for some n. • Example 2 5 2 3 0 5 7 0 0 1 0 0 3 5 = 7 0 1 0 = 0 0 7 , 0 2 . 5 Wallpaper Groups Ways of Looking at Multiplication Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product • Consider Ax a11 a12 x1 a x + a12 x2 = 11 1 a21 a22 x2 a21 x1 + a22 x2 a11 a12 = x + x a21 1 a22 2 Ax = Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises = x1 Col1 (A) + x2 Col2 (A). • Ae1 = Col1 (A) and Ae2 = Col2 (A). • Consider yB y1 y1 b11 b12 = y1 b11 + y2 b21 y1 b12 + y2 b22 b21 b22 = y1 Row1 (B) + y2 Row2 (B). • In terms of rows and columns A[b1 | b2 ] = [Ab1 | Ab2 ], a1 a B B= 1 . a2 a2 B Wallpaper Groups Lance Drager Rules of Matrix Algebra Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • Rules of Algebra for Matrix Multiplication • (AB)C = A(BC ). (Associative Law) • A(B + C ) = AB + AC . (Left Distributive Law) • (A + B)C = AC + BC . (Right Distributive Law) • (sA)B = s(AB) = A(sB). • A0 = 0 and 0B = 0. Wallpaper Groups Invertible Matrices 1 Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product • In denotes the n × n identity matrix. It has ones on the diagonal and zeros elsewhere. Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises 1 0 I2 = , 0 1 • If A is m × n 1 0 0 I3 = 0 1 0 . 0 0 1 Im A = A = AIn . • A is invertible or nonsingular if there is a matrix B such that AB = BA = I Wallpaper Groups Invertible Matrices 2 Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • Only square matrices can be invertible. • B is unique, if it exists, and is denoted A−1 . A−1 A = AA−1 = I . • (A−1 )−1 = A. • The Determinant of A = a c is defined by b d a c = ad − bc. det(A) = b d Wallpaper Groups Big Theorem on Invertible Matrices Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Theorem Let a b A= c d Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises be a matrix. Then, the following conditions are equivalent. 1 A is invertible. 2 The only column vector x such that Ax = 0 is x = 0. 3 det(A) 6= 0. Proof. • (1) =⇒ (2). Multiply both sides of Ax = 0 by A−1 . Wallpaper Groups Lance Drager Big Theorem Proof Continued 1 Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises Proof Continued. • (2) =⇒ (3). Instead, do: Not (3) =⇒ Not (2). Assume ad − bc = 0. Of course, 0x = 0 for all x. Suppose A 6= 0. Then at least one of the vectors d −c , is not zero. But, −b a a c d ad − bc = = 0, b d −b bd − bd a c −c −ac + ac = = 0, b d a −bc + ad so (2) fails. Wallpaper Groups Lance Drager Big Theorem Proof Continued 2 Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises Proof Continued. • (3) =⇒ (1). Just check that this formula works: A−1 = 1 d −c . det(A) −b a Wallpaper Groups Exercises on Invertiblity Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises Exercises Here A and B are 2 × 2 matrices. • If A and B are invertible, so is AB and (AB)−1 = B −1 A−1 . • Show that if AB = I , then B = A−1 and if BA = I then B = A−1 . • A is invertible if and only if the equation Ax = b has a unique solution x for every column vector b. • Show that if det(A) = 0, one of the columns of A is multiple of the other. • Show by brute force computation (for 2 × 2 matrices) that det(AB) = det(A) det(B). Wallpaper Groups Linear Transformations Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises Definition A transformation T : R2 → R2 is linear if T (u + v ) = T (u) + T (v ) T (su) = sT (u), or, equivalently, T (αu + βv ) = αT (u) + βT (v ). Theorem If A is a matrix, T (x) = Ax is linear. Wallpaper Groups The Matrix of a Linear Transformation Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises Theorem If T is linear, there is a unique matrix A so that T (x) = Ax. In fact, A = [T (e1 ) | T (e2 )]. Proof. T (x) = T (x1 e1 + x2 e2 ) = x1 T (e1 ) + x2 T (e2 ) x = [T (e1 ) | T (e2 )] 1 . x2 Wallpaper Groups Rotation is Linear Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • Let T be the transformation given by rotation around the origin by a fixed angle θ. • We can see geometrically that T is linear. Wallpaper Groups Rotations Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product y y u+v T (u) Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises T (u + v) v u x T (v) T (u + v ) = T (u) + T (v ) x Wallpaper Groups Matrix of Rotation Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises • We need to find T (e1 ) and T (e2 ). y T (e2 ) T (e1 ) e2 θ e1 x Wallpaper Groups Find T (e1 ) Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product • We know T (e1 ) from trig: y Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises T (e1 ) θ e1 (cos(θ), sin(θ)) x Wallpaper Groups Find T (e2 ) Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product • T (e2 ) must be (− sin(θ), cos(θ)) or (sin(θ), − cos(θ)). Check the signs. y Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises T (e2 ) T (e1 ) e2 θ e1 • T (e2 ) = (− sin(θ), cos(θ)). x Wallpaper Groups The Matrix of a Rotation Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises Theorem The matrix of rotation through angle θ is cos(θ) − sin(θ) R(θ) = sin(θ) cos(θ) Theorem From the geometry, we have R(θ)R(φ) = R(θ + φ) = R(φ)R(θ) Wallpaper Groups The Addition Laws Lance Drager Vectors Geometric Vectors Vectors in Coordinates The Dot Product Matrices What is a matrix? Matrix Multiplication Invertible Matrices Exercises Linear Transformations Rotations Exercises Exercises • From the geometry [R(θ)]−1 = R(−θ). Compute [R(θ)]−1 from our previous theorem. Compare entries in these matrices to conclude cos(−θ) = cos(θ) and sin(−θ) = − sin(θ). • Compare the matrix entries in the equation R(θ)R(φ) = R(θ + φ). Then, replace φ by −φ and use the first part of the problem. You should get the Addition Laws for Sine and Cosine cos(θ ± φ) = cos(θ) cos(φ) ∓ sin(θ) sin(φ), sin(θ ± φ) = sin(θ) cos(φ) ± cos(θ) sin(φ). Wallpaper Groups Trig Introduction Lance Drager Trig Introduction y θ x • An angle determines a point on the unit circle. Wallpaper Groups Lance Drager Definition of Sine and Cosine Trig Introduction y (cos(θ), sin(θ)) θ x Wallpaper Groups The Basic Trig Identity Lance Drager Trig Introduction • A point (x, y ) is on the unit circle if and only if p x 2 + y 2 = 1 ⇐⇒ x 2 + y 2 = 1. • (cos(θ), sin(θ)) is on the unit circle so 2 2 cos(θ) + sin(θ) = 1 cos2 (θ) + sin2 (θ) = 1 • Some people write sin(θ) = sin θ Wallpaper Groups Non-Unit Circle Lance Drager Trig Introduction y (r cos(θ), r sin(θ)) θ (cos(θ), sin(θ)) x Wallpaper Groups Triangles Lance Drager y Trig Introduction (r cos(θ), r sin(θ)) hyp θ opp adj x opp r sin(θ) = = sin(θ) hyp r adj r cos(θ) = = cos(θ) hyp r Back to Dot Product