<<

5 Ch 5:

5.1 The Product in Rn Up to now we avoided mutiplication of vectors (we only had addition and scalar multipli- cation). We now define two ways to multiply them. 1. the scalar product () xT y is the scalar (number)

T x y = x1y1 + x2y2 + ... + xnyn

T T where the two vectors are x = (x1, x2, . . . , xn) and y = (y1, y2, . . . , yn) (note that yT x gives the same scalar product, so the operation is commutative). √ 2. the norm ||x|| is the scalar product xT x, and it gives the length of the vector x. 3. so then the norm ||x − y|| gives the length of the vector x − y, which is the distance between x and y

2 3 4. using the geometry given by the 3 vectors in R or R (namely the triangle given by x, y and x − y) we obtain another way of finding the scalar product: xT y = ||x||·||y|| cos θ, where θ is the between x and y. 5. and so we can find the angle between the two vectors x and y:   −1 xT y θ = cos ||x||·||y|| .

Or, if we normalize the vectors (i.e. they will have length one, but the angle stays the x y −1 T same) by letting u = ||x|| and v = ||y|| , the above relation gives us θ = cos (u v) Recall that we always take the angle that is less than π. 6. two vectors x and y are orthogonal if xT y = 0, i.e. cos θ = 0 (since the vectors are nonzero as the zero vector is orthogonal to every vector) 7. Cauchy-Schwarz Inequality : Since | cos θ| ≤ 1, for ∀θ, using the inequality |xT y| = ||x|| · ||y||| cos θ| ≤ ||x|| · ||y|| · 1 and so we obtain Cauchy-Schwarz inequality:

|xT y| ≤ ||x|| · ||y||

8. The Cauchy-Schwarz inequality becomes equality (equation) if a vector is a constant multiple of the other (i.e. θ = 0 or θ = π).

2 T 9. two vectors are orthogonal (perpendicular in R ) if x y = 0 (note that this implies that ||x|| · ||y|| cos θ = 0, i.e. either one of the vectors is the zero vector, or the cosine of the angle between them is zero, i.e. that the angle is π/2) 10. Application to websearch: Originally the search did a boolean search (weights were associated with each word) but this brought too many links for one query (as it didn’t take into consideration synonyms and polysyms). And so, the cosine measurement finds best matches to a list of search words without having to match every word in the query (every word has the same weight now), and the one with the smallest angle will be printed as the highest match.

1 11. How can we find the distance from a point P to a ` (P is not on `)? We can use the orthogonal projection of P (vector x) onto some vector y that lies on `: xT y xT y the of x to y (the distance from x to y) is α = 2 = √ , ||y|| yT y and T T the of x to y is p = x y y = √x y y. ||y|| yT y (so p is a vector in the same direction as y, it’s a scalar multiple of y.)

12. and so the dot product xT y helps find the angle between the vectors x and y (or the length of a vector), and the scalar projection of x onto y gives the length of the projection of x on y.

3 13. the normal N to a π in R is the vector that is perpendicular to every vector in the plane π (and so N is normal to π).

T 14. if N = (a, b, c) is the normal to π, then for every point P0 ∈ π, where the coordinates of P0 = (x0, y0, z0) (this is not a vector, just a point with 3 coordinates) we have the following equation of the plane π:

a(x − x0) + b(y − y0) + c(z − z0) = 0.

T The above relation can be obtained from PP0 · N = 0 as any vector PP0 ∈ π is perpendicular to N.

n 15. all definitions above can generalize to R

2