Dot Products, Transposes, and Orthogonal Projections

Similar documents
Math 416, Spring 2010 Matrix multiplication; subspaces February 2, 2010 MATRIX MULTIPLICATION; SUBSPACES. 1. Announcements

Lecture 6: Lies, Inner Product Spaces, and Symmetric Matrices

Math 416, Spring 2010 Gram-Schmidt, the QR-factorization, Orthogonal Matrices March 4, 2010 GRAM-SCHMIDT, THE QR-FACTORIZATION, ORTHOGONAL MATRICES

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Math 291-2: Lecture Notes Northwestern University, Winter 2016

Linear Algebra Practice Final

Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3

CS 246 Review of Linear Algebra 01/17/19

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

22A-2 SUMMER 2014 LECTURE Agenda

The Fundamental Theorem of Linear Algebra

MATH Linear Algebra

Math 21b: Linear Algebra Spring 2018

Lecture 3: Linear Algebra Review, Part II

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

Math 416, Spring 2010 More on Algebraic and Geometric Properties January 21, 2010 MORE ON ALGEBRAIC AND GEOMETRIC PROPERTIES

MAT2342 : Introduction to Applied Linear Algebra Mike Newman, fall Projections. introduction

LECTURES 14/15: LINEAR INDEPENDENCE AND BASES

Math Linear Algebra

x 1 + 2x 2 + 3x 3 = 0 x 1 + 2x 2 + 3x 3 = 0, x 2 + x 3 = 0 x 3 3 x 3 1

Chapter 6: Orthogonality

Vector Spaces, Orthogonality, and Linear Least Squares

Recitation 8: Graphs and Adjacency Matrices

. =. a i1 x 1 + a i2 x 2 + a in x n = b i. a 11 a 12 a 1n a 21 a 22 a 1n. i1 a i2 a in

1 Last time: inverses

MATH 310, REVIEW SHEET 2

Math 290-2: Linear Algebra & Multivariable Calculus Northwestern University, Lecture Notes

Getting Started with Communications Engineering

Solutions: We leave the conversione between relation form and span form for the reader to verify. x 1 + 2x 2 + 3x 3 = 0

Algorithmic Game Theory and Applications. Lecture 4: 2-player zero-sum games, and the Minimax Theorem

March 27 Math 3260 sec. 56 Spring 2018

Vector, Matrix, and Tensor Derivatives

. = V c = V [x]v (5.1) c 1. c k

Spring 2015 Midterm 1 03/04/15 Lecturer: Jesse Gell-Redman

Math 110, Spring 2015: Midterm Solutions

Math 520 Exam 2 Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

1 Last time: determinants

Linear Algebra March 16, 2019

Methods of Mathematical Physics X1 Homework 2 - Solutions

Review Solutions for Exam 1

MATH240: Linear Algebra Review for exam #1 6/10/2015 Page 1

Elementary maths for GMT

Topic 15 Notes Jeremy Orloff

Dot Products. K. Behrend. April 3, Abstract A short review of some basic facts on the dot product. Projections. The spectral theorem.

Math 54 Homework 3 Solutions 9/

MAT 1302B Mathematical Methods II

= W z1 + W z2 and W z1 z 2

Math 396. Quotient spaces

Math 4242 Fall 2016 (Darij Grinberg): homework set 8 due: Wed, 14 Dec b a. Here is the algorithm for diagonalizing a matrix we did in class:

I = i 0,

MATH 315 Linear Algebra Homework #1 Assigned: August 20, 2018

A PRIMER ON SESQUILINEAR FORMS

Math Linear Algebra Final Exam Review Sheet

