5. Orthogonality 5.1. The Scalar Product in Euclidean Space 5.1 The Scalar Product in Rn
Thusfar we have restricted ourselves to vector spaces and the operations of addition and scalar multiplication: how else might we combine vectors? You should know about the scalar (dot) and cross products of vectors in R3 The scalar product extends nicely to other vector spaces, while the cross product is another story1 The basic purpose of scalar products is to define and analyze the lengths of and angles between vectors2
1But not for this class! You may see ‘wedge’ products in later classes. . . 2It is important to note that everything in this chapter, until mentioned, only applies to real vector spaces (where F = R) 5. Orthogonality 5.1. The Scalar Product in Euclidean Space Euclidean Space
Definition 5.1.1 Suppose x, y Rn are written with respect to the standard ∈ basis e ,..., e { 1 n} 1 The scalar product of x, y is the real numbera (x, y) := xTy = x y + x y + + x y 1 1 2 2 ··· n n 2 x, y are orthogonal or perpendicular if (x, y) = 0 3 n-dimensional Euclidean Space Rn is the vector space of n 1 column vectors R × together with the scalar product
aOther notations include x y and x, y · h i Euclidean Space is more than just a collection of co-ordinates vectors: it implicitly comes with notions of angle and length3 Important Fact: (y, x) = yTx = (xTy)T = xTy = (x, y) so the scalar product is symmetric 3To be seen in R2 and R3 shortly 5. Orthogonality 5.1. The Scalar Product in Euclidean Space Angles and Lengths
Definition 5.1.2 p The length of a vector x Rn is its norm x = (x, x) ∈ || || The distance between two vectors x, y is given by y x || − ||
y (y1, y2) Theorem 5.1.3
θ [0, π] y x The angle between two vectors − ∈ y x, y in R2 or R3 satisfies the equation (x , x ) θ 1 2 (x, y) = x y cos θ x || || || || x Definition 5.1.4 We define the angle θ between x, y Rn to be the number ∈ 1 (x, y) θ = cos− x y || || || || 1 θ is the smaller of the two possible angles, since cos− has range [0, π] 5. Orthogonality 5.1. The Scalar Product in Euclidean Space Proof of Theorem.
y (y1, y2) If x, y are parallel then θ = 0 or π and the Theorem is trivial y x 2 − Otherwise, in R (or in the plane y Span(x, y) R3), the cosine rule (x , x ) ≤ θ 1 2 holds: x x x y 2 = x 2 + y 2 2 x y cos θ || − || || || || || − || || || || Applying the definition of norm and scalar product, we obtain 2 x y cos θ = x 2 + y 2 x y 2 || || || || || || || || − || − || = xTx + yTy (x y)T(x y) − − − = xTx + yTy (xTx + yTy xTy yTx) − − − = xTy + yTx = 2(x, y) as required 5. Orthogonality 5.1. The Scalar Product in Euclidean Space Basic results & inequalities
Several results that you will have used without thinking in elementary geometry follow directly from the definitions
Theorem 5.1.5 (Cauchy–Schwarz inequality) If x, y are vectors in Rn then
(x, y) x y | | ≤ || || || || with equality iff x, y are parallel
Proof.
(x, y) = x y cos θ = x y cos θ x y | | || || || || || || || || | | ≤ || || || || Equality is satisfied precisely when cos θ = 1: that is when ± θ = 0, π, and so x, y are parallel 5. Orthogonality 5.1. The Scalar Product in Euclidean Space Theorem 5.1.6 (Triangle inequality) If x, y Rn then x + y x + y ∈ || || ≤ || || || || I.e. Any side of a triangle is shorter than the sum of the others y Proof. x + y 2 = (x + y, x + y) = (x + y)T(x + y) || || 2 2 = x + 2(x, y) + y y || || || || 2 2 x + 2 (x, y) + y x + y ≤ || || | | || || x 2 + 2 x y + y 2 ≤ || || || || || || || || 2 = ( x + y ) x || || || || x If (x, y) = 0, the second line in the proof of the triangle inequality immediately yields Theorem 5.1.7 (Pythagoras’) If x, y Rn are orthogonal then x + y 2 = x 2 + y 2 ∈ || || || || || || 5. Orthogonality 5.1. The Scalar Product in Euclidean Space
Example 1 3 Let x = 2 and y = −1 , then 1 3 − q x = (x, x) = √1 + 4 + 1 = √6 || || y = √9 + 1 + 9 = √19 || || (x, y) = 3 + 2 3 = 4 − − −
1 (x, y) 1 4 θ = cos− = cos− − x y √6√19 || || || || 1.955 rad 112◦ ≈ ≈ 4 y x = −1 = √33 || − || −4 √6 + √19 ≤ 5. Orthogonality 5.1. The Scalar Product in Euclidean Space Projections
Scalar products are useful for calculating how much of one vector points in the direction of another Definition 5.1.8 Rn 1 The unit vector in the direction of v is the vector v v ∈ || || The scalar projection of x onto v = 0 in Rn is 6 the scalar product 1 (v, x) α (x) = v, x = v v v || || || || x The orthogonal (or vector) projection of x onto v = 0 in Rn is 6 1 (v, x) v πv(x) = αv(x) v = 2 v v v πv(x) || || || || Note: α (x) = π (x) : if α (x) < 0 then the projection of x v 6 || v || v onto v points in the opposite direction to v 5. Orthogonality 5.1. The Scalar Product in Euclidean Space
Orthogonal projection means several things:
1 π (Rn) (π is a linear map) v ∈ L v n 2 πv(R ) = Span(v) (Projection onto Span(v))
3 πv(v) = v (Identity on Span(v)) 4 ker π = v = y Rn : (y, v) = 0 (Orthogonality) v ⊥ { ∈ }
1 , 2 , 3 say that πv is a projection
4 makes the projection orthogonal: any- x thing orthogonal to v is mapped to zero ker πv
n v Similarly αv (R , R) ∈ L πv(x) 5. Orthogonality 5.1. The Scalar Product in Euclidean Space The matrix of a projection
Since πv is a linear map, it has a standard matrix representation Indeed
(v, x) (v, x) vTx vvT πv(x) = v = v = v = x v 2 v 2 v 2 v 2 || || || || || || || || vvT whence the matrix of πv is the n n matrix 2 v × || || Example 2 x In R , orthogonal projection onto v = ( y ) has matrix
1 x 1 x2 xy A = (x y) = v x2 + y2 y x2 + y2 xy y2