FC311E Intermediate Mathematics Vectors LEARNING OBJECTIVES Vectors After studying this theme you should be able to: • • • • • • • Understand and use vectors Add and subtract vectors and perform scalar multiplication Find the dot (or scalar) product of two vectors Find the angle between two vectors Find the cross product of two vectors Understand and use vector line equations Determine if two lines intersect Vectors ▪ In this session we will learn what is meant by a vector, how to add and subtract vectors and how to multiply a vector by a scalar (i.e. a number). We will also learn how to find the magnitude of a vector. Vectors A vector has magnitude and direction Examples: weight, force, velocity, and momentum. Drawing Vectors Magnitude (size) is shown by the length of a line A Direction is shown by an arrow. D Vectors are written as B AB CD C Vectors Vectors are parallel to each other if one is a multiple of the other F D B AB A GH EF = 2CD − AB = BA C = 3GH Vectors can be multiplied by a scalar. E Direction is the same, but scale has changed Position Vectors A position vector gives the position of a point relative to the origin, O A OA O 3 4 (3,4) 3 OA = 4 Called a column vector / component form Position Vectors A position vector gives the position of a point relative to the origin, O 3 A (3,4) OA = = a 4 OA O 3 4 A position vector is normally given by a single letter Arrow is not used but letter must be underlined to identify it as a position vector Might be in bold in textbooks Vectors If A and B have position vectors a and b respectively, AB can be written in terms of a and b A AB = −a + b AB O AB = b − a B Vectors If A and B are given by (3, -4) and (-1, 2), express AB as a column vector: 3 OA = a = − 4 − 1 OB = b = 2 − 1 3 − 4 AB = b − a = − = 2 − 4 6 3 i is the unit vector in the i x-direction 2 j 1 Y i= j is the unit vector in the y-direction 0 -1 [] 1 0 0 1 2 3 j= -1 X [] 0 1 All vectors can be expressed as a linear combination of these 2 vectors 1 0 8 e.g. =8 +5 5 [] [] [] 0 1 Vectors: Another notation Unit vectors are given by 1 i= 0 1 0 3 OA = a = = 3 − 4 0 1 − 4 = 3i − 4 j 0 j= 1 Adding & Subtracting vectors a= () 5 3 3a + 6b 2a - b ( ) = 3( ) + 6( ) = ( )+ ( ) = ( ) b= 2 −4 5 3 2 −4 15 9 12 − 24 ( )− ( ) = ( )− ( ) =2 5 3 2 −4 10 6 2 −4 27 −15 = ( ) 8 10 Two vectors are given by 𝒖 = 3 5 and 𝒗 = . Find the following: 2 −1 a) 𝒖 + 𝒗 b) 3𝒖 − 2𝒗 c) Write 𝒖 in terms of the unit vectors 𝒊 and 𝒋. Two vectors are given by 𝒖 = 3 5 and 𝒗 = . Find the following: 2 −1 a) 𝒖 + 𝒗 = 3 5 + 2 −1 b) 3𝒖 − 2𝒗 =3 = 3 5 −2 2 −1 = 8 1 9 10 − 6 −2 = c) Write 𝒖 in terms of the unit vectors 𝒊 and 𝒋. 3 𝒖= 2 3 0 = + 0 2 1 0 =3 +2 0 2 = 3𝒊 + 2𝒋 −1 8 Magnitude of a vector Magnitude is given by the length of vector A OA O 3 4 (3,4) OA = 3 + 4 2 =5 2 Magnitude of a vector If A and B are given by (3, -4) and (-1, 2), find the magnitude of AB − 1 3 OA = a = OB = b = 2 − 4 − 4 AB = b − a = 6 AB = (− 4) 2 +6 2 Vectors in 3D Vectors in 3D will have a third component 4 a = 2 3 a = 4i + 2 j + 3k k is the unit vector in the z-direction Scaling, adding and subtracting still works, but now there’s a third bit Magnitude of 3d vector To find the magnitude of a 3 dimensional vector, we extend Pythagoras’ theorem. B If C A 2 4 4 → AB = 2 3 AC 2 = 4 2 + 2 2 Magnitude of 3d vector To find the magnitude of a 3 dimensional vector, we extend Pythagoras’ theorem. B If 3 C A 4 → AB = 2 3 AC 2 = 4 2 + 2 2 AB 2 = AC 2 + CB 2 AB 2 = (4 2 + 2 2 ) + 3 2 AB = 29 Magnitude of 3d vector To find the magnitude of a 3 dimensional vector, we extend Pythagoras’ theorem. a AB = b a AB = b c AB = a + b 2 2 AB = a + b + c 2 2 2 3 Q. Find the magnitude of the vector 𝒂 = 1 5 3 Q. Find the magnitude of the vector 𝒂 = 1 5 Magnitude 𝒂 = 𝒂 = 32 + 12 + 52 = 35 Scalar Product ▪ In this session we will learn how to find the scalar product (also called the dot product) of two vectors and how to use this to find the angle between two vectors. So far we have learnt: • How to add and subtract vectors • How to find the magnitude of a vector • How to multiply a vector by a scalar (i.e. multiplying by a number) But what about multiplying vectors by each other? There are two types of vector multiplication we will learn about: The scalar product (or “dot” product) The vector product (or “cross” product) The Scalar Product or Dot product 𝑎 ⋅ 𝑏 = 𝑎 𝑏 cos 𝜃 = 𝑎1 𝑏1 + 𝑎2 𝑏2 + 𝑎3 𝑏3 Geometrically Based on distance (magnitude) and angle between vectors Algebraically Sum of the products of the components 𝑎⋅𝑏 = 𝑎 𝑏 cos 𝜃 Magnitude 𝒂 x Magnitude 𝒃 x cos(angle between them) 𝒂 𝜃 𝒃 = 𝑎1 𝑏1 + 𝑎2 𝑏2 + 𝑎3 𝑏3 Sum of product of components Perpendicular Vectors a b = 0 → a b cos = 0 If a and b are non-zero vectors, then 𝜃 = 90° cos = 0 If the angle is 90°, then a and b must be perpendicular Find an angle We can use the scalar product to find the angle between two vectors: a b = a b cos = (a1b1 + a2b2 + a3b3 ) ( a1b1 + a2b2 + a3b3 ) cos = ab 3 5 a) Find the scalar product of the vectors 𝒂 = 2 and 𝒃 = 0 . 7 −4 b) Find the angle between the vectors. 3 5 a) Find the scalar product of the vectors 𝒂 = 2 and 𝒃 = 0 . 7 −4 𝒂 ∙ 𝒃 = 3 ∙ 5 + 2 ∙ 0 + 7 ∙ −4 = 15 + 0 − 28 = −13 b) Find the angle between the vectors. 𝒂 = 32 + 22 + 72 = 62 cos 𝜃 = 𝒂∙𝒃 𝒂 𝒃 = −13 62 41 𝒃 = 52 + 02 + (−4)2 = 41 = −0.258 𝜃 = cos −1 (−0.258) = 104.9° Vector Product ▪ In this session we will learn how to find the vector product (also called the cross product) of two vectors. Vector Product Last time we learnt how to find the scalar when multiplying two vectors using the scalar product. Today we will be looking at the cross product (or vector product). Vector Product Sometimes when you multiply two vectors, you want the answer to be a vector as well. In this case you use the vector product. ഥ = 𝐹ത × 𝑟ҧ 𝑀 The resulting vector is perpendicular to both vectors. Vector Product To find the vector (cross) product, you need to use the following formula. 𝑎2 𝑏3 − 𝑎3 𝑏2 𝒂 × 𝒃 = 𝑎3 𝑏1 − 𝑎1 𝑏3 𝑎1 𝑏2 − 𝑎2 𝑏1 3 5 Find the vector (cross) product of the vectors 𝒂 = 2 and 𝒃 = 0 . 7 −4 3 5 Find the vector (cross) product of the vectors 𝒂 = 2 and 𝒃 = 0 . 7 −4 𝑎2 𝑏3 − 𝑎3 𝑏2 𝒂 × 𝒃 = 𝑎3 𝑏1 − 𝑎1 𝑏3 𝑎1 𝑏2 − 𝑎2 𝑏1 2 ∙ −4 − 7 ∙ 0 = 7 ∙ 5 − 3 ∙ (−4) 3∙0−2∙5 −8 = 47 −10 Vector Line Equations ▪ In this session we will learn how to use vectors to write the equation of a line in both 2 and 3 dimensions, and how to determine if two lines ever intersect (i.e. cross each other). y Vector line equations (any point it passes A through) a o Any parallel vector (to line) x A line can be identified by a linear combination of a position vector and a free vector y Vector line equations Any parallel vector to line a o A (any point it passes through) x A line can be identified by a linear combination of a position vector and a free vector y Vector line equations A line can be identified by a linear combination of a position vector and a free vector A b = pi + qj parallel vector to line a = xi + yj o E.g. a + b = (xi + yj) + (pi + qj) x 𝜆 is a scalar (i.e. any number) The value of 𝜆 tells us how far along the line we are. For any value of 𝜆 we will be on the line. How to write the vector equation of a line – Example 1 1. Position vector to any point on line 𝒚 = 𝒙 + 𝟐 [] 1 3 2. A free vector parallel to the line [] [] 3. linear combination of a position vector and a free vector [][] [] 2 2 2 2 x 1 2 = + 𝜆 y 3 2 Equation Scalar (any number) [] 1 3 Example 1 using a different combination of vectors 1. Position vector to any point on line 𝒚 = 𝒙 + 𝟐 [] 4 6 2. A free vector parallel to the line -3 [] -3 -3 [] -3 3. linear combination of a position vector and a free vector [][] [] x 4 -3 = +𝜆 y 6 -3 [] 4 6 How to write the vector equation of a line – Example 2 1. Position vector to any point on line [] 2 4 2. A free vector parallel to the line 4 2 3. linear combination [] of a position vector and a free vector [][] [] x = 2 +𝜆 4 y 2 4 𝒚 = 𝟏/𝟐 𝒙 + 𝟑 [] 4 2 [] 2 4 Finding the equation without a sketch [][] [] x 1 1 = + 𝜆 y 2 3 When 𝜆 = 0 [] [] x y = x=1, y=2 is a coordinate on the line. 1 2 Tells you about the gradient [] 1 3 Means go 1 right and 3 up. 𝑐ℎ𝑎𝑛𝑔𝑒 𝑖𝑛 𝑦 3 𝐺𝑟𝑎𝑑𝑖𝑒𝑛𝑡 = = =3 𝑐ℎ𝑎𝑛𝑔𝑒 𝑖𝑛 𝑥 1 Now use 𝑦 – 𝑦1 = 𝑚(𝑥 – 𝑥1) 𝑦 – 2 = 3(𝑥 – 1) 𝒚 = 𝟑𝒙 − 𝟏 a) Find a vector equation for the line 𝑦 = 2𝑥 + 3 𝑥 2 4 b) Write the equation for the line 𝑦 = +𝜇 1 6 in the form 𝑦 = 𝑚𝑥 + 𝑐 a) Find a vector equation for the line 𝑦 = 2𝑥 + 3 1 satisfied the equation. 5 1 Any vector with 𝑔𝑟𝑎𝑑𝑖𝑒𝑛𝑡 = 2 satisfied the equation. Choose . 2 𝑥 1 1 = + 𝜆 𝑦 5 2 The position vector 𝑥 2 4 b) Write the equation for the line 𝑦 = +𝜇 1 6 6 2 Point (4,1) is on line. 𝑔𝑟𝑎𝑑𝑖𝑒𝑛𝑡 = = 3 𝑦 − 1 = 3(𝑥 − 4) 𝑦 = 3𝑥 − 11 in the form 𝑦 = 𝑚𝑥 + 𝑐 In 2 dimensions, there are 3 possible relationships between two lines: They are parallel They are the same line They intersect Intersection of 2D lines in vector form For example x 1 2 = + s y 3 2 [ ][ ] [ ] and [][] [] x 6 -1 = + t y -2 4 If the lines intersect, there must be values of s and t such that they give the same value of 𝑥 and 𝑦. x 1 2 x part: 1 + 2s = 6 - t = + 1.5 y 3 2 y part: 3 + 2s = -2 + 4t x 1 + 3 Subtract x from y : 2 = -8 + 5t = y 3 3 5t = 10 t=2 4 x = 6 y Substitute: 1 + 2s = 6 - 2 2s = 3 position vector of the point of intersection s = 1.5 [] [] [] [ ] [ ][ ] [] [] Intersection of 2D lines in vector form What is the point of intersection? a = (i + 2j) + (4i - 2j) b = (2i - 6j) + (-2i + j) i coefficients : 1 + 4 = 2 − 2 j coefficients : 2 − 2 = −6 + x2 : 4 − 4 = −12 + 2 add 5 = −10 … this doesn’t work! The direction vectors: (4i - 2j) and (-2i + j) are parallel The lines are parallel so they never intersect! z Vectors for 3D lines The position vector of point A A line in 3D b a y o 3 a= 2 10 a = 3i + 2j + 10k A parallel vector 1 b = i + 2j - 4k b= 2 − 4 A linear combination of a position vector and a parallel vector x r = 3 2 10 + 1 2 − 4 z Example A line in 3D = b a y 3 2 10 + 1 2 − 4 The position vector (r) of any point on the line x r = y z r = (3i + 2j + 10k) + (i + 2j - 4k) If = 4 r = (3i + 2j + 10k) + 4 (i + 2j - 4k) r = (3i + 2j + 10k) + (4i + 8j - 16k) o r = 7i + 10j -6k x In 3 dimensions, there are 4 possible relationships between two lines: They are parallel They are the same line They intersect Or they are skew Skew lines In 3D lines that are not parallel and do not intersect are called skew lines z Don’t meet b y a x Checking if lines are parallel Check whether the direction vectors are scalar multiples of each other: 4 c = − 1 Is parallel to …. − 2 12 − 3 − 6 4 = 3 − 1 − 2 2 4 1 − 0 .5 = − 1 2 −1 − 2 − 8 4 2 = −2 − 1 4 − 2 =3c = 1/2 c = -2 c Example The lines r and s have the equations ... 2 4 r = 3 + − 1 5 3 and 4 2 s = 7 + − 2 2 3 Show they intersect and find the point of intersection Example The lines r and s have the equations ... 2 4 r = 3 + − 1 5 3 and 4 2 s = 7 + − 2 2 3 Show they intersect and find the point of intersection If the lines intersect, there must be values of and that give the position vector of the point of intersection. 2 4 4 2 3 + − 1 = 7 + − 2 5 3 2 3 x+y : 5 + 3 = 11 3 = 6 =2 Substitute x : 2 + 4x2 = 4 +2 =3 x : 2 + 4 = 4 +2 y : 3 - = 7 - 2 z : 5 + 3 = 2 +3 Check the values in the 3rd equation z : 5 + 3x2 = 2 + 3x3 11 = 11 Satisfied! Hence a point exists common to both lines Example The lines r and s have the equations ... 2 4 r = 3 + − 1 5 3 =2 and =3 4 2 s = 7 + − 2 2 3 Show they intersect and find the point of intersection Values satisfy all equations Hence a point exists common to both lines 2 4 2 8 10 Substitute r = 3 + 2 − 1 = 3 + − 2 = 1 5 3 5 6 11 The 2 lines intersect at (10, 1, 11) Skew Example 2 lines have the equations ... r = (2i + 3j + 6k) + t(4i - j + 6k) and r = (4i + 7j + 8k) + s(2i - 2j + k) Show they are skew Skew Example 2 lines have the equations ... r = (2i + 3j + 6k) + t(4i - j + 6k) and r = (4i + 7j + 8k) + s(2i - 2j + k) Show they are skew If the lines intersect, there must be values of s and t that give the position vector of the point of intersection. i : 2 + 4t = 4 +2s j : 3 - t = 7 - 2s Check the values in the 3rd equation k : 6 + 6x2 = 8 + 3 18 = 11 k : 6 + 6t = 8 + s i+j : 5 + 3t = 11 3t = 6 t=2 Substitute i : 2 + 4x2 = 4 +2s s =3 Not Satisfied! So do not intersect. Direction vectors: (4i - j + 6k) and (2i - 2j + k) are not parallel Therefore lines are skew Intersecting Lines Summary • Step 1 – Set up 3 simultaneous equations; one for x, y and z. • Step 2 – Solve a pair of your equations. • Step 3 – Put your solution into the third equation and see what happens. – If it works then they intersect and you can find the point of intersection. – If it does not work the lines are either parallel or skew. Check to see if they the direction vectors are parallel then decide. Q. Determine if the following two lines intersect, are parallel or are skew: 3 2 8 5 𝒂= 1 +𝜆 2 𝒃 = −1 + 𝜇 1 5 −3 3 7 Q. Determine if the following two lines intersect, are parallel or are skew: 3 2 8 5 𝒂= 1 +𝜆 2 𝒃 = −1 + 𝜇 1 5 −3 3 7 Setup simultaneous equations 𝟏. −𝟐. 2 = 6 + 7𝜇 Substitute 3 + 2𝜆 = 5 + 8 × − Test in 𝟑. 5−3×− Test if parallel 9 7 𝜇=− 4 7 3 + 2𝜆 = 5 + 8𝜇 1 + 2𝜆 = −1 + 𝜇 5 − 3𝜆 = 7 + 3𝜇 4 7 = 7+3×− 𝜆=− 4 7 2 8 2 is not a multiple of 1 −3 3 𝟏. 𝟐. 𝟑. 9 7 62 7 = 37 7 not true! Lines don’t intersect. so lines are not parallel => SKEW