Inner Product and Orthogonality
Total Page:16
File Type:pdf, Size:1020Kb
Math 240 TA: Shuyi Weng Winter 2017 March 10, 2017 Inner Product and Orthogonality Inner Product The notion of inner product is important in linear algebra in the sense that it provides a sensible notion of length and angle in a vector space. This seems very natural in the Euclidean space Rn through the concept of dot product. However, the inner product is much more general and can be extended to other non-Euclidean vector spaces. For this course, you are not required to understand the non-Euclidean examples. I just want to show you a glimpse of linear algebra in a more general setting in mathematics. Definition. Let V be a vector space. An inner product on V is a function h−; −i: V × V ! R such that for all vectors u; v; w 2 V and scalar c 2 R, it satisfies the axioms 1. hu; vi = hv; ui; 2. hu + v; wi = hu; wi + hv; wi, and hu; v + wi = hu; vi + hu; wi; 3. hcu; vi = chu; vi + hu; cvi; 4. hu; ui ≥ 0, and hu; ui = 0 if and only if u = 0. Definition. In a Euclidean space Rn, the dot product of two vectors u and v is defined to be the function u · v = uT v: In coordinates, if we write 2 3 2 3 u1 v1 6 . 7 6 . 7 u = 6 . 7 ; and v = 6 . 7 ; 4 5 4 5 un vn then 2 3 v1 T h i 6 . 7 u · v = u v = u1 ··· un 6 . 7 = u1v1 + ··· unvn: 4 5 vn The definitions in the remainder of this note will assume the Euclidean vector space Rn, and the dot product as the natural inner product. Lemma. The dot product on Rn is an inner product. Exercise. Verify that the dot product satisfies the four axioms of inner products. " # 7 2 Example 1. Let A = , and define the function 2 4 hu; vi = uT AvT We will show that this function defines an inner product on R2. Write the vectors " # " # " # u v w u = 1 ; v = 1 ; and w = 1 ; u2 v2 w2 then " #" # h i 7 2 v1 hu; vi = u1 u2 = 7u1v1 + 2u1v2 + 2u2v1 + 4u2v2: 2 4 v2 To verify axiom 1, we compute hv; ui = 7v1u1 + 2v1u2 + 2v2u1 + 4v2u2: Hence, we can conclude that hu; vi = hv; ui. To verify axiom 2, we see that hu; v + wi = 7u1(v1 + w1) + 2u1(v2 + w2) + 2u2(v1 + w1) + 4u2(v2 + w2) = (7u1v1 + 2u1v2 + 2u2v1 + 4u2v2) + (7u1w1 + 2u1w2 + 2u2w1 + 4u2w2) = hu; vi + hu; wi: The other equality follows from axiom 1. Thus axiom 2 is verified. To verify axiom 3, we see that chu; vi = c(7u1v1 + 2u1v2 + 2u2v1 + 4u2v2) = 7(cu1)v1 + 2(cu1)v2 + 2(cu2)v1 + 4(cu2)v2 = hcu; vi: The other equality also follows from axiom 1. Thus axiom 3 is verified. To verify axiom 4, notice that 2 2 2 2 hu; ui = 7u1u1 + 2u1u2 + 2u2u1 + 4u2u2 = 7u1 + 4u1u2 + 4u2 = 3u1 + 4(u1 + u2) : If hu; ui = 0, that means u1 = u2 = 0. The converse is clear. Hence, axiom 4 is verified. Remark (Symmetric Bilinear Form). Let A 2 Rn×n be a symmetric matrix. Then the function given by hu; vi = uT Av for any vectors u; v 2 Rn, defines an inner product on Rn. Inner products on Rn defined in this way are called symmetric bilinear form. In fact, every inner product on Rn is a symmetric bilinear form. In particular, the standard dot product is defined with the identity matrix I, which is symmetric. Definition. The length (or norm) of a vector v 2 Rn, denoted by kvk, is defined by p q 2 2 kvk = v · v = v1 + ··· vn Remark. By the last axiom of the inner product, v · v ≥ 0, thus the length of v is always a non-negative real number, and the length is 0 if and only if v is the zero vector. Definition. A vector with length 1 is called a unit vector. If v = 0, then the vector 1 1 u = v = p v kvk v · v is the normalization of v. Example 2. Consider the vector 223 6 7 v = 425 : 1 Its length is p p p kvk = v · v = 22 + 22 + 12 = 9 = 3; and its normalization is 22=33 1 1 u = v = v = 62=37 : kvk 3 4 5 1=3 Definition. For vectors u; v 2 Rn, we can define the distance between them by dist(u; v) = ku − vk: " # " # −4 1 Example 3. Let u = and v = , then the distance between them is 3 1 p ku − vk = p(−4 − 1)2 + (3 − 1)2 = 29: This distance is demonstrated in the following figure. u v Orthogonality The notion of inner product allows us to introduce the notion of orthogonality, together with a rich family of properties in linear algebra. Definition. Two vectors u; v 2 Rn are orthogonal if u · v = 0. Theorem 1 (Pythagorean). Two vectors are orthogonal if and only if ku+vk2 = kuk2 +kvk2. Proof. This well-known theorem has numerous different proofs. The linear-algebraic ver- sion looks like this. Notice that ku + vk2 = (u + v) · (u + v) = u · u + u · v + v · u + v · v = kuk2 + kvk2 + 2u · v: The theorem follows from the fact that u and v are orthogonal if and only if u · v = 0. The following is an important concept involving orthogonality. Definition. Let W ⊆ Rn be a subspace. If a vector x is orthogonal to every vector w 2 W , we say that x is orthogonal to W . The orthogonal complement of W , denoted by W ?, is the collection of all vectors orthogonal to W , i.e., ? n W = fx 2 R j x · w = 0 for all w 2 W g: Lemma. W ? is a subspace of Rn. Exercise. Verify that W ? satisfies the axioms of a subspace. Exercise. Let W ⊆ Rn be a subspace. Prove that dim W + dim W ? = n. [Hint: Use Rank-Nullity Theorem] ? Theorem 2. If fw1;:::; wkg forms a basis of W , then x 2 W if and only if x · wi = 0 for all integers 1 ≤ i ≤ k. Proof. Let fw1;:::; wkg be a basis of W . Assume that x · wi = 0. Let w 2 W be arbitrary. Then w can be written as a linear combination w = c1w1 + ··· + ckwk: By the linearity of dot product, we have x · w = c1x · w1 + ··· + ckx · wk = 0 + ··· + 0 = 0: Thus x 2 W ?. The converse is clear. Example 4. Find the orthogonal complement of W = spanfw1; w2g, where 2 3 2 3 3 0 6 7 6 7 607 627 w1 = 6 7 ; and w2 = 6 7 : 617 657 4 5 4 5 1 1 By the theorem above, to find all vectors x 2 W ?, we only need to make sure we find all x 2 R4 that satisfies x · w1 = x · w2 = 0: If we write 2 3 x1 6 7 6x27 x = 6 7 ; 6x 7 4 35 x4 we immediately obtain a system of linear equations 3x1 + x3 + x4 = 0 2x2 + 5x3 + x4 = 0 A sequence of row operation gives all solutions to this linear system 2 3 2 3 2 3 −x3=3 − x4=3 2 2 6 7 6 7 6 7 6−5x3=2 − x4=27 6 157 6 37 x = 6 7 = s 6 7 + t 6 7 6 x 7 6−67 6 07 4 3 5 4 5 4 5 x4 0 −6 Exercise. Let A be an m × n matrix. Prove that (ColA)? = NulAT . [Hint: Use a similar method as demonstrated in the previous example. ] n Definition. A set of vectors fu1;:::; ukg in R is an orthogonal set if each pair of distinct vectors from the set is orthogonal, i.e., ui · uj = 0 whenever i 6= j. An orthogonal basis for a subspace W is a basis for W that is also an orthogonal set. An orthonormal basis for a subspace W is an orthogonal basis for W where each vector has length 1. n Example 5. The standard basis fe1;:::; eng forms an orthonormal basis for R . Example 6. Consider the following vectors in R4: 2 3 2 3 2 3 2 3 1 1 1 1 6 7 6 7 6 7 6 7 617 6 17 6−17 6−17 v1 = 6 7 ; v2 = 6 7 ; v3 = 6 7 ; v4 = 6 7 : 617 6−17 6 17 6−17 4 5 4 5 4 5 4 5 1 −1 −1 1 One can easily verify that fv1; v2; v3; v4g forms an orthogonal set. Furthermore, the matrix h i v1 v2 v3 v4 is row equivalent to the identity matrix. Thus the four vectors are linearly independent. It 4 follows that fv1; v2; v3; v4g forms an orthogonal basis for R . Furthermore, if we normalize the vectors and obtain 2 3 2 3 2 3 2 3 1=2 1=2 1=2 1=2 6 7 6 7 6 7 6 7 61=27 6 1=27 6−1=27 6−1=27 u1 = 6 7 ; u2 = 6 7 ; u3 = 6 7 ; u4 = 6 7 ; 61=27 6−1=27 6 1=27 6−1=27 4 5 4 5 4 5 4 5 1=2 −1=2 −1=2 1=2 4 then fu1; u2; u3; u4g forms an orthonormal basis for R 4 Exercise. Verify that fv1; v2; v3; v4g in Example 6 forms an orthogonal basis for R . Definition. Let A be an n × n matrix. We say A is an orthogonal matrix if AT A = I.