Linear Algebra 18 Orthogonality

Similar documents
Lecture Note on Linear Algebra 14. Linear Independence, Bases and Coordinates

Lecture Note on Linear Algebra 16. Eigenvalues and Eigenvectors

Lecture Note on Linear Algebra 17. Standard Inner Product

Worksheet for Lecture 25 Section 6.4 Gram-Schmidt Process

6. Orthogonality and Least-Squares

Linear Algebra 20 Symmetric Matrices and Quadratic Forms

Chapter 6: Orthogonality

MATH 20F: LINEAR ALGEBRA LECTURE B00 (T. KEMP)

Orthonormal Bases; Gram-Schmidt Process; QR-Decomposition

Math 407: Linear Optimization

Lecture 4 Orthonormal vectors and QR factorization

Final Review Written by Victoria Kala SH 6432u Office Hours R 12:30 1:30pm Last Updated 11/30/2015

SUMMARY OF MATH 1600

Orthogonal Complements

March 27 Math 3260 sec. 56 Spring 2018

(v, w) = arccos( < v, w >

ORTHOGONALITY AND LEAST-SQUARES [CHAP. 6]

2. Every linear system with the same number of equations as unknowns has a unique solution.

LINEAR ALGEBRA SUMMARY SHEET.

(v, w) = arccos( < v, w >

Typical Problem: Compute.

Chapter 7: Symmetric Matrices and Quadratic Forms

LINEAR ALGEBRA 1, 2012-I PARTIAL EXAM 3 SOLUTIONS TO PRACTICE PROBLEMS

Diagonalizing Matrices

(v, w) = arccos( < v, w >

YORK UNIVERSITY. Faculty of Science Department of Mathematics and Statistics MATH M Test #2 Solutions

MATH 304 Linear Algebra Lecture 20: The Gram-Schmidt process (continued). Eigenvalues and eigenvectors.

Pseudoinverse & Moore-Penrose Conditions

PRACTICE PROBLEMS FOR THE FINAL

Elementary Linear Algebra Review for Exam 2 Exam is Monday, November 16th.

Section 6.4. The Gram Schmidt Process

Math 261 Lecture Notes: Sections 6.1, 6.2, 6.3 and 6.4 Orthogonal Sets and Projections

MATH 2331 Linear Algebra. Section 2.1 Matrix Operations. Definition: A : m n, B : n p. Example: Compute AB, if possible.

Chapter 4 Euclid Space

orthogonal relations between vectors and subspaces Then we study some applications in vector spaces and linear systems, including Orthonormal Basis,

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

Math 18, Linear Algebra, Lecture C00, Spring 2017 Review and Practice Problems for Final Exam

Inner products. Theorem (basic properties): Given vectors u, v, w in an inner product space V, and a scalar k, the following properties hold:

Solutions to Review Problems for Chapter 6 ( ), 7.1

Definitions for Quizzes

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

Math 3191 Applied Linear Algebra

Linear Algebra Massoud Malek

MATH 167: APPLIED LINEAR ALGEBRA Least-Squares

Lecture 23: 6.1 Inner Products

MTH 2310, FALL Introduction

MODULE 8 Topics: Null space, range, column space, row space and rank of a matrix

2. Linear algebra. matrices and vectors. linear equations. range and nullspace of matrices. function of vectors, gradient and Hessian

CSL361 Problem set 4: Basic linear algebra

MATH 1120 (LINEAR ALGEBRA 1), FINAL EXAM FALL 2011 SOLUTIONS TO PRACTICE VERSION

j=1 u 1jv 1j. 1/ 2 Lemma 1. An orthogonal set of vectors must be linearly independent.

Review Notes for Linear Algebra True or False Last Updated: February 22, 2010

October 25, 2013 INNER PRODUCT SPACES

Solutions to Final Practice Problems Written by Victoria Kala Last updated 12/5/2015

Least squares problems Linear Algebra with Computer Science Application

Chapter 6. Orthogonality

MTH 2032 SemesterII

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

6.1. Inner Product, Length and Orthogonality

ft-uiowa-math2550 Assignment OptionalFinalExamReviewMultChoiceMEDIUMlengthForm due 12/31/2014 at 10:36pm CST

Review problems for MA 54, Fall 2004.

MATH 22A: LINEAR ALGEBRA Chapter 4

There are two things that are particularly nice about the first basis

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

What is on this week. 1 Vector spaces (continued) 1.1 Null space and Column Space of a matrix

Applied Linear Algebra in Geoscience Using MATLAB

Practice Exam. 2x 1 + 4x 2 + 2x 3 = 4 x 1 + 2x 2 + 3x 3 = 1 2x 1 + 3x 2 + 4x 3 = 5

Lecture 3: Linear Algebra Review, Part II

Solving a system by back-substitution, checking consistency of a system (no rows of the form

MATH 240 Spring, Chapter 1: Linear Equations and Matrices

Recall: Dot product on R 2 : u v = (u 1, u 2 ) (v 1, v 2 ) = u 1 v 1 + u 2 v 2, u u = u u 2 2 = u 2. Geometric Meaning:

Lecture 7: Positive Semidefinite Matrices

Linear Algebra II. 7 Inner product spaces. Notes 7 16th December Inner products and orthonormal bases

Homework 5. (due Wednesday 8 th Nov midnight)

6 Inner Product Spaces

1. General Vector Spaces

MATH Linear Algebra

Math 224, Fall 2007 Exam 3 Thursday, December 6, 2007

MATH 31 - ADDITIONAL PRACTICE PROBLEMS FOR FINAL

Solution of Linear Equations

Elementary linear algebra

Lecture 10: Vector Algebra: Orthogonal Basis

The 'linear algebra way' of talking about "angle" and "similarity" between two vectors is called "inner product". We'll define this next.

(a) If A is a 3 by 4 matrix, what does this tell us about its nullspace? Solution: dim N(A) 1, since rank(a) 3. Ax =

Linear Algebra Review. Vectors

Vectors. Vectors and the scalar multiplication and vector addition operations:

Lecture 4: Applications of Orthogonality: QR Decompositions

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

TBP MATH33A Review Sheet. November 24, 2018

Assignment #9: Orthogonal Projections, Gram-Schmidt, and Least Squares. Name:

7. Dimension and Structure.

Linear Algebra 2 Spectral Notes

Math 102, Winter Final Exam Review. Chapter 1. Matrices and Gaussian Elimination

235 Final exam review questions

Warm-up. True or false? Baby proof. 2. The system of normal equations for A x = y has solutions iff A x = y has solutions

AMS526: Numerical Analysis I (Numerical Linear Algebra)

WI1403-LR Linear Algebra. Delft University of Technology

1. Select the unique answer (choice) for each problem. Write only the answer.

Problem # Max points possible Actual score Total 120

MATH 54 - FINAL EXAM STUDY GUIDE

Transcription:

Linear Algebra 18 Orthogonality Wei-Shi Zheng, wszheng@ieeeorg, 2011 1 What Do You Learn from This Note We still observe the unit vectors we have introduced in Chapter 1: 1 0 0 e 1 = 0, e 2 = 1, e 3 = 0 (1) 0 0 1 Question: Have you tried to compute the inner product like e 1 e 2, e 1 e 3 and e 2 e 3? You will actually find that e 1 e 2 = 0, e 1 e 3 = 0 and e 2 e 3 = 0 That is the three standard basis vectors are orthogonal, more precisely orthonormal We have a special name for such a type of basis called orthogonal (orthonormal) basis We will comprehensively introduce this in this lecture note Basic Concept:orthogonal set ( 正交集 ), orthogonal basis ( 正交基 ), Orthogonal Matrix ( 正交矩阵 ), Orthogonal Projection ( 正交投影 ), Gram Schmidt Process ( 格拉姆 - 施密特正交化 ) 2 Orthogonal Basis 21 Definition Definition 1 (orthogonal set ( 正交集 )) Let S = { v 1,, v r } R n { 0} We say S is an orthogonal set iff for any i, j = 1,, r and i j, we have v i v j Furthermore, if v 1,, v r are all unit vectors then S is called an orthonormal set 1

Example: Textbook P384 Definition 2 (orthogonal basis ( 正交基 )) A basis B of R n which is also orthogonal is called an orthogonal basis Furthermore, B is called an orthonormal basis if it is orthonormal Example: The standard basis E = { e 1,, e n } is an orthonormal basis of R n Example: Textbook P389 22 Some Properties Connection between orthogonal set & linearly independent: Theorem 3 Let S = { v 1,, v r } be an orthogonal set Then S is linearly independent Proof Let c 1,, c r be scalars Suppose that 0 = c 1 v 1 + + c r v r Then for each i = 1,, r, we have 0 = v i 0 = v i (c 1 v 1 + + c r v r ) = c 1 ( v i v 1 ) + + c r ( v i v 1 ) = c i ( v i v i ) Since v i v i 0, we must have c i = 0 and the result follows Orthogonal Matrix ( 正交矩阵 ): Theorem 4 Let U = ( v 1 v r ) R n r Then 1 { v 1,, v r } is orthogonal iff U T U is invertible and diagonal; 2 { v 1,, v r } is orthonormal iff U T U = I r Proof 1 { v 1,, v r } is orthogonal [ U T U ] ij = vt i v j = v i v j = 2 Similar to 1 U T U is invertible and diagonal { vi 0 if i = j; 0 otherwise 2

Definition 5 (orthogonal matrix) orthogonal iff U T U = I n (or U T = U 1 ) ( cos θ sin θ Example: For any θ R, sin θ cos θ A matrix U R n is said to be ) is orthogonal Theorem 6 1 I n is orthogonal 2 If U R n is orthogonal then so is U 1 3 If U 1 and U 2 R n are orthogonal then so is U 1 U 2 (So the set of orthogonal matrices of size n is a group under multiplication) Proof Easy, left as an exercise Why is orthogonal basis useful? Theorem 7 Let B = { b 1,, b n } be an orthogonal basis of R n Then for any v R n we have So if B is orthonormal, then ( ) T ( v b 1 ) [ v] B = ( b 1 b 1 ) ( v b n ) ( b n b n ) [ v] B = ( ( v b 1 ) ( v b n )) T Proof Suppose [ v] B = ( c 1 c n ) T Then for i = 1,, n, we have v b i = ( c 1 b1 + + c n bn ) b i = c 1 ( b 1 b i ) + + c n ( b n b i ) = c i ( b i b i ) So c i = ( v b i ) ( b i b i ) Example: Textbook P385 3

Theorem 8 Let B = { b 1,, b n } be an orthonormal basis of R n Then for any u, v R n, 1 u v = [ u] B [ v] B ; 2 v = [ v] B ; 3 d( u, v) = d([ u] B, [ v] B ) This means the coordinate isomorphism with respect to B preserves dot product, norm and distance, in other word, the geometric structure of R n is preserved Proof 1 [ u] B [ v] B = ( u b 1 )( v b 1 ) + + ( u b n )( v b n ) = ( u ( v b 1 ) b 1 ) + + ( u ( v bn ) b n ) = u (( v b 1 ) b 1 + + ( v b n ) b n ) = u v 2 and 3 are derived from 1 directly Theorem 9 ( u 1 u n ) is orthogonal iff { u 1,, u n } is an orthonormal basis Theorem 10 Let B be an orthonormal basis Then B is an orthonormal basis iff [B ] B is orthogonal Proof Suppose that B = {b 1,, b n} Then B is orthonormal {b 1,, b n} is orthonormal {[b 1] B,, [b n] B } is orthonormal [by Theorem 8] ([b 1] B [b n] B ) is orthogonal 4

3 Orthogonal Projection ( 正交投影 ) 注 : 下面的要求大家完全掌握证明 Theorem 11 (The Orthogonal Decomposition Theorem) Let W be s subspace of R n Then each y in R n can be written uniquely in the form y = ˆ y + z, where ˆ y is in W and z is in W In fact, if { u 1,, u p } is any orthogonal basis of W, then ˆ y = y u 1 u 1 + + y u p u p u 1 u 1 u p u p and Proof Sketch of the proof: z = y ˆ y 1 Prove ˆ y W (Linear combination of all basis in W ) 2 Prove z W ( z u i, for all u i ) 3 Prove the uniqueness of the decomposition Definition 12 (orthogonal projection) We say the orthogonal projection of y onto a subspace W is proj W y = y u 1 u 1 u 1 u 1 + + y u p u p u p u p where { u 1,, u p } is any orthogonal basis of W Theorem 13 If { u 1,, u p } is any orthonormal basis of a subspace W of R n, then proj W y = ( y u 1 ) u 1 + + ( y u p ) u p If U = [ u 1,, u p ] then proj W y = UU T y If we replace the subspace W in the above theorem by a special subspace L = span{ u}, we can still have: 5

Theorem 14 For any vector y R n, we can have proj L y = y u u u, and z is orthogonal to u in R n We call proj L y the orthogonal projection of y onto L Theorem 15 (The Best Approximation Theorem) Let W be a subspace of R n, y be any vector in R n Then proj W y is the closet point in W to y, in the sense that y proj W y y v for all v in W distinct from ˆ y Proof Since y v = y proj W y + proj W y v, and y proj W y W and proj W y v W, so y v 2 = y proj W y 2 + proj W y v 2 That is y v 2 y proj W y 2 6

4 Where to use the Best Approximation Theorem Question: We just do nothing when the matrix equation A x = b has no solution in real scenarios? NO!!!NO!!!NO!!!! Let A R m n and b R m If there is no solution for the matrix equation A x = b, we are still required to find x R n such that A x is the best approximation of b in some sense A feasible approach to this problem is to find x such that the distance between b and A x is as small as possible We formulate this idea as follows: Definition 16 (the least squares solution (version 1)) Let A R m n and b R m Then a least squares solution of A x = b is an ˆ x R n such that b Aˆ x b A x for all x R n The distance d( b, Aˆ x) = b Aˆ x is called the least squares error of A x = b Define W = Col(A) Notice that w = A x for some x R n iff w W and by Theorem 15, the closest vector to b among all vectors in W is the orthogonal projection b W of b onto W, which is unique So Definition 16 can be recast equivalently as Definition 17 (the least squares solution (version 2)) Let A R m n and b R m Then a least squares solution of A x = b is an ˆ x R n such that Aˆ x = b W, where W = Col(A) 7

Question: How to compute the least-square solution? The least squares solution set of a matrix equation over R is identified completely as follows: Theorem 18 Let A R m n and b R m Then the least squares solution set of the equation A x = b is precisely the solution set of the equation Proof Define W = Col(A) Then A T A x = A T b Aˆ x = b W b Aˆ x W So the result follows b Aˆ x Nul(A T ) [since W = Nul(A T )] A T ( b Aˆ x) = 0 A T Aˆ x = A T b Examples: Textbook P411, P412, P413 Remark: If { a 1,, a n } is an orthogonal set then So ˆ x can be written down directly as bw = b a 1 a 1 a 1 a 1 + + b a n a n a n a n ˆ x = ( b a1 a 1 a 1 b an a n a n ) T Example: Textbook P414 8

Question: What is the case when A T A is invertible? If A T A is invertible then the matrix equation A x = b has a unique least squares solution, namely (A T A) 1 A T b But this is not always the case The next theorem gives a sufficient and necessary condition for A T A being invertible Lemma 19 Let A R m n Then 1 Nul(A) = Nul(A T A); 2 rank(a) = rank(a T A) Proof 1 Suppose that x Nul(A), namely A x = 0 Then A T Ax = A T 0 = 0 So x Nul(A T A), that is Nul(A) Nul(A T A) Conversely, suppose that x Nul(A T A), namely A T Ax = 0 Then (A x) (A x) = (A x) T (A x) = A x 2 = 0, which forces that A x = 0 So x Nul(A) and Nul(A T A) Nul(A) 2 By the rank & nullity Theorem, rank(a) = n dim Nul(A) = n dim Nul(A T A) = rank(a T A) Theorem 20 Let A = ( a 1 a n ) R m n Then A T A is invertible iff { a 1,, a n } is linearly independent Proof Notice that A T A R n Then A T A is invertible rank(a T A) = n rank(a) = n [by Lemma 4] dim Col(A) = dim Span{ a 1,, a n } = n { a 1,, a n } is linearly independent 9

5 Constructing Orthogonal Basis by Gram Schmidt Process ( 格拉姆 - 施密特正交化 ) Question: We have seen the usefulness of orthonormal/orthogonal basis But how can we generate them? 注 : 这里告诉我们怎样从一组向量集中构造正交基 We shall show this by the means of the Gram Schmidt process Theorem 21 (the Gram Schmidt process) Let { w 1,, w r } R n be a linearly independent set Then we can construct an orthogonal set { v 1,, v r } R n such that Span{ v 1,, v r } = Span{ w 1,, w r } Furthermore, by normalising { v 1,, v r }, we obtain an orthonormal set { u 1,, u r } R n such that Span{ u 1,, u r } = Span{ w 1,, w r } Proof We shall prove the first part of the theorem by induction on r( 下面, 我们用数学归纳法证明 ) 1 STEP 1: r = 1 Then we can take v 1 = w 1 and the result is trivial 2 STEP 2: Inductive Hypothesis Assume the result holds for r 1 3 STEP 3: Inductive Step Since { w 1,, w r 1 } is linearly independent, so by Inductive Hypothesis, we can construct an orthogonal set { v 1,, v r 1 } such that Span{ v 1,, v r 1 } = Span{ w 1,, w r 1 } Now, v i 0, for all i = 1,, r 1, so v r = w r w r v 1 v 1 w r v r 1 v r 1 v 1 v 1 v r 1 v r 1 is well defined It is obvious that Span{ v 1,, v r } = Span{ w 1,, w r }, 10

so v r 0 Also for i = 1,, r 1, we have v r v i = w r v i w r v 1 v 1 v 1 v 1 v i w r v r 1 v r 1 v r 1 v r 1 v i = w r v i w r v i v i v i v i v i = 0 Therefore { v 1,, v r } is an orthogonal set Finally, for i = 1,, r, define u i = v i v i Then { u 1,, u r } is orthonormal and Span{ u 1,, u r } = Span{ w 1,, w r } The Gram Schmidt Process: According to the proof of the above theorem, we can write down v 1,, v r and u 1,, u r directly as follows: v 1 = w 1, v 2 = w 2 w 2 v 1 v 1 v 1 v 1, v i = w i w i v 1 v 1 w i v i 1 v i 1, v 1 v 1 v i 1 v i 1 v r = w r w r v 1 v 1 w r v r 1 v r 1, v 1 v 1 v r 1 v r 1 u 1 = v 1 v 1, u 2 = v 2 v 2,, u r = v r v r This process of writing down v 1,, v r and u 1,, u r is called the Gram Schmidt process, which can be used to creating an orthonormal basis for any subspace of R n Examples: Textbook P402, P405 11

QR Decomposition: Application of Gram Schmidt: An application of Gram Schmidt is for decompose a matrix A whose columns are linearly independent into the following forms: A = QR, where Q is a matrix whose columns form an orthonormal basis for ColA and R is an upper triangular invertible matrix with positive entries onits diagonal More specifically, we have the following theorem: Theorem 22 (QR factorization (QR 分解 )) Let A = ( w 1 w r ) R m r and rank(a) = r Then A can be factorised as A = QR, where Q R m r such that the columns of Q form an orthonormal basis of Col(Q) and R R r r is an upper triangular matrix such that diagonal entries are positive Proof The rank of A is r indicates that { w 1,, w r } is linearly independent So by Theorem 1, we can construct orthogonal set { v 1,, v r } and orthonormal set { u 1,, u r } such that for i = 1,, r, w i = w i v 1 v 1 + + w i v i 1 v i 1 + v i, v i = v i u i, v 1 v 1 v i 1 v i 1 That is and w 1 2 v 1 v 1 v 1 0 1 ( w 1 w r ) = ( v 1 v r ) 0 0 1 w r v 1 v 1 v 1 w r v 2 v 2 v 2 ( v 1 v r ) = ( u 1 u r ) diag( v 1, v 2,, v r ) So w v 1 0 0 1 2 v 1 v 1 v 1 0 v 2 0 0 1 ( w 1 w r ) = ( u 1 u r ) 0 0 v r 0 0 1 v 1 w 2 u 1 w r u 1 0 v 2 w r u 2 = ( u 1 u r ) 0 0 v r w r v 1 v 1 v 1 w r v 2 v 2 v 2 12

Take Q = ( u 1 u r ) and R = result follows v 1 w 2 u 1 w r u 1 0 v 2 w r u 2 0 0 v r and the Example: Textbook P406 13