is Use at most six elementary row operations. (Partial

MATH 15a: Linear Algebra Practice Exam 2

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra 1/33

Choose three of: Choose three of: Choose three of:

Chapter 6. Orthogonality

Matrices and Vectors

a s 1.3 Matrix Multiplication. Know how to multiply two matrices and be able to write down the formula

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34

Inner Product, Length, and Orthogonality

Lecture 1 Systems of Linear Equations and Matrices

Lecture 3 Linear Algebra Background

Math Linear Algebra II. 1. Inner Products and Norms

Exercises on chapter 0

Solutions to Final Exam

Linear Algebra V = T = ( 4 3 ).

MATH 22A: LINEAR ALGEBRA Chapter 4

Assignment 1 Math 5341 Linear Algebra Review. Give complete answers to each of the following questions. Show all of your work.

Chapter 1: Linear Equations

This last statement about dimension is only one part of a more fundamental fact.

Usually, when we first formulate a problem in mathematics, we use the most familiar

Math 3C Lecture 25. John Douglas Moore

Math 3108: Linear Algebra

Math Lecture 26 : The Properties of Determinants

Mon Feb Matrix algebra and matrix inverses. Announcements: Warm-up Exercise:

Chapter 1: Linear Equations

MTH 2310, FALL Introduction

MATH 221: SOLUTIONS TO SELECTED HOMEWORK PROBLEMS

Linear Algebra Highlights

Answer Key for Exam #2

b 1 b 2.. b = b m A = [a 1,a 2,...,a n ] where a 1,j a 2,j a j = a m,j Let A R m n and x 1 x 2 x = x n

Chapter 2 Notes, Linear Algebra 5e Lay

Numerical Linear Algebra

MATH 31 - ADDITIONAL PRACTICE PROBLEMS FOR FINAL

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

Linear Models Review

Linear Algebra Handout

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Matroids and Greedy Algorithms Date: 10/31/16

MATH Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product.

Section 6.1. Inner Product, Length, and Orthogonality

Math Topology II: Smooth Manifolds. Spring Homework 2 Solution Submit solutions to the following problems:

First we introduce the sets that are going to serve as the generalizations of the scalars.

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

Scientific Computing: Dense Linear Systems

Lecture 4: Applications of Orthogonality: QR Decompositions

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Linear Algebra, Summer 2011, pt. 2

LINEAR ALGEBRA REVIEW

Transcription:

Dot Products, Transposes, and Orthogonal Projections David Jekel November 13, 2015 Properties of Dot Products Recall that the dot product or standard inner product on R n is given by x y = x 1 y 1 + + x n y n Another notation that is used for the inner product is x, y The dot product satisfies these three properties: It is symmetric, which means that x, y = y, x It is linear in each variable This means that if α and β are scalars, α x + β y, z = α x, z + β y, z and z, α x + β y = α z, x + β z, x Positivity : For any x, we have x, x 0 The only way it can be zero is if x = 0 The first two properties can be checked by direct computation The third one follows from the fact that x, x = x 2 1 + + x 2 n Since each x 2 j is 0, we know x, x 0 Moreover, the only way it can be zero if all the terms are zero, which implies x = 0 We then define x = x, x, and we know that x = 0 if and only if x = 0 I draw attention to these three properties because they are the most important for what we are doing in linear algebra Also, in more advanced math, there is a general idea of inner product (something that satisfies these properties), which is super-important and math and physics 1

Properties of Transposes Recall that the transpose of a matrix is defined by (A T ) i,j = A j,i In other words, to find A T you switch the row and column indexing For example, if 6 1 0 A =, then A T = 6 1 1 2 1 2 4 0 4 Transposes and Matrix Products: If you can multiply together two matrices A and B, then (AB) T = A T B T To prove this, suppose that A is n k and B is k m We ll compute each entry of (AB) T using the definition of matrix multiplication: ((AB) T ) i,j = (AB) j,i = A j,1 B 1,i + A j,2 B 2,i + + A j,k B k,i On the other hand, (B T A T ) i,j = (B T ) i,1 (A T ) 1,j + (B T ) i,1 (A T ) 1,j + + (B T ) i,k (A T ) k,j = B 1,i A j,1 + B 2,i A j,2 + + B k,i A j,k, which is the same as ((AB) T ) i,j If this is true when you multiply two matrices together, then it must also be true when you multiply three or more matrices together (formally, we prove it by mathematical induction ) Thus, for instance, (ABC) T = C T B T A T Transposes and Dot Products: Suppose that x and y are two vectors in R n We can view them as column vectors or n 1 matrices, and then the dot product can be written as ( x) T y = x 1 y 1 + + x n y n = x, y Next, suppose that A is an n m matrix and x R m and y R n Then A x, y = (A x) T y = ( x) T A T y = x, A T y, or in different notation (A x) y = x (A T y) Remarks: The property that A x, y = x, A T y is an essential property of the transpose In suped-up versions of linear algebra that are used in physics, the property that A x, y = x, A T y is basically taken as the definition of the transpose Exercises: If the proof that (AB) T = B T A T seemed confusingly general, then on a piece of scratch paper, write down two random matrices A and B and compute (AB) T and B T A T 2

Prove that if A is an invertible square matrix, then (A T ) 1 = (A 1 ) T Let e j be the jth standard basis vector If A is any matrix, show that A i,j = e i, A e j Suppose that x, A y = x, B y for all x and y Prove that A = B Let A be some matrix Then A T is the only possible value of B that would satisfy A x, y = x, B y for all values of x and y Finding a Basis for Orthogonal Complements In the homework and tests, you might encounter problems like this: Problem: Let V R 3 be given by 1 4 V = Span 2, 5 3 2 Compute V (that is, find a basis for V ) Method 1: One way to do this is using the cross product: as explained in lecture the vector 1 4 11 2 5 = 10 3 2 3 must be orthogonal to (1, 2, 4) T and (4, 5, 2) T, and hence it is orthogonal to V Since dim V = 2, we know that dim V must be one (as stated in lecture notes 7) Thus, ( 11, 10, 3) T has to be a basis for V However, the cross product method is special to the case where V is a plane in R 3 For instance, you cannot compute the orthogonal complement of a plane in R 4 using the cross product, since there is no cross product in R 4 But luckily there is a more general way Method 2: We are going to interpret V as the kernel of some matrix We know (HW 7 problem 7) that a vector w is in V if and only if it is perpendicular to (1, 2, 3) T and (4, 5, 2) T In other words, it is in V if and only if 1 2 w = ( 1 2 3 ) w = 0 3 and 4 5 w = ( 4 5 2 ) w = 0 2 This is equivalent to saying that 1 2 3 w = 4 5 2 0 0 3

Thus, computing V amounts to computing the set of solutions to this system of equations, or the kernel of this matrix We already know how to do this using the RREF After some computation, the RREF is 1 0 11/3 0 1 10/3 The first two variables have leading ones and the third variable is free Setting the free variable to be t, we find that all the solutions have the form 11t/3 11/3 10t/3 = t 10/3 t 1 Thus, this vector forms a basis for V This agrees with our earlier answer from Method 1 because the vector from Method 2 is a scalar multiple of the vector from Method 1 Though Method 2 required explanation, there was not much actual computation just row reducing one matrix Generalization: Method 2 didn t use the fact that we were in R 3, and so it generalizes to finding bases for orthogonal complements in all dimensions Suppose that V R n is spanned by v 1,, v m Let A be the matrix with columns v 1,, v m Then V = im A and V = (im A) By HW 7 problem 7, we know that w is in V if and only if v w = ( v j ) T w = 0 for all j This is equivalent to saying that ( v 1 ) T w = 0 ( v m ) T That is, w is in the kernel of the matrix with row ( v 1 ) T,, ( v m ) T This matrix is just A T Thus, we ve proved that V is the kernel of A T To summarize, if v 1,, v m are any vectors in R n, then ( v 1 ) T (Span( v 1,, v m )) = ker ( v m ) T We can compute a basis for the kernel from the RREF of this matrix Orthogonal Complements of Kernel and Image In the last section, we had a subspace V and wrote V = im A for a matrix A, and we showed that V = ker A T But the matrix A could have been anything Thus, we have essentially proved that (im A) = ker A T for any A 4

Replacing A by A T, we can conclude that (im A T ) = ker A for any A Another Proof: For good measure, let s give a slightly different proof that (im A) = ker A T Why give another proof? Well, this proof will relate to what we did in the first section It is also more coordinate-free : It does not explicitly refer to the rows and columns of the matrix or require us to choose a basis Rather it uses the important property of the transpose that A x, y = x, A T y In order to prove that that (im A) = ker A T, we want to show that (1) anything in ker A T is in (im A) and (2) anything in (im A) is in ker A T 1 Suppose that y ker A T, and we will prove y is orthogonal to everything in the image of A Any element of the image of A can be written as A x Then A x, y = x, A T y = x, 0 = 0 Therefore, y (im A) 2 Suppose that y (im A) Note AA T y is in the image of A, and thus, y AA T y Therefore, 0 = A(A T y), y = A T y, A T y = A T y 2 Thus, A T y = 0 and therefore, A T y = 0, so y ker A T Example: Let s work this out in an example and picture it geometrically: 1 0 A = 1 0, A T 1 1 0 = 0 0 0 0 0 Verify that {} 0 ker A = Span, im A = Span 1 1 1 0 {( im A T 1 = Span, ker A 0)} T = Span 1 1, 0 0 0 1 Draw a picture of ker A and im A T in R 2 and ker A T and im A in R 3 Verify that (im A) = ker A T and (im A T ) = ker A If you want, see what happens with some other matrices: Draw pictures of the kernel and image of A and A T 5

Formula for Orthogonal Projection The material in this section is NOT something you need to know for the tests But it has a lot of good insights and I hope it will be useful for your future study of math and its applications Assume that V is a subspace of R n We want to prove the following: Any x R n can be uniquely written as x = v + w, where v V and w V There is an orthogonal projection matrix P such that P x = v (if x, v, and w are as above) In fact, we can find a nice formula for P Setup: Our strategy will be to create P first and then use it to verify all the above statements We know that any subspace of R n has a basis So let v 1,, v m be a basis for V Let A be the matrix with columns v 1,, v m : I claim that the P that we want is A = ( v 1 v m ) P = A(A T A) 1 A T Example: To convince you that this formula is believable, let s see what it tells us in the simple case where V is one-dimensional Suppose v is the line spanned by v In that case, there is only one vector in the basis (m = 1), and A is just the column vector v viewed as an n 1 matrix Then we have which is a 1 1 matrix or scalar Then and A T A = v T v = v 2, P = v vt v 2, P x = 1 v x v 2 v( vt x) = v 2 v This agrees with the formula for orthogonal projection onto a line given in class, so the above formula for P is correct in the one-dimensional case Organization of Proof: The general formula P = A(A T A) 1 A T is rather sneaky and not obvious I am going to keep you in suspense for a while about why it works in general, so this proof will require patience The proof might seem rather long, but that is because I included fuller explanations of each step than are usually in the lecture notes The proof will be organized into short claims so that we don t try to do too many things as once The first order of business is to prove that A T A is actually invertible; otherwise, the formula for P doesn t even make sense 6

Claim A T A is invertible Proof First, note that A T A is square m m because A is n m and A T is m n We have a theorem given in lecture about equivalent conditions for invertibility of square matrices; we know that A T A must be invertible if we can prove that ker(a T A) = {0} Suppose that x ker(a T A) and we will prove x = 0 The first step is to show A x = 0 Because A T A x = 0, we know that x T A T A x = 0 But by the properties of transposes given earlier, x T A T A x = (A x) T (A x) = (A x) (A x) = A x 2 Therefore, A x = 0, and hence A x = 0 If the entries of x are x 1,, x m, then 0 = A x = v 1 v m x 1 x m = x 1 v 1 + x m v m By assumption v 1,, v m are linearly independent Thus, the only way this linear combination can be zero is if all the x j s are zero Therefore, x = 0 This completes the proof that ker(a T A) = { 0} and hence A T A is invertible Claim Now comes the sneaky part P has the following properties: a P A = A b A T P = A T c P 2 = P Proof Note P A = A(A T A) 1 A T A The (A T A) 1 and A T A cancel, and so P A = A, which proves (a) The reason for (b) is similar: Finally, to prove (c), A T P = A T A(A T A) 1 A T = A T P 2 = P P = A(A T A) 1 A T A(A T A) 1 A T = A(A T A) 1 A T = P Claim im P = im A = V Proof To show im P = im A, we need to do two things: Suppose that x im A and prove x im P Suppose that x im P and prove x im P 7

For the first step, assume x im A This means that x = A y for some y Then because P A = A, P x = P A y = A y = x Thus, x = P x So x is P of something which means it is in the image of A For the second step, suppose x im P Then x = P y for some y, which implies x = A[(A T A) 1 A T y]; thus x is A times something and hence is in the image of A This proves im P = im A, and the statement im A = V was proved in the Setup Claim ker P = ker A T = V Proof The outline is similar to the previous proof First, suppose x ker A T, and we will prove x ker P By assumption A T x = 0 and therefore P x = A(A T A) 1 A T x = A(A T A) 1 0 = 0, which means x ker P Next, suppose x ker P and we will prove x ker A T Since x ker P, P x = 0 But we showed earlier that A T P = A T, and hence A T x = A T P x = A T 0 = 0, so x ker P Therefore, ker A T = ker P But we proved in the previous section that ker A T = (im A) = V Claim If x V, then P x = x, and if x V, then P x = 0 Proof We have basically already proved this If x V = im P, then x = P y for some y, and so P x = P P y = P 2 y = P y = x On the other hand, if x V = ker P, then P x = 0 Claim Any x R n can be written uniquely as v+ w, where v V and w V Proof Let v = P x and w = x P x = (I P ) x Then v is P of something, so it is in the image of P, which is V To show that w V, we use the fact that P 2 = P, so P w = P (I P ) w = (P P 2 ) w = 0; this implies w ker P = V This shows that x can be written as v + w with v V and w V But we still have to prove that the decomposition is unique; that is, this is the only way to write x as the sum of something in V and something in V Well, suppose that we have another decomposition x = v + w where v V and w V ; our goal is to prove that v = v and w = w Using the previous claim, P x = P v + P w = v + 0 Therefore, v = P x = v and w = x v = x v = w, so the decomposition is indeed unique 8

Recap: We have now verified that any x can be written uniquely as the sum of some v V and some w V, and that P x = v We have proven the orthogonal projection exists and found a formula for it The crucial ingredients were the fact that ker A T = (im A) and that P A = A, A T P = A T, and P 2 = P Example: Let s see how this formula for P works in practice Suppose that V R 3 is given by 1 0 V = Span 0, 1 2 3 Then A T 1 0 2 A = 1 0 0 1 5 6 = 0 1 3 6 10 2 3 Then using the formula for the inverse of a 2 2 matrix, we have 1 0 P = A(A T A) 1 A T = 0 1 1 10 6 1 0 2 14 6 5 0 1 3 2 3 = 1 10 6 6 5 1 0 2 14 0 1 3 2 3 = 1 10 6 2 6 5 3 14 2 3 13 Verify the above computation and check that P 2 = P Remarks: In this case, the computation was rather clean because our basis had so many zeros and ones in it But often in practice you get such nice bases: For instance, if you compute the kernel of some matrix using the RREF, you get a basis with a lot of ones and zeros from parametrizing each of the free variables Challenge: In this example P is symmetric (that is, P T = P ) Prove that the matrix of any orthogonal projection is symmetric 9