MATH 2050 4.1 4.1 - Vectors and Lines Page 4.01 Vectors and Lines Scalar quantities are defined by just one number. Examples of scalars are time, length, electric charge, speed, mass and density. If a quantity requires information on magnitude and direction, then it is a vector. Examples of vectors are displacement, velocity, magnetic intensity and force. Two vectors are equal if and only if they have equal magnitudes and the same directions. Example 4.1.1 Points A, B, C, D are in the xy-plane as shown. AB is the geometric vector from A to B. A is the tail and B is the tip of vector AB . CD is the geometric vector from C to D. But both geometric vectors represent the same displacement (3 units left and 4 up). 3 They are both representations of the same underlying vector a . 4 The length (or magnitude or norm) of a vector a is a . In this example, AB CD a and a AB CD 32 42 9 16 25 5 . A geometric vector may be placed anywhere in space. x The position vector of point P (x, y, z) is OP y , z where O is the origin (0,0,0). MATH 2050 4.1 - Vectors and Lines Page 4.02 Some properties of vectors Equality: x1 x2 y y if and only if (x = x and y = y and z = z ); 1 2 1 2 1 2 1 2 z1 z2 Length (or “norm”): x v y v z v0 x2 y 2 z 2 v 0 (and the direction of v 0 is undefined) If u 1 then u is a unit vector (often written as û ) The unique unit vector in the same direction as a non-zero vector v is vˆ For any scalar a and any vector v, In particular, v 1 v av a 1 v v . v v v Two non-zero vectors u, v are parallel iff one of them is a non-zero scalar multiple a of the other. They point in the same direction if a > 0, in opposite directions if a < 0. Parallelogram Law Vectors can be added “tip to tail”: AB BC AC Consider the vectors in this parallelogram. BC has the same length and is in the same direction as v AD . Therefore BC v . The diagonal vector AC that shares the same tail as both vectors u AB and v AD is clearly the sum u v AB AD AB BC AC . The other diagonal is BD BA AD AB AD u v v u The diagram also illustrates the fact that vector addition is commutative: AC AB BC AD DC BC AB uvvu MATH 2050 4.1 - Vectors and Lines Page 4.03 x 2 x1 For any two points P1(x1, y1, z1) and P2(x2, y2, z2), P1 P2 y 2 y 1 z 2 z1 and d P1 P2 x x1 y 2 y 1 z 2 z 1 2 2 2 2 Example 4.1.2 Find the vector from point A(5, 1, –4) to point B(–3, 10, 8), find the distance d between these two points, find the unit vector v̂ in the direction AB and find the coordinates of the point P three quarters of the way from A to B . 3 5 AB 10 1 8 4 d AB 8 9 and 12 8 2 92 122 64 81 144 d = 17 AB 1 T vˆ 8 9 12 17 AB 6 8 3 3 AP AB 9 27 4 4 4 9 12 1 5 6 27 OP OA AP 1 4 31 4 5 4 9 Therefore P is at (–1, 7.75, 5). 289 MATH 2050 4.1 - Vectors and Lines Page 4.04 More generally, if we wish to find a point P that divides a line segment AB in the ratio r : s, we can proceed as follows. AP r PB s and AP s AP s r AP PB AB r PB r AB AP r AB AP r AB rs Vectors AP, AB are parallel r AP AB rs But AB AO OB OB OA and OP OA AP r r r sr OP OA OB OA OB OA rs rs rs Therefore the position vector of P is s r OP OA OB rs rs OP At the midpoint M : r = s = 1 and In Example 4.1.2, OA 5 1 4 T 1 OA OB 2 , OB 3 10 8 , r 3 and s 1 1 3 5 4 1 1 3 OP 10 1 31 31 4 4 4 4 4 8 4 16 T MATH 2050 4.1 - Vectors and Lines Page 4.05 Vector Equation of a Line A line needs two vectors to define it: the position of a point known to be on the line and the orientation of the line in space. Let d be a vector parallel to the line L . [ d must be a non-zero vector.] To get from the origin O to a general point P on the line, we follow vectors via a point Po known to be on the line. OP OPo Po P But any vector along the line L is parallel to d Po P t d , for some value of the scalar t . As the value of the parameter t varies along the entire range of the real numbers, so the point P sweeps along the entire length of the line L . The vector parametric equation of the line is therefore p po t d , t where p o is the position vector of a point Po known to be on the line and d is a non-zero vector parallel to the line. This single vector equation generates three Cartesian equations. The line through Po xo , yo , zo with direction vector d a b c defined by x xo ta y yo tb , z zo tc T 0 is also t A point P(x, y, z) is on this line if and only if a scalar t exists that satisfies all three equations simultaneously. MATH 2050 4.1 - Vectors and Lines Page 4.06 Example 4.1.3 Find the equations of the line that passes through the points A(1,3,5) and B(2,6,9). Either of the points A or B may be taken as the point Po that is known to be on the line. T Set po 1 3 5 . Vector AB is certainly parallel to the line. 2 1 1 Set d AB 6 3 3 . 9 5 4 The vector parametric equation of the line is 1 1 p 3 t 3 5 4 , t . The corresponding Cartesian parametric equations are x = 1 + t , y = 3 + 3 t, z = 5 + 4 t . By making t the subject of all three equations, we arrive at the Cartesian symmetric form of the equations of the line: t x 1 y 3 z 5 1 3 4 Note how the elements of the line direction vector are in the denominators and the coordinates of a point on the line are in the numerator. MATH 2050 4.1 - Vectors and Lines Page 4.07 Example 4.1.4 Find the points of intersection (if any) of the pair of lines x y z T 5 2 2 and x y z T 6 2 8 t 1 1 2 T s 2 1 0 T T T At any point of intersection the x coordinates on the two lines must be the same: x = 5 + 2s = 6 + t and the y coordinates on the two lines must be the same: y = 2 + s = –2 – t and the z coordinates on the two lines must be the same: z = 2 = 8 + 2t The last equation yields t = (2 – 8) / 2 = –3 Substituting into the other two equations: 5 + 2s = 6 – 3 2s = –2 s = –1 and 2 + s = –2 + 3 s = –1 2 1 1 (or one may reduce the linear system 1 1 4 to row-echelon form.) 0 2 6 The system of equations is consistent, with the unique solution s = –1, t = –3. x = 5 + 2s = 5 – 2 = 3 , y = 2+s = 2–1 = 1, z = 2 The unique point of intersection is (x, y, z) = (3, 1, 2) . MATH 2050 4.1 - Vectors and Lines Page 4.08 Example 4.1.5 Find the points of intersection (if any) of the pair of lines x 3 s, y 1 s, z 1 s and x 2 t, y 1 t, z t Matching the coordinates at any point of intersection: x 3 s 2t y 1 s 1 t z 1 s t From the latter two equations, 1 – t = t 2t = 1 t = 1/2 s = –1/2 x = 3 + s = 3 – 1/2 = 5/2 and x = 2 – t = 2 – 1/2 = 3/2 which is inconsistent. The lines therefore do not meet anywhere. 1 1 1 Or use row operations to carry 1 1 0 to the row-echelon form 1 1 1 which is inconsistent. 1 1 1 0 1 0 , 0 0 1 The lines are not parallel (their direction vectors are [ 1 1 1 ]T and [ –1 –1 1 ]T). They are skew. MATH 2050 4.1 - Vectors and Lines Page 4.09 Example 4.1.6 (Textbook, exercises 4.1, pages 167-168, question 34) The line from a vertex of a triangle to the midpoint of the opposite side is called a median of the triangle. If the vertices of a triangle have position vectors u, v and w , show that the point on each median that is a third of the way from the midpoint to the vertex has position vector 13 u v w . Conclude that the point C with position vector 13 u v w lies on all three medians. This point C is called the centroid of the triangle. OM 12 OU OW 1 uw 2 C is one third of the way from M to V 2 1 2uw 1 1 OM OV v u v w 3 3 3 2 3 3 A corresponding result holds for the other two medians. OC For example, the position vector of the point one third of the way from the midpoint of 2 vw 1 1 side VW to vertex U is u u v w . 3 2 3 3 Therefore the point C lies on all three medians. MATH 2050 4.2 4.2 - Projections and Planes Page 4.10 Projections and Planes In section 2.2 matrix multiplication of an (mp) matrix A by a (pn) matrix B was introduced as an array of dot products of row vectors with column vectors: b1 j p b2 j C AB c ij , c ij RiC j a i1 a i 2 a ip a ik b kj k 1 b pj x1 x2 The dot product of two vectors u y1 and v y2 is similarly defined as z1 z2 u vu v T x1 y1 x2 z1 y2 x1 x2 y1 y2 z1 z2 z2 Because the dot product of two vectors is a number (a scalar), it is also known as the scalar product. Example 4.2.1 4 1 u 2 , v 2 3 2 u v u T v 4 1 2 2 3 2 2 Properties of the dot product Let u , v , w denote vectors in 3 (or 2 ) and k be any scalar. Then u v (the dot product is a real number) (the dot product is commutative) u vv u 0 v 0 v 0 (zero vector) v v v 2 (length2) k u v k u v u k v u v w u v u w (scalar multiplication) (the dot product is distributive over addition) MATH 2050 4.2 - Projections and Planes Angle between Two Vectors Let be the angle between vectors u and v . Apply the law of cosines to the triangle. BC 2 AB AC 2 AB AC cos 2 vu But vu 2 u 2 2 v 2 u 2 v 2 v cos 2 u v u v u v v u v v u u u 2 2u v u 2 v cos 2 u v uv u v cos and the angle between non-zero vectors u and v can be found from cos uv u v Recall that, for an acute angle (first quadrant), 0 2 cos 0 and for an obtuse angle (second quadrant), cos 0 2 If the dot product is negative, then the angle between the two vectors is obtuse. The vectors are pointing away (approximately) from each other. If two non-zero vectors are at right angles, then u v 0 . If u v 0 then u and v are orthogonal and either u 0 or v 0 or the angle between the vectors is 2 . Page 4.11 MATH 2050 4.2 - Projections and Planes Page 4.12 Example 4.2.2 Points A(3,0,1), B(5,1,0) and C(9,2,2) define a triangle ABC. Show that the triangle contains an obtuse angle. AB 5 1 0 AC 9 2 2 T 3 0 1 T BC 9 2 2 T 5 1 0 T T 3 0 1 T 2 1 1 6 2 1 T 4 1 2 T T The vectors with tails at point B are u BC and v BA u v 4 1 2 2 BC BA 0 the angle at B is obtuse. T 1 1 T 4 2 1 1 2 1 8 1 2 7 0 [One can quickly deduce that AB AC 0 and CB CA 0 , so that the angles at A and at C are both acute.] Example 4.2.3 Find all real numbers x such that [ x 1 2 ] T and [ x –3 –x ] T are orthogonal. x x 1 3 x 2 3 2 x x 3 x 1 2 x For orthogonality, (x + 3)(x – 1) = 0 x = –3 or x = 1. One can quickly check that [ –3 1 2 ] T and [ –3 –3 –3 ] T are orthogonal and that [ 1 1 2 ] T and [ 1 –3 1 ] T are orthogonal. MATH 2050 4.2 - Projections and Planes Page 4.13 Projections In this diagram, u QP1 is the shadow of vector v QP on the line L that passes through Q and whose line direction vector is the non-zero vector d . u QP1 is parallel to d . v u P1 P is orthogonal to d . The vector v QP has therefore been decomposed into a pair of orthogonal vectors, one parallel to the line and the other orthogonal to the line. The “shadow” vector u QP1 is the projection of v on d , denoted by u proj d v . u d u t d for some scalar t. v u d t vd d 2 v td d 0 v d td d 0 v d t d 2 vd u d , (which requires d 0 ). d 2 Another way of writing the projection, in terms of the unit vector d̂ parallel to the line, is proj d v v dˆ dˆ and the vector v projd v is orthogonal to d . MATH 2050 4.2 - Projections and Planes Page 4.14 Example 4.2.4 Express the vector v 3 4 2 as v a b , where a is parallel to T d 4 4 7 T d 4 4 7 T dˆ and b is orthogonal to d . 4 4 7 d 9 d d 16 16 49 81 9 T 3 4 4 4 1 1 1 42 4 a proj d v v dˆ dˆ 4 4 dˆ 12 16 14 4 9 9 81 2 9 7 7 7 4 14 a 4 27 7 81 56 3 4 14 1 b va 4 4 108 56 27 27 54 98 7 2 4 25 14 1 and v a b 4 52 27 27 7 44 25 1 27 52 44 a and b should be orthogonal. Checking our answers: 4 14 ab 4 27 7 25 1 52 14 100 208 308 0 27 272 44 MATH 2050 4.2 - Projections and Planes Page 4.15 Distance of a Point from a Line The distance r of a point P from the line through Q with direction vector d is clearly r PP1 v proj d v , where v QP . Example 4.2.5 Find the distance from the point P(3, –1, 4) to the line through the points Q(0, 1, 3) and R(2, 2, 7). The line direction vector is d QR d v QP 4 1 16 3 1 4 T 21 0 624 ˆ d 21 1 3 1 63 16 21 r 3 T 2 1 d d 3 T 0 1 3 T 2 1 4 T 1 T 2 1 4 21 2 1 T T 1 4 ˆ d 21 8 T 2 1 4 21 T 42 8 21 32 v proj d v T 2 8 2 1 4 21 21 P1 P v proj d v 2 7 dˆ T proj d v v dˆ dˆ 3 2 1 2 T 8 2 1 4 21 211 47 1 2209 2500 121 21 T 50 11 4830 21 T 230 3.31 21 Also the location of the nearest point P1 on the line to the point P can be found: 1 T T 29 95 OP1 OP PP1 3 1 4 47 50 11 P1 is at 16 21 , 21 , 21 . 21 MATH 2050 4.2 - Projections and Planes Page 4.16 Equations of Planes A plane, like a line, requires two vectors to define it: one vector for its orientation in space, the other p0 to fix the location of any one point Po known to be on the plane. Unlike a line, the vector that defines a plane in 3 is its normal n (any non-zero vector that is orthogonal to all vectors lying in or parallel to the plane). If and only if the point P lies in the plane, then the vector Po P is orthogonal to the plane’s normal vector n . But Po P PoO OP p p0 . Therefore the vector equation of the plane is n p p0 0 Another way to look at the equation of a plane is to note that the projections of vectors OP and OPo in the direction of the normal vector n will be equal if and only if point P is on the plane. The equation of the plane is then OP nˆ nˆ OP nˆ nˆ o nˆ p p 0 0 n p p 0 0 p nˆ p0 nˆ If the normal vector to the plane is n a b c x y z a x xo b y yo c z zo becomes a b c T or, defining a new constant d as T xo yo T 0 , then the equation of the plane zo T 0 0 d axo byo czo n p0 , the equation of a plane with normal vector n a b c T is ax by cz d 0 MATH 2050 4.2 - Projections and Planes Page 4.17 Example 4.2.6 Find the equation of the plane that is orthogonal to the line x 2 y 3 z 0 and 1 3 4 passes through the point (1, 1, 1). Any normal vector to the plane is parallel to the direction vector d of the line. T Therefore let n 1 3 4 . The plane passes through the point (1, 1, 1) T p0 1 1 1 n p0 1 3 4 Also note that n p 1 3 4 1 T x T y 1 1 z T T 1 3 4 8 1x 3 y 4 z Therefore the equation of the plane is n p n p0 or x 3y 4z 8 Example 4.2.7 Find the equation of the plane that is parallel to the plane 4x – 3y + 5z = 10 and passes through the point (3, 7, 2). The two planes are parallel their normal vectors are parallel. T Therefore let n 4 3 5 . The plane passes through the point (3, 7, 2) T p0 3 7 2 n p 0 4 3 5 T 3 7 2 T 12 21 10 1 Therefore the equation of the plane is n p n p0 or 4 x 3 y 5z 1 MATH 2050 4.2 - Projections and Planes Page 4.18 Coordinate Basis Vectors In Cartesian coordinates in 3 , the basis vectors are ˆi 1 0 0 T (or just i), a unit vector pointing along the x axis, 0 0 ˆj kˆ (or j), a unit vector pointing along the y axis and T 1 (or k), a unit vector pointing along the z axis. T 1 0 0 Any position vector p x y z can be written as p x ˆi y ˆj z kˆ . T Cross Product The normal vector to a plane is orthogonal to all vectors lying in that plane. If we know two non-parallel non-zero vectors in the plane, then any function of those vectors that results in a non-zero vector at right angles to both of them will provide a normal vector to the plane. The cross product provides such an orthogonal vector. For any two vectors u x1 and v is defined by y1 z1 T u v and v x2 ˆi ˆj x1 x2 y1 y2 kˆ z1 z2 y2 z2 T the cross product of u Expanding down column 1, y1 z2 y2 z1 x2 ˆ u v k z1 x2 z2 x1 z1 z1 y1 y2 x1 y2 x2 y1 This vector is orthogonal to both u and v. Proof for u: y1 y2 ˆ i z2 x1 x2 ˆ j z2 x1 y1 z2 y2 z1 u u v y1 z1 x2 z2 x1 z1 x1 y2 x2 y1 xyz 1 1 2 x1 x1 y2 z1 y1 z1 x2 y1 z2 x1 z1 x1 y2 z1 x2 y1 The proof for v is similar. 0 MATH 2050 4.2 - Projections and Planes Page 4.19 Equation of a Plane using the Cross Product If P, Q, R are three points in a plane, not all on the same line, then a normal vector to that plane is n PQ PR . Either of the other pairs of vectors can be used instead: In general the n2 QR QP or n3 RP RQ . magnitudes of these three cross product vectors will be different, but they will all be parallel to each other and normal to the plane. Example 4.2.8 Find the equation of the plane that passes through the points P(0, 2, 1), Q(3, 2, 4) and R(1, 5, 7). PQ 3 0 3 T and PR ˆi ˆj u v PQ PR 1 3 6 9 15 9 T 3 1 0 3 kˆ 3 6 u v T 0 3 ˆ 3 1 ˆ 3 1 ˆ i j k 3 6 3 6 0 3 3 3 5 3 T Any non-zero multiple of a normal vector is also a normal vector. T Therefore take n 3 5 3 For the vector p 0 any of OP, OQ, OR could be used. Choosing P, p0 0 2 1 T n p 0 3 5 3 and n p 3 5 3 T x y z T T 0 2 1 0 10 3 7 3x 5 y 3z Therefore the equation of the plane is n p n p0 or 3x 5 y 3z 7 T MATH 2050 4.3 4.3 - The Cross Product Page 4.20 The Cross Product Quoting from section 4.2, For any two vectors u x1 and v is defined by y1 z1 and v x2 T u v ˆi ˆj x1 x2 y1 y2 kˆ z1 z2 y2 z2 T the cross product of u From this it follows that v u is obtained from u v by interchanging columns 2 and 3 of the determinant. But this interchange introduces a change of sign. Therefore v u u v - the cross product is anti-symmetric (and therefore is not commutative). Setting v = any multiple k of u , we have k u u u k u 2k u u 0 u u 0 Therefore the cross product of any pair of parallel vectors is the zero vector. Also u 0 0 0u u v w u v u w v w u v u w u Lagrange identity: u v But u v u u v u v 2 v 1 cos 2 u 2 2 v u v 2 v cos , where is the angle between the two vectors u 2 2 2 2 cos u 2 v sin u v 2 2 2 Therefore a coordinate-free geometrical interpretation of the cross product is u v u v sin MATH 2050 4.3 - The Cross Product The scalar triple product of vectors u x1 y1 z1 T Page 4.21 , v x2 u v w det u v w , where with u, v, w as its columns. w x3 y3 z3 T is u y2 z2 T and v w is the matrix Note that the cross product has to be evaluated first. The cross product of a scalar with a vector is not defined. Therefore u v w u v w and u v w u v w . Also x1 x2 x3 u vw Proof: Expanding down column 1: x1 x2 x3 y y3 y1 y2 y3 x1 2 z2 z3 z1 z2 z3 x1 y1 z1 T y2 z2 y3 z3 y1 x2 z2 x 2 z2 y1 z1 x3 z3 x3 z3 y2 z2 y3 z3 z1 x2 y2 x 2 y2 x3 y3 x3 y3 T Geometric interpretations: The area of the parallelogram ABCD defined by vectors u, v is A = (base) (perpendicular height) u v sin Therefore A u v and it also follows that the area of triangle ABD is 12 u v . u v w MATH 2050 4.3 - The Cross Product Page 4.22 Example 4.3.1 Find the area of the triangle whose vertices are at the points P(0, 2, 1), Q(3, 2, 4) and R(1, 5, 7). and PR 1 3 6 The cross product of any two of these three vectors may be used to evaluate the area. T T Selecting u PQ 3 0 3 and v PR 1 3 6 , Repeating some of the work from Example 4.2.8: ˆi 3 1 0 3 ˆ 3 1 ˆ 3 1 ˆ u v ˆj 0 3 i j k 9 ˆi 15 ˆj 9 kˆ 3 6 3 6 0 3 kˆ 3 6 PQ 3 0 3 , QR A 12 u v T 2 12 3 3 3 3 T T 5 3 T 23 9 25 9 23 43 The scalar triple product also has a geometric interpretation. A parallelepiped is a six-sided object all six of whose faces are parallelograms, with pairs of opposite faces being congruent. It can be generated from a cube by repeated stretching and shearing parallel to the edges. The volume of any parallelepiped is the product of the area of any face and the distance from that face to the opposite face: V = Ah But the area of the base is just A u v . The height h is the magnitude of the projection of w on the normal vector to the base u v : u v u v h w V Ah u v w w u v u v u v Therefore the volume of the parallelepiped is just the magnitude of the scalar triple product of the three vectors that define it. MATH 2050 4.3 - The Cross Product Page 4.23 Example 4.3.2 Find the volume of the parallelepiped defined by the vectors u 1 0 0 v 3 1 2 T T , and w 2 3 5 . T 1 3 2 1 3 u v w 0 1 3 1 0 0 5 6 1 2 5 0 2 5 V u v w 1 1 Example 4.3.3 (Textbook, page 185, exercises 4.3, question 8) Another method to find the distance r of a point P from the line through point Po with line direction vector d : Let be the angle between vectors v Po P and d . vd v d sin But r v sin r Po P d d . However, if one wishes to find the location of the nearest point N on the line to the point P, then the projection of Po P on d is required: PP d ON OPo Po N OPo proj d Po P OPo o 2 d d