Example 3: Direction cosines of the line through and
Find the direction cosines of the line passing through the two points and .
Let and . Direction ratios of :
Direction cosines are .
The direction cosines are .
Want the reason behind every step, the basics and the checks?
Going from to means moving , and along the three axes. These three differences are direction ratios of the line. Dividing each by the length turns them into the direction cosines.
- Given
- Two points of the line: and .
- To find
- The direction cosines of the line .
- Plan
- (1) Name the points. (2) Subtract to get direction ratios. (3) Find by the distance formula. (4) Divide. (5) Check, and look at the other direction.
Basics you need
For and , the direction cosines of are (Section 11.2.1). Lesson: direction cosines and direction ratios
: Pythagoras across the floor, then up. Basics: distance in 3D
Each point has three coordinates, one for each axis; a negative coordinate is on the negative side of that axis. Basics: three numbers fix a point
Direction cosines always satisfy . Basics: direction cosines
Solution
Name the points
Take and .
The formula is written for a first point and a second point ; the order decides the direction (from towards ). The book makes the same choice.Coordinates of a point in space. Basics: three numbers fix a pointSubtract: the direction ratios
Oblique projection, not to scale. From to in three moves parallel to the axes (dashed): 3 in , then in , then 8 in . These moves are the direction ratios of . Subtracting a negative number adds it: and . The three differences are how far you move along each axis from to , so they point along the line: they are direction ratios of (the Note in Section 11.2.1).Find the length
The distance formula squares the three differences just found, so is positive. 77 is , which has no square factor, so does not simplify.Distance formula in space. Basics: Pythagoras twiceDivide by
In the book's Fig 11.2, the right triangle has hypotenuse and the side next to the angle , so . The same argument with the other two axes gives and . In other words, dividing the direction ratios by makes the squares add up to 1.Section 11.2.1: , and so on. Lesson: direction cosinesCheck, and the other direction
Taking the line from to instead gives .
The squares adding up to 1 confirms that these are direction cosines. Swapping the two points reverses every difference, which is the same line in the opposite direction (Note in Section 11.2.1: either set of differences may be used). The book gives the direction from the first point to the second. If you prefer rationalised denominators, , and so on.
The direction cosines of the line through and are (or all three with the opposite sign, for the opposite direction).
(Textbook answer: .)
, so , , . The angles with the axes are about , and .
Walking from by times the direction cosines lands on : .
- Sign slips with negative coordinates. , not ; , not .
- Subtracting in mixed order, for example but . All three differences must be "second minus first", or all "first minus second".
- Giving the direction ratios as the answer. are direction ratios; the direction cosines are these divided by .
- Two points give direction ratios by subtraction, in the same order for all three coordinates.
- Divide by the distance between the points to get the direction cosines.
- Swapping the points flips all three signs: the same line, the other way.
Every fact used, and where it comes from
Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →