Lesson Video: Angle between Two Straight Lines in Space | Nagwa Lesson Video: Angle between Two Straight Lines in Space | Nagwa

# Lesson Video: Angle between Two Straight Lines in Space Mathematics

In this video, we will learn how to find the angle between two straight lines in three dimensions using the formula.

17:38

### Video Transcript

In this lesson, weβll learn how to find the angle between two straight lines in three dimensions. To do this, weβll use the formula for the cos of the angle between the lines which comes from the definition of the scalar or dot product. Straight lines can be defined in different ways, and weβll see how to find the angle between two lines which are defined in different forms. You should already be familiar with finding equations of straight lines in space and calculating the scalar product of two vectors.

The line shown has direction vector π and passes through the point π΄, which has coordinates π₯ one, π¦ one, π§ one. If π π₯, π¦, π§ is any point on this line and π« is the position vector of π, then the vector equation of the line can be written as π« is equal to π₯ one π’ plus π¦ one π£ plus π§ one π€ plus π times ππ’ plus ππ£ plus ππ€, where π’, π£, and π€ are the unit vectors in the π₯-, π¦-, and π§-directions and π is a scalar. Each value of π gives the position vector of one point on the line. And this is equivalent to the parametric form where π₯ is equal to π₯ one plus ππ, π¦ is equal to π¦ one plus ππ, and π§ is π§ one plus ππ. And these are both equivalent to the Cartesian form where π₯ minus π₯ one over π is π¦ minus π¦ one over π is equal to π§ minus π§ one over π.

The point with coordinates π₯ one, π¦ one, and π§ one is one of an infinite number of points on the line. The vector ππ’ plus ππ£ plus ππ€ is the direction vector π, and π, π, and π are the direction ratios. Alternatively, for a line passing through two known fixed points as in diagram two, where the coordinates of point π΄ are π₯ one, π¦ one, and π§ one and the coordinates of point π΅ are π₯ two, π¦ two, and π§ two and the line is parallel to the direction vector π β where π is π₯ two minus π₯ one π’ plus π¦ two minus π¦ one π£ plus π§ two minus π§ one π€ and the direction ratios are π₯ two minus π₯ one, π¦ two minus π¦ one, and π§ two minus π§ one β using either π΄ or π΅ as our fixed point, we can again write our line in one of the three forms previously given, that is, vector, parametric, or Cartesian form.

Now suppose we have two lines in space πΏ one and πΏ two, where πΏ one is parallel to the direction vector π one, πΏ two is parallel to the direction vector π two, and π is the angle between the two lines. We can write these two lines in vector form with the equations shown, where π« one is the position vector of any point on πΏ one and π« two is the position vector of any point on πΏ two. We can write these in the most succinct vector notation. And the most important components of these, for our purposes, are the direction vectors π one and π two. π one is the vector π one π’ plus π one π£ plus π one π€. And π two is the direction vector π two π’ plus π two π£ plus π two π€.

The reason these two direction vectors are so important is that the angle between the two lines πΏ one and πΏ two is defined as the angle between their direction vectors π one and π two. If we draw π one and π two from a common point, we can find the angle between them using the formula for their scalar product, recalling that the scalar product is the sum of the products of like-for-like coefficients of the unit vectors in each direction. And, of course, this is a scalar. And remember also that the magnitude of a vector is the square root of the sum of the squares of the unit vector coefficients so that, for example, the magnitude of π one is the square root of π one squared plus π one squared plus π one squared.

Remember, though, that what weβre looking for is π, the angle between the two lines. And if we divide both sides of our equation by the product of the magnitudes of the two vectors and swap sides, we have cos π is the scalar product of π one and π two divided by the product of the magnitudes of the two vectors. To recap then, to find the angle between two lines, we need to get our lines into a form where we can read off the direction vectors. We take the scalar product of the direction vectors, divide by the product of their magnitudes, and then take the inverse cosine of our result.

Itβs worth noting that if our lines are perpendicular, then π one dot π two is equal to zero, which, of course, means that π is 90 degrees or π by two. If our two lines are parallel on the other hand, then the scalar product is plus or minus the product of the two magnitudes. In this case, the angle is either zero or 180 degrees, depending on the directions. So letβs see how this works in practice with some examples where in our first example weβre given the direction ratios for two lines.

Determine to the nearest second the measure of the angle between the two lines that have direction ratios of negative four, negative three, negative four and negative three, negative three, negative one.

Weβre given the direction ratios of two lines. Letβs call our lines πΏ one and πΏ two. And weβre asked to find the measure of the angle between these two lines. Assuming for the moment that our direction vectors are in the positive sense to each other, then the angle between them is an acute angle. Letβs call that π. Now, recall that the direction ratios of a line, and weβre given two here, are the π₯-, π¦-, and π§-coefficients of the unit vectors π’, π£, and π€ of the direction vector of the line so that the direction vector is defined as π is equal to π₯π’ plus π¦π£ plus π§π€ where π₯, π¦, and π§ are the direction ratios.

In our case then, our direction vectors are π one is negative four π’ plus negative three π£ plus negative four π€ and π two is negative three π’ plus negative three π£ plus negative one times π€. Now, to find the angle between two lines with direction vectors π one and π two, respectively, we can use the formula cos π is the scalar product of the two direction vectors π one and π two divided by the product of the magnitudes of the two direction vectors. And remember that the scalar product of two vectors is the sum of the like-for-like products of the coefficients of the unit vectors π’, π£, and π€ of each vector, and this is a scalar. And remember that the magnitude of a vector is the square root of the sum of the squares of the coefficients of π’, π£, and π€, the unit vectors.

In the case of a direction vector of course, the coefficients of π’, π£, and π€ are the direction ratios. So in our case, our scalar product is negative four times negative three plus negative three times negative three plus negative four times negative one. That is 12 plus nine plus four, which is 25. To use our formula, we also need to find our magnitudes. Now the magnitude of π one, the first direction vector, is the square root of negative four squared plus negative three squared plus negative four squared. That is the square root of 16 plus nine plus 16, which is the square root of 41. And the magnitude of π two is the square root of negative three squared plus negative three squared plus negative one squared. Thatβs the square root of nine plus nine plus one, which is the square root of 19.

So we have the scalar product of our two direction vectors is 25. And the magnitude of π one is the square root of 41. The magnitude of π two is the square root of 19. And making some room, we can put these into our formula so that cos π is 25 over the square root of 41 times the square root of 19. Taking the inverse cos on both sides, we have π is the inverse cos of 25 over the square root of 41 times the square root of 19. And this gives us an angle of π is 26.399 and so on degrees. But weβre not quite finished yet since weβre asked for the measure of the angle between our two lines to the nearest second.

At this point, itβs important we havenβt rounded after the decimal point. We have 26 degrees, and next we find our minutes by multiplying everything after the decimal point by 60. And this gives us 23.952 etcetera minutes. Again, we donβt round after the decimal point because in order to find the seconds, we multiply everything after the decimal point again by 60 which gives us 57.126. So we have 26 degrees, 23 minutes, and 57 seconds. And our angle is acute, so we have the right directions. And so the measure of the angle between the two lines that have direction ratios of negative four, negative three, negative four and negative three, negative three, negative one to the nearest second is π is 26 degrees, 23 minutes, and 57 seconds.

In our next example, we see how to find the angle between two lines given the coordinates of two points on each line.

A straight line πΏ one passes through the two points π΄ with coordinates negative two, two, negative three and π΅ with coordinates negative six, negative four, negative five and a straight line πΏ two passes through the two points πΆ with coordinates one, four, one and π· with coordinates negative nine, negative six, negative nine. Find the measure of the angle between the two lines, giving your answer to two decimal places if necessary.

Weβre given two coordinates on each of two lines πΏ one and πΏ two, and weβre asked to find the angle between the two lines. There are a couple of ways we could do this, but weβre going to use the direction vectors of the lines. We know that if a line passes through two points π with coordinates π₯ one, π¦ one, π§ one and π with coordinates π₯ two, π¦ two, π§ two parallel to the direction vector π, then the direction vector for that line is π is equal to π₯ two minus π₯ one times π’ plus π¦ two minus π¦ one π£ plus π§ two minus π§ one π€ where π’, π£, and π€ are the unit vectors in the π₯-, π¦-, and π§-directions. And we can find the angle between two lines by using the formula cos π is the scalar product of the two direction vectors over the product of the magnitudes of the two direction vectors.

And note that the coefficients of π’, π£, and π€ in the direction vector are called the direction ratios. So to use the formula, we need to find the direction vectors of our two lines. So letβs start with our line πΏ one passing through the points π΄ with coordinates negative two, two, negative three and π΅ with coordinates negative six, negative four, negative five. Referring to our direction vector π, then we have π one is negative six minus negative two times π’ plus negative four minus two times π£ plus negative five minus negative three times π€. That is π one is negative four π’ minus six π£ minus two π€.

And now for our line πΏ two, which has point πΆ with coordinates one, four, one and π· with coordinates negative nine, negative six, negative nine, the direction vector π two is negative nine minus one π’ plus negative six minus four times π£ plus negative nine minus one times π€. That is negative 10π’ plus negative 10π£ plus negative 10π€. So making some room, we can now use our two direction vectors in our formula. The first thing we need is our scalar product, and thatβs given by the product of the coefficients of π’ plus the product of the coefficients of π£ plus the product of the coefficients of π€. And this, of course, is a scalar. So in our case, thatβs going to be negative four times negative 10 plus negative six times negative 10 plus negative two times negative 10. That is 40 plus 60 plus 20, which is 120.

Remember also that the magnitude of the vector π is the square root of π₯ squared plus π¦ squared plus π§ squared, where π₯, π¦, and π§ are the coefficients of π’, π£, and π€, the unit vectors. So for our vector π one, the magnitude of π one is the square root of negative four squared plus negative six squared plus negative two squared. That is the square root of 56. The magnitude of our direction vector π two is the square root of negative 10 squared plus negative 10 squared plus negative 10 squared. And thatβs equal to the square root of 300. And making some room now, we have everything we need to use our formula.

Substituting the scalar product π one dot π two is 120 over the magnitude of π one times the magnitude of π two. Thatβs the square root of 56 times the square root of 300. Taking the inverse cos on both sides, we have π is the inverse cos of 120 divided by the square root of 56 times the square root of 300. And using our calculators, thatβs 22.2076 and so on degrees, which to two decimal places is 22.21 degrees, so that the measure of the angle between our lines πΏ one and πΏ two which, respectively, pass through the points π΄, π΅ and πΆ, π· is 22.21 degrees.

In our next example, letβs look at how we find the angle between two lines given their Cartesian equations.

Find to the nearest second the measure of the angle between the two straight lines negative two π₯ is four π¦ is equal to negative three π§ and negative four π₯ is negative five π¦ is equal to two π§.

Weβre given two lines to find in Cartesian form. And remember, the Cartesian form of a line is π₯ minus π₯ one over π is equal to π¦ minus π¦ one over π is equal to π§ minus π§ one over π. And thatβs where the point π΄ with coordinates π₯ one, π¦ one, π§ one lies on the line and π, π, and π are the direction ratios of the direction vector π, which is parallel to the line. Letβs begin by calling our lines πΏ one and πΏ two. And by comparing the three terms in the general Cartesian form to our lines, we can determine the point on the line. But more importantly, we can find the direction ratios π, π, and π and hence the direction vector π for each line.

We can then use the formula shown to find the cosine of the angle between the two lines and take the inverse cosine to find the angle. So letβs look first at our line πΏ one. Comparing the expression in π₯ to our Cartesian form, we have negative two π₯ is π₯ minus π₯ one over π. And separating our fraction on the right-hand side, that gives us π₯ over π minus π₯ one over π. And comparing coefficients, we have negative two is equal to one over π and zero is negative π₯ one over π. From our first equation, solving for π, we have π is negative one over two. So from our second equation, this must mean that zero is π₯ one or π₯ one is equal to zero. And making some room, we have π is negative a half and π₯ one is equal to zero.

And doing the same thing for our π¦-term, we find that π is one-quarter and π¦ one is equal to zero. And finally, for our π§-terms, we find that π§ is negative a third and π§ one is equal to zero. Now, remembering that π₯ one, π¦ one, and π§ one are the coordinates of our point π΄, we have π΄ with coordinates zero, zero, zero. And remembering our direction vector is given by π is ππ’ plus ππ£ plus ππ€ so that our direction vector for the line πΏ one is π one, which is negative a half π’ plus one over four π£ plus negative one-third π€. And weβre going to call our point π΄ one to distinguish it from the point on the line πΏ two.

Now if we do the same thing for our second line πΏ two, πΏ two passes through the point π΄ two with coordinates zero, zero, zero and has direction vector π two equal to negative one over four π’ plus negative one over five π£ plus one over two π€. All we need to use in vectors are direction vectors in the formula for cos π. Weβre going to need the scalar product of our two direction vectors. And remember, thatβs the sum of the products of the coefficients of π’, π£, and π€, the unit vectors, and that the magnitude of the vector is the square root of the sum of the squares of the coefficients of π’, π£, and π€.

In our case then, the scalar product is negative a half times negative a quarter plus one-quarter times negative one-fifth plus negative one-third times one-half. That is one over eight plus negative one twentieth plus negative one over six, which is negative 11 over 120. And making some room, we next need to work out the magnitudes of our two vectors. The magnitude of π one is the square root of negative a half squared plus one-quarter squared plus negative a third squared, which evaluates to the square root of 61 over 12. And the magnitude of π two is the square root of negative a quarter squared plus negative a fifth squared plus a half squared. And this evaluates to the square root of 141 divided by 20.

So now we can put our three values into our formula. And recall that dividing by a fraction is the same as multiplying by its reciprocal. We have negative 11 times 12 times 20 in the numerator and 120 times the square root of a 61 times the square root of 141 in the denominator. We can cancel a 12 in the numerator and the denominator. And the result is 10 in the denominator with the 20 in the numerator. And this gives us the cos of the angle π is negative 22 over the square root of 61 times the square root of 141. Now making some room, if we take the inverse cos on both sides, we find in fact to three decimal places that π is 103.722 degrees. But this is an obtuse angle and our angle should be acute. So letβs take a look at our direction vectors.

In this plot of our direction vectors, we can see that the angle between them is obtuse. But when we refer to the angle between two lines, we mean the angle sandwiched between the positive senses of both vectors. But our vectors are in opposite directions. Hence, the angle we found is the larger of the two. And in fact, itβs the smaller acute angle that we want. The angle we found corresponds to the π½ in this diagram. And the angle we want is πΌ which is 180 minus π½. In our case, that corresponds to 180 minus 103.722 and so on. That is 76.278 and so on degrees.

Weβre not quite finished yet, however, since we want the measure of the angle to the nearest second. Multiplying successively after the decimal place by 60, we have 76 degrees, 16 minutes, and 39 seconds. So to the nearest second, the angle between the two lines 76 degrees, 16 minutes, and 39 seconds.

Letβs complete this video by reminding ourselves of some of the key points. If we find the direction vectors of two lines in space, we can use these direction vectors in the formula to find the angle between them. But remember, we want to find the acute angle between the positive senses of both lines.