Geometry: vectors, lines and planes Mathematics 2: Linear Algebra Maurice Koster & Joris Marée c 2018, University of Amsterdam 2 Contents 1 Vector algebra 1.1 1.2 1.3 1.4 1.5 1.6 Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Vector algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1 Special vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.2 Linear Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . Inner-product and length . . . . . . . . . . . . . . . . . . . . . . . . . . . . The angle between vectors, projections . . . . . . . . . . . . . . . . . . . . 1.4.1 Distances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.2 Angle between vectors . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.3 Perpendicular vectors . . . . . . . . . . . . . . . . . . . . . . . . . . Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exercises: Vectors and length . . . . . . . . . . . . . . . . . . . . . . . . . 2 Lines, planes, distances 2.1 2.2 2.3 2.4 2.5 Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Planes in R3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Applications: calculation of distances . . . . . . . . . . . . . . . . . . . . . 2.3.1 Calculating the distance from a point B to a line ` using the vector representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2 Calculating the distance between two parallel lines . . . . . . . . . 2.3.3 Calculating the distance from a point to a plane V in R3 . . . . . . 2.3.4 Distance between two parallel planes . . . . . . . . . . . . . . . . . Outer product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exercises: lines, planes and distances . . . . . . . . . . . . . . . . . . . . . 3 5 5 7 9 10 11 14 17 17 18 19 21 27 27 29 32 32 32 32 33 34 37 4 Chapter 1 Vector algebra 1.1 Vectors Quantities in the exact sciences (mathematics, fysics) such as area, volume, length, mass or time, can be characterized by a single real number, which represents a value with respect to some chosen unit of measurement. These numbers are referred to as scalars. Other quantities, such as power or speed, have both size and direction and cannot be represented or characterized by a single real number. A directed line segment is used to represent such quantities. If A is supposedly the starting point of a line segment and B −→ its endpoint, then we denote the directed line segment AB by AB . Directed line segments with the same length and the same direction are called equivalent. −→ The set of all line segments equivalent with AB is called a vector in the plane. We may represent such a class by one of its members. In particular, we can always nd a −→ representant of type OP , the directed line segment that points at a point P from the origin O. This representant is called the vector in standard position. 5 Section 1.1 Mathematics 2 Reader y y B B A P A x O Figure 1.1: position. x O −−→ Left: directed line segment AB . Right: the vector OP in standard Mostly we will not distinguish between the class of directed line segments and one of its −→ −→ representants. We will say that AB and OP are representants of the same vector. −→ Consider the vector AB in Figure 1.2. We may x the direction of the vector by y B 1 O A x 1 Figure 1.2: Vector in R2 determining simultaneously the displacement in x and y direction necessary to go from A to B . So in this example the vector is determined by the displacement 3 in x direction and 1 in y direction. This is denoted by −→ AB = 3 . 1 The rst number refers to the displacement in the x direction, the second to the displacement in the y direction. In general we may write down a vector in R2 by an ordered pair of numbers, that we will denote as a column. Suppose that A(x0 , y0 ) and B(x1 , y1 ) denote respectively the starting point and end −→ point of the directed line segment AB , then we may represent the accompanying vec−→ tor ~v = AB by x1 − x0 . y1 − y0 c 2018, M. Koster 6 Section 1.2 Mathematics 2 Reader Two vectors are equal precisely when they have the same components. Note that 3 1 6= , 1 3 as the ordering of the components matters in this respect. The notion of a vector is easily generalized to higher dimensions. A vector in R3 is an ordered triple of numbers u1 ~u = u2 ∈ R3 . u3 In general: a vector in Rn is an ordered n-tuple of numbers u1 u2 ~u = .. ∈ Rn . . un The reals u1 , u2 , . . . , un are called the components of ~u. Two vectors ~u and ~v are equal, precisely when their corresponding components are equal: ~u = ~v ⇐⇒ ui = vi voor i = 1, 2, . . . , n. Remark Above we used brackets for vectors, but in practise square brackets are used as well: a vector ~v ∈ Rn is also denoted as v1 v2 .. . vn Also - depending on the application authors use row notation instead of column notation. For reasons of clarity a row vector uses comma's, so that a row vector in R2 is written as [x1 , x2 ] or (x1 , x2 ). Usually this is done for the sake of graphical exposition in order to increase the readibility of a text. Many textbooks on multivariable calculus use this convention. In this course we will stick to column notation. 1.2 Vector algebra Below we will show the algebraic manipulations that we will dene for vectors, like addition and multiplication by a scalar. c 2018, M. Koster 7 Section 1.2 Mathematics 2 Reader u1 v1 u2 v2 Sum The sum of two vectors ~u = .. ∈ Rn and ~v = .. ∈ Rn is dened by . . un vn u1 + v1 u2 + v2 ~u + ~v = ∈ Rn . .. . un + vn Scalar multiplication: for given c ∈ R and u ∈ Rn we dene cu1 cu2 c~u = .. ∈ Rn . . cun Dierence for given vectors ~u and ~v the dierence vector ~v − ~u is dened by ~v − ~u = ~v + (−~u) . Note that in order to be able to dene the dierence of two vectors we need the above operations sum and scalar multiplication. Important: it is not possible to divide a vector by another vector! Algebraic Properties: 1. ~u + ~v = ~v + ~u, the order in which we perform the addition does not matter; 2. ~u + (~v + w) ~ = (~u + ~v ) + w, ~ the order in which we perform the addition does not matter; in large sums one may leave out the brackets 3. ~u + ~0 = ~u, a vector is invariant under addition by the nulvector 4. ~u + (−~u) = ~0; so ~u and −~u are opposed vectors. This property is used in solving 1 equations like ~x + = ~0. 2 c 2018, M. Koster 8 Section 1.2 Mathematics 2 Reader 5. c (~u + ~v ) = c~u + c~v . Proof of this property: u1 + v1 c(u1 + v1 ) cu1 + cv1 u2 + v2 c(u2 + v2 ) cu2 + cv2 c (~u + ~v ) = c = = .. .. .. . . . un + vn c(un + vn ) cun + cvn cu1 cv1 u1 v1 cu2 cv2 u2 v2 = .. + .. = c .. + c .. . . . . . cun cvn un vn 6. (c + d) ~u = c~u + d~u 7. (cd) ~u = c (d~u) Example The can be combined and used to simplify expressions with vectors, like above properties ~ 2~a + 3b − 2~a − 4~b. Since 2~a + 3~b − 2~a − 4~b = 2~a + 3~b − 2~a + −4~b = 2~a + (−2~a) + 3~b + −4~b ~ ~ = 2~a + (−2~a) + 3b + −4b = 0~a + 3~b + −4~b = 3~b + −4~b = −~b. / Parallellogram Rule Let ~a and ~b be position vectors. Then the sum ~a +~b and the dierence ~a −~b are geometrically given by the axes of the parallellogram as in Figure 1.3. 1.2.1 Special vectors The null vector in Rn is the vector with all components equal to 0: 0 0 ~0 = .. ∈ Rn . 0 c 2018, M. Koster 9 Section 1.2 Mathematics 2 Reader uÓ + vÓ uÓ uÓ - vÓ uÓ vÓ Figure 1.3: vÓ Sum and dierence of two vectors. In Rn there are n so-called standard unit vectors ~e1 , ~e2 , . . . , ~en−1 , ~en 1 0 0 0 0 1 .. .. ~e1 = .. , ~e2 = .. , . . . , ~en−1 = . , ~en = . . . . 1 0 0 0 0 1 So ~ei is the vector with the i-th component equal to 1 and all other components equal to 0. For some applications the vector with all ones is also credited a special symbol: 1 1 ι = .. ∈ Rn . . 1 1.2.2 Linear Combinations One of the main topics in linear algebra is to look at sets of vectors, and nd possible linear relations between them. If a vector ~v is the sum of k scaled vectors ~v1 , . . . , ~vk then ~v is called a linear combination of those: Linear Combination Vector ~v is a linear combination of the vectors ~v1 , ~v2 , . . . , ~vk if there are scalars c1 , c2 , . . . , ck ∈ R such that ~v = c1~v1 + c2~v2 + . . . + ck~vk . So ~v is a sum of scaled vectors ~v1 , ~v2 , . . . , ~vk . Example c 2018, M. Koster 10 Section 1.3 Mathematics 2 Reader 2 1 0 • 2 is a linear combination of 0 en −1 , since 2 1 0 2 1 0 2 = 2 0 + (−2) −1 . 2 1 0 2 1 0 2 is not a linear combination of 0 en 0 , since • 2 1 1 for some c1 en c2 . 1 0 c1 2 0 c1 0 + c2 0 = 6= 2 1 1 c1 + c2 2 / / Example Each vector ~v ∈ Rn can be written as linear combination of the standard unit vectors since ~v = v1~e1 + v2~e2 + . . . + vn~en = n X / vi~ei . i=1 Example Each vector R2 can be written as linear combination of standard unit vectors 1 0 ~e1 = en ~e2 = but also as linear combination of vectors ~v = 0 1 1 w ~= : 1 1 0 1 0 a 1 0 1 +b· = a +b =a − b 0 1 1 2 2 2 2 = a(w ~ − 21 ~v ) + 12 b~v = aw ~ + 12 (b − a)~v 1.3 0 2 en / Inner-product and length Below we will introduce the inner-product of two vectors. Using the inner-product we will be able to formalize notions as angle between vectors, even if these are taken from a rather abstract space like Rn for n > 3 where our geometric intuition is lacking. In particular, it will be important to have an idea of what is perpendicular here. Also the notion of length is easily expressed using inner-products. c 2018, M. Koster 11 Section 1.3 Mathematics 2 Reader Inner-product For ~u, ~v ∈ Rn the inner-product (dot-product) is given by ~u · ~v = u1 v1 + u2 v2 + . . . + un vn = Remark: the inner product is also denoted as n X i=1 ui vi ∈ R. ~u · ~v = h~u, ~v i = (~u, ~v ) = h~u | ~v i = (~u | ~v ) . Rules for calculations • ~u · ~v = ~v · ~u (commutativity) • ~u · (~v + w) ~ = ~u · ~v + ~u · w ~ (distributivity) • (c~u) · ~v = c (~u · ~v ) • ~u · ~u ≥ 0 • ~u · ~u = 0 ⇔ ~u = ~0 Proof of the last rule: (⇒) Suppose ~u = 0. Then ~u · ~u = 02 + 02 + . . . + 02 = 0. (⇐) IF ~u · ~u = 0 then u21 + u22 + . . . + u2n = 0. So u21 = u22 = . . . = u2n = 0 and that's why u1 = u2 = . . . un = 0. So parts (a) and (b) together lead to the desired result. Example (~u + ~v ) · (~u + ~v ) = = = = (~u + ~v ) · ~u + (~u + ~v ) · ~v ~u · (~u + ~v ) + ~v · (~u + ~v ) ~u · ~u + ~u · ~v + ~v · ~u + ~v · ~v ~u · ~u + 2~u · ~v + ~v · ~v √ Length The length or norm of a vector ~u ∈ Rn is dened by k~uk = ~u · ~u. 2 Example The geometric intuition for R is consistent with the new denition. Since by Pythagoras' Theorem the length of ~v = k~v k = c 2018, M. Koster √ a b a2 + b 2 = is given by s a b a · b / 12 Section 1.3 Mathematics 2 Reader Example v u 1 1 u 1 √ √ 2 =u t 2 · 2 = 12 + 22 + 32 = 14. 3 3 3 The norm as a function of vectors has several nice properties. First of all the length of a vector can only be zero when it is the zero vector. Moreover, scaling up a vector by a factor c will multiply its length by |c|. Note here that the direction of the scaling is not important: Properties of the norm k..k 1. k~uk = 0 ⇐⇒ ~u = ~0 2. kc~uk = |c| k~uk. Proof of property 2: For c ∈ R and ~u ∈ Rn it holds kc~uk2 = (c~u) · (c~u) = c (~u · (c~u)) = c ((c~u) · ~u) = c2 (~u · ~u) = c2 k~uk2 . √ p Dus kc~uk = c2 · k~uk2 = |c| k~uk. Unit vectors Vectors of length 1 are called unit vectors. Example For unit vectors in R2 we have k~uk = 1 ⇐⇒ q u21 + u22 = 1 ⇐⇒ u21 + u22 = 1. So this means that the end points of the associated directed line segments are on the unit circle. And following the same logic see Figure 1.4 the end points of the unit vectors in R3 are situated on the unit sphere (x, y, z) ∈ R3 | x2 + y 2 + z 2 = 1 . / Theorem 1. Take an arbitrary vector ~v 6= ~0 . Then the vector ~u = Proof: k~uk = c 2018, M. Koster 1 ~v k~v k = 1 k~v k k~v k = k~v1k k~v k = 1. 1 ~v has length 1. k~v k 13 Section 1.4 Mathematics 2 Reader 1 0 Figure 1.4: 1 Unit vectors on the circle in R2 and the unit sphere in R3 . Remark The vector ~u is also called the normalisation of ~v . 1.4 The angle between vectors, pro jections The important theorem in this paragraph is a classic one: The Cosinus Law Let ∆ABC be a triangle and let a = |BC|, b = |AC|, c = |AB|, and θ = ∠(BAC). Then we have a2 = b2 + c2 − 2bc cos θ. Proof: Take θ ∈ [0, 12 π] as in Figure 1.5. With Pythagoras' Theorem we deduce that for ∆ADC it holds that h2 = b2 −b2 cos2 θ, whereas in ∆DBC we have h2 = a2 −(c − b cos θ)2 . C b A a Θ c Figure 1.5: c 2018, M. Koster h D B Acute angle θ. 14 Section 1.4 Mathematics 2 Reader Combine these two identities to see that b2 − b2 cos2 θ = h2 = a2 − (c − b cos θ)2 and so a2 = b2 − b2 cos2 θ + c2 − 2cb cos θ + b2 cos2 θ = c2 + b2 − 2cb cos θ, which is what we wanted to show. In case θ > 21 π as in Figure 1.6 we may apply a similar reasoning. In ∆ADC it holds h2 = b2 − b2 cos2 (π − θ) and in ∆DBC h2 = a2 − (c + b cos (π − θ))2 . C h a b Θ D A Figure 1.6: c B Obtuse angle θ. As before, combine these two identities to obtain b2 −b2 cos2 (π − θ) = a2 −(c + b cos (π − θ))2 , and with help of cos (π − θ) = − cos θ we may conclude that a2 = b2 − b2 cos2 θ + c2 − 2cb cos θ + b2 cos2 θ = c2 + b2 − 2cb cos θ A direct consequence of the Cosinus Law is the following theorem for vectors: Generalisation of Cosinus Law to vectors: Suppose ~u, ~v ∈ R2 and let θ = ∠ (~u, ~v ) ∈ [0, π] be the angle between these vectors. Then k~v − ~uk2 = k~uk2 + k~v k2 − 2 k~uk k~v k cos θ. Notice that the lefthand side can be rewritten as k~v − ~uk2 = (~v − ~u) · (~v − ~u) = k~v k2 − 2~u · ~v + k~uk2 . So it follows that ~u · ~v = k~uk k~v k cos θ and because −1 ≤ cos θ ≤ 1 we get − k~uk k~v k ≤ ~u · ~v ≤ k~uk k~v k . We have now shown a geometric proof of the following important theorem, in particular for the case n = 2: Theorem Cauchy-Schwarz Let ~u, ~v ∈ Rn . Then it holds |~u · ~v | ≤ k~uk k~v k . c 2018, M. Koster 15 Section 1.4 Mathematics 2 Reader Proof: An analytical proof for general n goes as follows. For ~u = ~0 or ~v = ~0 it holds |~u · ~v | = k~uk k~v k = 0. So without loss of generality suppose now that ~u, ~v 6= ~0. Take t ∈ R. It holds (~u + t~v ) · (~u + t~v ) ≥ 0 for all t ∈ R. Now, since ~v · ~v > 0 we have (~u + t~v ) · (~u + t~v ) = ~u · ~u + 2t~u · ~v + t2~v · ~v ≥ 0 : =⇒ ~u · ~v ~u · ~u t2 + 2 t+ ≥ 0 ~v · ~v ~v · ~v With completing the squares we obtain ~u · ~v ~u · ~u t +2 t+ = ~v · ~v ~v · ~v 2 Now choose t = − ~u · ~v t+ ~v · ~v 2 ~u · ~u + − ~v · ~v ~u · ~v ~v · ~v 2 ≥ 0. ~u · ~v , then it follows ~v · ~v (~u · ~u) (~v · ~v ) − (~u · ~v )2 ≥ 0 ⇐⇒ (~u · ~u) (~v · ~v ) ≥ (~u · ~v )2 2 (~v · ~v ) ⇐⇒ k~uk2 k~v k2 ≥ (~u · ~v )2 ⇐⇒ k~uk k~v k ≥ |~u · ~v | . Theorem Triangle Inequality Let ~u, ~v ∈ Rn . Then k~u + ~v k ≤ k~uk + k~v k. Proof: Use the Cauchy-Schwarz inequality: k~u + ~v k2 = (~u + ~v ) · (~u + ~v ) = ~u · ~u + 2~u · ~v + ~v · ~v ≤ ~u · ~u + 2 k~uk k~v k + ~v · ~v = (k~uk + k~v k)2 ≥ 0. The conclusion is therefore: k~u + ~v k ≤ k~uk + k~v k . vÓ uÓ uÓ + vÓ Figure 1.7: c 2018, M. Koster Triangle inequality 16 Section 1.4 1.4.1 Mathematics 2 Reader Distances The distance between two vectors is the direct analogon of the (Euclidean) distance between two points on the real line R or the distance of two points in the XY plane, which is also denoted R2 . For the one-dimensional real line the distance between two of its elements x0 , x1 ∈ R equals |x0 − x1 |. In R2 , the (Euclidean) distance between points A(x0 , y0 ) en B(x1 , y1 ) equals p d(A, B) = (x0 − x1 )2 + (y0 − y1 )2 . x0 x1 In vector terminology, for ~u = , ~v = the distance d(A, B) is simply the y0 y1 length of ~u − ~v ; see also Figure 1.8. y B y1 y0 O Figure 1.8: A x0 x1 x Distance between points A(x0 , y0 ) en B(x1 , y1 ). This motivates the denition below: Distance between vectors The distance d(~u, ~v ) between vectors ~u and ~v in Rn is dened by d(~u, ~v ) = k~u − ~v k. 1.4.2 Angle between vectors Recall that the geometric proof of Cauchy-Schwarz for vectors R2 has shown that for ~u, ~v 6= ~0 we have with ∠(~u, ~v ) = θ, cos θ = ~u · ~v . k~uk k~v k We may generalize this idea. For non-zero ~u, ~v ∈ Rn the Cauchy-Schwarz inequality implies ~u · ~v ≤ 1. k~uk k~v k The function θ 7→ cos θ is continuous and monotonically decreasing on [0, π] whilst cos 0 = 1 and cos π = −1. Then by the intermediate value theorem there is a unique θ ∈ [0, π] c 2018, M. Koster 17 Section 1.4 Mathematics 2 Reader such that cos θ = ~u · ~v . k~uk k~v k We can now extend the denition of the angle between vectors to the general space Rn on the basis of the Cauchy-Schwarz inequality: Angle between vectors Let ~u, ~v ∈ Rn . The angle ∠(~u, ~v ) between ~u en ~v is dened as the number θ ∈ [0, π] for which ~u · ~v . cos θ = k~ukk~v k 2 2 Example: Calculate the angle between the vectors and . Consider Figure 0 2 y 1.9 below. We immediately see that θ = 41 π . With help of the formula Θ O Figure 1.9: cos θ = x Determining angle θ. 2 2 · 0 2 4 1√ =√ √ 2. = 2 2 2 22 + 22 · 22 + 02 0 2 So: θ = 14 π. 1.4.3 Perpendicular vectors From the denition of the angle between vectors we conclude that two non-zero vectors ~u, ~v make an angle of 21 π when ~u · ~v = 0. In such case we call these vectors perpendicular or also orthogonal. Perpendicular The two vectors ~u, ~v ∈ Rn are perpendicular if ~u · ~v = 0. Notation: ~u ⊥ ~v . By introducing inner-products and norms we may generalize Pythagoras' Theorem to the general space Rn : c 2018, M. Koster 18 Section 1.5 Mathematics 2 Reader Pythagoras' Theorem for Rn If ~u ⊥ ~v then k~u + ~v k2 = k~uk2 + k~v k2 . Proof: Suppose that ~u ⊥ ~v , or ~u · ~v = 0. We deduce that k~u + ~v k2 = k~uk2 + 2~u · ~v + k~v k2 = k~uk2 + 2 · 0 + k~v k2 = k~uk2 + k~v k2 . 1.5 Pro jection Let B be a given point and choose point A on the line ` with given direction vector d~ 6= ~0. We aim to nd the shortest distance from B to ` in terms of vector properties. Like Figure 1.10 shows this problem reduces to nding the length of the perpendicular line −−→ segment P B , which equals the length of vector P B . For a given point A on ` the two −→ other vectors in the right-angle triangle ∆AP B are given by AP and the hypothenusa −→ −→ −→ ~v = AB . Vector AP is called the projection of AB on the line `. B vÓ Projd HvÓ L A Figure 1.10: d l P Orthogonal projection of B on `. For simplicity we will assume that A is the origin, so that ~v and d~ are vectors in standard position. In particular, the line ` is given by ` : ~x = td~. Then there is also a t ∈ R such −→ that AP is given by td~, because this one is in the extension of d~. We determine now t ~ . It holds that such that d~ ⊥ (~v − td) ~ ~ ⇔ d~ · (~v − td) ~ = 0 ⇔ d~ · ~v − td~ · d~ = 0 ⇔ t = ~v · d . d~ ⊥ (~v − td) d~ · d~ Recall that d~ 6= ~0 so that d~ · d~ 6= 0. Hence we get −→ ~v · d~ ~ AP = td~ = d d~ · d~ and the sought-after distance is given by d(B, `) = ~v − c 2018, M. Koster ~v · d~ ~ d . d~ · d~ 19 Section 1.5 Mathematics 2 Reader Projection The orthogonal projection of vector ~v on ~u is the vector in the extension of ~u given by Proj~u (~v ) = Let θ be the angle between ~u and ~v . Then Proj~u (~v ) = ~v · ~u ~u. ~u · ~u ~v · ~u k~uk k~v k cos θ ~u ~u = ~u = k~v k cos θ . 2 ~u · ~u k~uk k~uk ~u is the normalisation of ~u which has therefore length 1, and so k~uk The vector kProj~u (~v )k = k~v k cos θ ~u ~u = |k~v k cos θ| = k~v k |cos θ| . k~uk k~uk Now we obtained the following property: Property For θ = ∠(~u, ~v ) we have kProj~u (~v )k = k~v k cos θ. Because | cos θ| ≤ 1, we conclude that projection can shorten the length of a vector, but it can never increase its length. Property kProj~u (~v )k ≤ k~v k. We will apply this property now to nd the area of a triangle ∆ABC . Method 1: Area (∆ABC) = 1 −→ AB 2 −→ AC sin θ (recall that sin (π − θ) = sin θ) with −→ −→ AB · AC cos θ = −→ −→ en sin2 θ + cos2 θ = 1, sin θ ≥ 0. AB AC Method 2: 1 −→ Area (∆ABC) = AB 2 c 2018, M. Koster −→ −→ − → AC − ProjAB AC 20 Section 1.6 1.6 Mathematics 2 Reader Exercises: Vectors and length Exercise 1 Let ~u = (2, −2, 3), ~v = (1, −3, 4), w ~ = (3, 6, −4). Evaluate the following expressions: (a) k~u + ~v k (b) k~uk + k~v k (c) k − 2~uk + 2k~uk (d) k3~u − 4~v + wk ~ (e) 1 w ~ kwk ~ (f) k 1 wk ~ kwk ~ Exercise 2 (a) (b) 3 −1 Let ~u = and ~v = . Can you tell whether the angle between ~u and ~v is 0 1 acute, obtuse, or right? Determine the angle. 2 1 Let ~u = and ~v = . Can you tell whether the angle between ~u and ~v −1 −2 is acute, obtuse, or right? Determine the angle. Exercise 3 (a) (b) (c) Calculate the distance between the points (3, −2) and (4, 6). −2 −1 Calculate the angle between the vectors ~u = 1 and ~v = 2 . −1 1 −1 3 2 and ~v = −1 . Calculate the angle between the vectors ~u = −3 1 −4 −1 c 2018, M. Koster 21 Section 1.6 Mathematics 2 Reader Exercise 4 Let~u, w, ~ ~z be vectors in Rn with n > 1 and k ∈ R a scalar. In any of the expressions below there is something wrong. Do you have any idea what is actually the mistake? (a) ~u · (~v · w) ~ (b) (~u · ~v ) + w ~ (c) k · (~u + ~v ) Exercise 5 Let p~ = 2 k 3 and ~q = . Find k such that 5 (a) p~ and ~q are parallel (b) p~ and ~q are orthogonal (c) the angle between p~ and ~q equals 13 π (d) the angle between p~ and ~q equals 14 π Exercise 6 Find the angle between a diagonal of a cube and one of its adjacent ribs. Exercise 7 A cube has 4 diagonals. Show that no pair of these diagonals are perpendicular. Exercise 8 Calculate the area of the triangle with vertices A = (1, −1) , B = (2, 2) , and C = (4, 0) . Exercise 9 Determine the area of the triangle with vertices A = (3, −1, 4) , B = (4, −2, 6) , and C = (5, 0, 2) . c 2018, M. Koster 22 Section 1.6 Mathematics 2 Reader Exercise 10 (a) Show that k~u + ~v k = k~u − ~v k if and only if ~u and ~v are perpendicular. (b) Sketch ~u, ~v , ~u + ~v , and ~u − ~v in R2 and use the former exercise to arive at some general result about parallelograms. Exercise 11 (a) Prove that ~u + ~v and ~u − ~v are perpendicular in Rn if and only if k~uk = k~v k. (b) Sketch ~u, ~v , ~u +~v , en ~u −~v in R2 and use the former exercise to show a general result about parallelograms. Exercise 12 Let ~a and ~b be vectors such that k~ak = 1, k~bk = 1, and k~a + ~bk = 1. Denote the angle between ~a and ~b by θ. Then it holds (a) θ = π6 (b) θ = π4 (c) θ = π3 (d) θ = 2π 3 Exercise 13 Suppose V is a regular pentagon, i.e., the edges have the same length and the angles between these are all equal. Denote this angle by γ , then its value is (a) γ = π5 (b) γ = 2π 5 (c) γ = 3π 5 (d) γ = 4π 5 c 2018, M. Koster 23 Section 1.6 Mathematics 2 Reader Exercise 14 Consider vectors ~a, ~b, en ~c in R3 for which ~a · ~b = ~b · ~c. Then it holds that (a) ~a = ~c, (b) ~a k ~c (that is, ~a and ~c are on the same line), (c) ~a ⊥ ~c (that is, ~a and ~c are perpendicular), (d) (~a − ~c) ⊥ ~b. Exercise 15 Consider two perpendicular vectors ~a and ~b in R3 . How many unit vectors are perpendicular to ~a as well as ~b? (a) 0 (b) 1 (c) 2 (d) innitely many. Exercise 16 Draw the standard coordinate axes and the coordinate system spanned by the axes formed by ~u and ~v and write w ~ as lineare combination of ~u and ~v : 1 1 2 (a) ~u = , ~v = ,w ~= −1 1 6 −2 2 2 (b) ~u = , ~v = ,w ~= 3 1 9 Exercise 17 Find the components of the vectors ~v , ~u, ~u + ~v , ~u − ~v with ~u and ~v as depicted in Figure 1.11 c 2018, M. Koster 24 Opgave 1.16 Vind de componenten van de vectoren ~v , ~u, ~u + ~v , ~u − ~v met ~u en ~v als in Figuur 1.11 Section 1.6 Mathematics 2 Reader y 1 u 0 60 0 30 0 1 x v Figure for Exercise 17. Figuur 1.11: Figuur bij opgave 1.16. Figure 1.11: Opgave 1.17 In Figuur 1.12 is een regelmatige zeshoek weergegeven gecentreerd om de oorsprong, en Exercise met 18 hoekpunten A, B, C, D, E, en F . Druk ieder van de volgende vectoren uit in termen −→ ~ −−→ van ~a = OA en b = OB : In Figure 1.12 you see a regular hexagon, centered around the origin, and with vertices −→ −→ (a) AB and F . Express each of the following vectors in terms of ~ A, B, C, D, E, a = OA and −→ ~b = − −→ OB(b) : − BC −→ −−→ −−→ −−→ −→ (a) AB (b) BC (c) AD (d) CF (c) AD Hoofdstuk 1.2 −→ −→ (d) CF (e) AC Wiskunde 2 Dictaat −−→ −−→ −→ (f) BC + DE + F A (e) −→ AC (f) −−→ −−→ −→ BC + DE + F A C B D A p 23 c 2014, M. Koster E Figure 1.12: F The regular hexagon for Exercise 18. Figuur 1.12: De regelmatige zeshoek voor opgave 1.17. Opgave 1.18 Teken de standaard coördinatenassen alsmede de assen opgespannen door ~u en ~v en schrijf w ~ als lineaire combinatie van ~u en ~v : 25 1 1 2 (a) ~u = , ~v = ,w ~= −1 1 6 −2 2 2 (b) ~u = , ~v = ,w ~= 3 1 9 c 2018, M. Koster Section 1.6 Mathematics 2 Reader Exercise 19 Find the projection of ~v onto ~u, Proj~u (~v ) where 1 2 −1 −3 ~u = 1 , and, ~v = −1 −1 −2 Exercise 20 Show that the inequality kProj~u (~v )k ≤ k~v k is equivalent with the Cauchy-Schwarz inequality. c 2018, M. Koster 26 Chapter 2 Lines, planes, distances 2.1 Lines The general equation of a line in R2 is ax + by = c where at least one of the constants a and b should benon-zero. a x Using ~n = and ~x = we can rewrite this equation as ~n ·~x = c. This description b y of the line ` is called the normal equation. x 2 Example: 2x + y = 0 For ~x = and ~n = we may write y 1 2 x 2x + y = 0 = · = ~n · ~x = 0. 1 y 2 Hence the correponding normal equation is given by ~n · ~x = · ~x = 0. Then it follows 1 that ~n ⊥ ~x for all vectors ~x showing points on the line. This vector ~n is called the normal vector of the line. 1 1 1 2 −2 2 , , are all on one line. Notice that these vectors For example , , 1 −1 −2 −4 1 ~ are all scalar multiples of the vector d = . This holds more generally: all vectors −2 ~x of type td~, with t ∈ R are on the line because 2 1 ~n · ~x = ~n · td~ = t~n · d~ = t · = t (2 − 2) = 0. 1 −2 We call • ~n · ~x = 0 the normal equation of the line through the origin, and • ~x = td~ is the vector representation of a line through the origin. 27 Section 2.1 Mathematics 2 Reader Example Consider the line` : 2x + y = 5 and let p~ be avector designating a terminal point on `, 0 2 for example p~ = . The normal ~n = of ` is perpendicular to ~x − p~ when ~x is 5 1 showing a point at `, namely 2 2 0 · ~x − · = 2x + y − (2 · 0 + 1 · 5) = 2x + y − 5 = 0. 1 1 5 / The line ` : ax + by = c (general form) be written as ~n · (~x − p~) = 0 or ~n · ~x = ~n · p~ can a x (normal equation), whereby ~n = , ~x = and p~ verify ~n · p~ = c. b y ~ t ∈ R with d·~ ~ n = 0, then this gives the vector representation Write ~x −~ p = td~ or ~x = p~ +td, of the line ` 1 1 ~x = p~ + td~ = +t . 3 −2 The vector p~ is called support vector for `, and d~ the direction vector for `. Example: For ~n = 2 , d~ = 1 1 1 , p~ = the vector representation for line ` is given by −2 3 1 1 ~ ` : p~ + td = +t . 3 −2 When we split the components of this representation we get x=1+t y = 3 − 2t This is called the parameter representation for the line with parameter t. For a line we need just one parameter to describe it. We also say that a line is one-dimensional and later in this course we'll return to this observation. / The vector representation and its parametric form for a line ` are not uniquely determined, but the direction vectors must be scalar multiples of each other. Example: Suppose we are given the following parametric representation for the line `: x = 4 + 2t y = 5 − 3t Question: can we nd the corresponding normalrepresentation for `? 2 Solution: A direction vector of the line is d~ = −3 . Then we may take as normal for c 2018, M. Koster 28 Section 2.2 Mathematics 2 Reader −3 4 ∗ ~ ~ the line ~n = since for this candidate we have ~n ⊥ d. Now take x = on the 2 5 line corresponding to t = 0. Then a normal equation of ` is given by ~n ·~x = ~n · x~∗ = −2. / 2.2 Planes in R3 The general or standard equation of a plane V in R3 is given by V : ax + by + cz = d. Observe the following: 0 1) For a plane through ~0 we must have 0 ∈ V so that d = a · 0 + b · 0 + c · 0 = 0. 0 Then a x ax + by + cz = 0 ⇔ ~n · ~x = 0 with ~n = b , ~x = y . c z Again, similar to the case of a line, this is called the normal equation for V . Then ~x ∈ V ⇔ ~n · ~x = 0 ⇐⇒ ~n ⊥ ~x. This means that a vector belongs to the plane V if and only if it is perpendicular to the normal vector. 2) Suppose the general case with arbitrary d ∈ R, i.e., V : ax + by + cz = d. Take p~ ∈ V so that ~n · p~ = d. Then ~x ∈ V if and only if ~n · p~ − ~n · ~x = d − d = 0. By collecting terms we get ~x ∈ V if and only if ~n · (~x − p~) = 0. So the dierence of two vectors in the plane is perpendicular to the normal of the plane. Normal equation for a plane The equation ~n · ~x = ~n · p~ is called a normal equation for the plane V . Example Let V ⊂ R3 be given by V : x + 2y+ 3z= 4. Find a normal equation for V. 1 Solution: Take as normal vector for V ~n = 2 . There are many possible normal 3 vectors, but it needs to be a multiple of this vector. Now take an arbitrary vector in c 2018, M. Koster 29 Section 2.2 Mathematics 2 Reader 1 4 0 0 , or p~ = 0 , p~ = 2 . Then with V, p~ = 1 0 0 1 1 2 · ~x − 0 = 0 3 1 we are done. To see this, check that 1 1 1 x−1 2 · ~x − 0 = 0 ⇐⇒ 2 · y = 0 3 1 3 z−1 and which is equivalent to (x − 1) + 2y + 3 (z − 1) = 0 ⇐⇒ x + 2y + 3z = 4. / Vector representation for V The vector reprentation for V aims at expressing each of its members ~x as the sum of a supporting vector p~ and a linear combination of two others, i.e., V : ~x = p~ + t~a + s~b. Parameter representation for V : In the parameter representation we see the vector representation worked out in the 3 coördinates: x1 = p1 + ta1 + sb1 x2 = p2 + ta2 + sb2 x3 = p3 + ta3 + sb3 Example: Let V be the plane given by the standard equation V : x + 2y + 3z = 4. The corresponding vector representation is found as follows. Try to nd non-zero vectors ~a, ~b not scalar multiples of each other - and perpendicular to ~n. For example 1 −3 −2 ~n = 2 , ~a = 0 , ~b = 1 3 1 0 Then 1 −3 −2 ~x = 0 + t 0 + s 1 1 1 0 is a vector representation for V. c 2018, M. Koster / 30 Section 2.2 Mathematics 2 Reader 2 1 0 -1 4 2 0 -2 -4 -2 Figure 2.1: 0 2 Example normal equation. Example Let P, Q, and R be points in R3 , not all on the same line. Then the vector representation for the plane through P, Q, and R is given by: ~x = p~ + t (~q − p~) + s (~q − ~r) , ~ , ~q = OQ, ~ and ~r = OR ~ . Since the line through Q and R lies in the plane, with p~ = OP and therefore its direction vector ~q − p~. Similarly, the line through Q and R lies in the plane, with direction vector ~q − ~r. Now these lines do not coincide, by assumption, so ~q − p~ and ~q − ~r are not multiples of each other. / In summary, lines and planes in R2 , R3 can be characterized using dierent representations: normal form Line in R 2 Line in R3 ~n · ~x = ~n · p~ ~n1 · ~x = ~n1 · p~ ~n2 · ~x = ~n2 · p~ Plane in R3 ~n · ~x = ~n · p~ general form vector form ax + by = c ~x = p~ + td~ ~x = p~ + td~ a1 x + b1 y + c1 z = d1 a2 x + b2 y + c2 z = d2 ax + by + cz = d ~x = p~ + s~u + t~v parameter form x = p1 + td1 y = p2 + td2 x = p1 + td1 y = p2 + td2 z = p3 + td3 x = p1 + su1 + tv1 y = p2 + su2 + tv2 z = p3 + su3 + tv3 Later in the course we will see that in general linear mathematical structures like lines and planes allow for similar representations. It will be the challenge of nding ecient c 2018, M. Koster 31 Section 2.3 Mathematics 2 Reader descriptions, in order to minimize the number of parameters in the vector representations. Important here is to notice that for lines in R3 we need 1 parameter to describe its elements, and for planes we need 2 parameters. And, that we cannot describe these with less parameters. 2.3 Applications: calculation of distances 2.3.1 Calculating the distance from a point B to a line ` using the vector representation We will discuss how to calculate the distance if we know the vector representation for the line `, i.e., ` : ~x = p~ + td~ for some known support vector p~ and direction vector d~. First choose a point A on `. The distance now follows by carrying out the following steps: B −→ 1. ~v = AB 2. Projd~ (~v ) = d~ · ~v ~ d d~ · d~ 3. d (B, `) = ~v − Projd~ (~v ) vÓ A d l Projd HvÓ L Calculating thedistance from a point B to a line ` using the general equation Suppose ~x = x y ∈ ` if and only if ax + by = c. If B is given by the coordinates (x0 , y0 ) −→ x0 − x 1 rst. Then en A by (x1 , y1 ) then determine AB = y0 − y1 a x0 − x1 · −→ y0 − y1 b ax0 + by0 − c a a Proj~n AB = = b b a2 + b 2 a a · b b And so 2.3.2 −→ |ax0 + by0 − c| √ d (B, `) = Proj~n AB = a2 + b 2 Calculating the distance between two parallel lines The distance between two parallel lines can be calculated by picking an arbitrary point B on one of these lines and calculate its distance to the other line. 2.3.3 Calculating the distance from a point to a plane V in R3 Let B (x0 , y0 , z0 ) ∈ R3 and suppose the plane V ∈ R3 is given in standard form by V : ax + by + cz = d . The distance from B to V is calculated as follows: c 2018, M. Koster 32 Section 2.3 Mathematics 2 Reader 1. Take a point A (x1 , y1 , z1 ) on V x0 − x1 2. Create the vector ~v = y0 − y1 which points at B from A. z0 − z1 3. Determine the projection of this vector on the normal ~n of V : Proj~n (~v ) = ~n · ~v ~n ~n · ~n 4. The requested distance now is d (B, V ) = kProj~n (~v )k . So the distance from B to V is given by d (B, V ) = a x0 − x1 b · y0 − y1 a a c z0 − z1 b = (ax0 + by0 + cz0 ) − (ax1 + by1 + cz1 ) b a2 + b 2 + c 2 a2 + b 2 + c 2 c c a |(ax0 + by0 + cz0 ) − d| |(ax0 + by0 + cz0 ) − d| √ b = = 2 2 2 a +b +c a2 + b 2 + c 2 c 2.3.4 Distance between two parallel planes The distance between two parallel planes can be calculated by choosing an arbitrary point B on one plane, and determine its distance to the other plane. Example: Calculuate the distance from O (0, 0, 0) V : x + 2y + 3z = 4. to the plane V given in standard form by Solution: A normal vector for this plane is given by 1 ~nV = 2 3 and we have 1. A (1, 0, 1) ∈ V −1 −→ 2. ~v = AO = 0 −1 c 2018, M. Koster 33 Section 2.4 Mathematics 2 Reader −1 0 1 1 1 4 ~n · ~v 2 3 −1 3. Proj~n (~v ) = ~n = 2 = − 2 = − 2 1 1 ~n · ~n 14 7 3 3 3 2 · 2 3 3 1 1 2√ 2 2√ 2 2 2 2 = 1 + 22 + 32 = 14. 4. d (O, V ) = − = 7 7 7 7 3 3 1 2 · 2.4 Outer product For ~a, ~b ∈ R3 we dene their cross product, or outer product by a1 b1 a2 b 3 − a3 b 2 ~a × ~b = a2 × b2 = a3 b1 − a1 b3 . a3 b3 a1 b2 − a2 b1 The outer product determines vectors - contrasting the inner product of two vectors, which yields a number. Example Determine the outer products for standard unit vectors ~e1 , ~e2 ∈ R3 : 1 0 0−0 ~e1 × ~e2 = 0 × 1 = 0 − 0 = ~e3 0 0 1−0 0 1 0−0 ~e2 × ~e1 = 1 × 0 = 0 − 0 = −~e3 . 0 0 0−1 We conclude that the outer product has an orientation, i.e., the operation is not commutative, namely ~e1 × ~e2 6= ~e2 × ~e3 . / In general the following properties hold for the outer product: 1. ~a × ~b = −~b × ~a 2. ~a × ~a = ~0 ~ ~ 3. (c~a) × b = c ~a × b 4. ~a × ~b + ~c = ~a × ~b + ~a × ~c c 2018, M. Koster 34 Section 2.4 Mathematics 2 Reader 5. ~a · ~b × ~c = ~a × ~b · ~c Consequence: ~a ⊥ ~a × ~b en ~b ⊥ ~a × ~b. Proof: ~a · ~a × ~b = (~a × ~a) · ~b = ~0 · ~b = 0. This property is very useful when we are given two vectors ~a, ~b ∈ R3 and we are looking for a third one, perpendicular to both ~a and ~b. Then we just need to calculate ~a ×~b which has the desired properties. Below you will nd a visualization which may be of use to understand the outer product. The outer product follows the corkscrew rule : The direction of the outer product ~a × ~b is equal to the direction in which the corkscrew moves by rotating over angle θ from ~a to ~b. Figure 2.2: Example: A plane in R3 with vector representation ~x = p~ + t~a + s~b has ~n = ~a × ~b as normal vector and so the normal equation is given by ~n · ~x = ~n · p~. In turn, it is not hard to write down the standard equation of that plane. / Remark! The outer product, or the cross product, with all its properties cannot be generalized to R4 or higher dimensional spaces, beware! Calculating the distance between two crossing lines Crossing lines in R3 are non-parallel lines that do not intersect nor coincide. In particular the lines are not in the same plane (why?). Now suppose m en ` are crossing lines given by ` : ~x = p~ + t~b, ` goes through P, m : ~x = ~q + s~a, m goes through Q. 1. Determine the standard equation for the plane V where ` is in and which is parallel to m. For the normal vector ~nV it holds that it is perpendicular to both ~a and ~b. The cross product ~a × ~b species such a vector, ~nV = ~a × ~b. Then we obtain ~nV · ~x = ~nV · p~. c 2018, M. Koster 35 Section 2.4 Mathematics 2 Reader 2. Calculate the distance from Q to plane V : d (`, m) = d (Q, V ) = Proj~nV (~q − p~) = Proj~a×~b (~q − p~) . c 2018, M. Koster 36 Section 2.5 2.5 Mathematics 2 Reader Exercises: lines, planes and distances Exercise 21 Let three points in R2 be given, A, B, and C . We try to nd a point in R2 which is equidistant to each of the points A, B, and C . Such a point exists if only (a) 4ABC has three edges unequal in lenght, (b) 4ABC is isosceles, (c) 4ABC has no obtuse angle, (d) 4ABC has no angle of size π . Exercise 22 Consider a plane V ∈ R3 . Moreover suppsose that four lines are given, cutting V in several pieces and suppose that no pair of these line are parallel nor do these lines intersect in one point. What is the number of pieces of V after cutting? (a) 10 or 11 (b) 11 (c) 11 or 12 (d) 10, 11, or 12 Exercise 23 Determine the vector representation of the plane through the points P = (1, 1, 1) , Q = (4, 0, 2) , R = (0, 1, −1) . Exercise 24 Find the parametric equations and an equation in vector form for the lines R2 given by: (a) y = 3x − 1 (b) 3x + 2y = 5 c 2018, M. Koster 37 Section 2.5 Mathematics 2 Reader Exercise 25 Let ` in R3 be the line through point P = (1, −1, 1) with direction vector 2 d~ = 3 . −1 Determine for each of the following planes V whether ` and V are parallel, perpendicular or none of these. (a) V : 2x + 3y − z = 1 (b) V : 4x − y + 5z = 0 (c) V :x−y−z =3 (d) V : 4x + 6y − 2z = 0 Exercise 26 (a) Find the vector representation for the line in R2 passing through P (2, −1) which is parallel to the line with standard equation 2x − 3y = 1. (b) Same as in the former exercise, only now with perpendicular instead of parallel. Exercise 27 Find the equation describing the set of all points that are at the same distance from P = (1, 0, −2) as well as Q = (5, 2, 4). Exercise 28 Determine the distance from Q = (2, 2) to the line ` with equation x −1 1 `: = +t y 2 −1 Exercise 29 Show that the following two planes V and W are parallel, and determine the distance from V to W . V : 2x + y − 2z = 0 en W : 2x + y − 2z = 5. c 2018, M. Koster 38 Section 2.5 Mathematics 2 Reader Exercise 30 Let V be the plane given by V : x + y + 2z = 0 and let ` x= 2 + t y = 1 − 2t z= 3 + t Show that ` ∩ V 6= ∅ and nd the angle ∠ (`, V ) . Exercise 31 Consider the plane V : 4x − y − z = 6 and the line ` which is given in parametric form by t x= y = 1 + 2t z = 2 + 3t Show that ` ∩ V 6= ∅ and nd the angle ∠ (`, V ) . Exercise 32 (a) Calculate the distance between the lines 1 1 0 1 0 + s 1 , and m : ~x = 1 + t 1 . ` : ~x = −1 1 1 1 (b) Calculate the distance between the lines 6 −1 −1 `1 : ~x = 0 + t 2 and m1 : ~x = t 1 . 0 0 −1 c 2018, M. Koster 39 Section 2.5 Mathematics 2 Reader Exercise 33 1 Find the projection of ~v = 0 onto the following planes: −2 (a) W1 : x + y + z = 0 (b) W2 : 3x − y + z = 0 (c) W3 : x − 2z = 0 (d) W4 : 2x − 3y + z = 0 Exercise 34 Calculate ~u × ~v : 0 3 (a) ~u = 1 , ~v = −1 1 2 3 0 (b) ~u = −1 , ~v = 1 2 1 −1 2 (c) ~u = 2 , ~v = −4 3 −6 1 1 (d) ~u = 1 , ~v = 2 1 3 Exercise 35 Give the standard equation for the following planes: (a) (b) 0 3 The plane through P (1, 0, −2), parallel to ~u = 1 and ~v = −1 . 1 2 The plane through P (0, −1, 1), Q(2, 0, 2) and R(1, 2, −1). c 2018, M. Koster 40 Section 2.5 Mathematics 2 Reader Exercise 36 (a) Prove that k~u × ~v k2 = k~uk2 k~v k2 − (~u · ~v )2 for all ~u, ~v ∈ R3 . (b) Prove that k~u × ~v k = k~uk k~v k sin(∠(~u, ~v )) for all ~u, ~v ∈ R3 . (c) Let A be the area of the triangle which is determined by the vectors ~u and ~v in R3 which make a positive angle θ. Show that A = 21 k~u × ~v k. (d) Use the above result in order to calculate the area of the triangle with vertices A(1, 2, 1), B(2, 1, 0) and C(5, −1, 3). Exercise 37 Let two vectors ~a and ~b be given such that k~ak = 1, k~bk = 1, and ~a · ~b = − 12 . (a) Determine k~a + ~bk. (b) Determine k~a × ~bk. Exercise 38 V in vector representation is given by 2 3 1 ~x = 1 + t · 0 + s · 1 . 0 1 1 Determine a standard and a normal equation for V . c 2018, M. Koster 41