THREE DIMENSIONAL GEOMETRY
Chapter 11: Three Dimensional Geometry
Chapter 11
Three Dimensional Geometry
Big idea: to describe a straight line in space you only need two things, a point on it and a direction. Angles and distances between lines then come from calculations with those directions.
11.1 Introduction
A drone flies in a straight line from one point to another. A laser beam crosses a room. Two pipes run past each other in a building, one above the other. All of these are straight lines in space. In a flat drawing, a line needs only two coordinates. In space, every point needs three: .
In Class XI you learned the distance formula in space. The distance between and is
For example, take and . The steps are , and along the three axes, so .
A three-dimensional picture with the x, y and z axes. Two points are marked: A at (1, 1, 1) and B at (3, 3, 2). A straight segment joins them. Its length is 3.
In Chapter 10 you met vectors. Here we use vectors to study straight lines. In this chapter you will learn:
- direction cosines and direction ratios: numbers that describe which way a line points;
- the equation of a line in space, in vector form and in Cartesian form;
- the angle between two lines;
- the shortest distance between two lines, whether they are skew or parallel.
11.2 Direction Cosines and Direction Ratios of a Line
Draw a line through the origin and pick a direction along it. This directed line makes three angles with the positive -, - and -axes. Call them , and . The three numbers
are the direction cosines of the line. They say how much the line leans towards each axis. If a unit vector points along the line, then are exactly its three components.
A unit vector has length , so its components satisfy
Every set of direction cosines passes this test. If three numbers do not, they cannot be direction cosines.
Direction cosines are awkward because of the square roots. So we also use any three numbers proportional to . They are called direction ratios. If points along the line, then are direction ratios, and
and in the same way and .
- Direction cosines are unique for a directed line. Direction ratios are not: if works, so does or .
- A directed line has a direction. Reversing the direction changes the sign of every direction cosine.
Find the direction cosines of the line along . Here , so the length is . The direction cosines are .
Check: . The angles with the axes are , and .
A three-dimensional picture. An arrow starts at the origin and ends at the point (2, minus 1, 2). Dashed segments drop from the tip of the arrow to the point (2, minus 1, 0) in the floor plane, and from there to the points (2, 0, 0) on the x-axis and (0, minus 1, 0) on the y-axis.
A line makes equal angles with the three axes. Then , and gives , so . Each angle is (or for the opposite direction). A direction ratio set is .
| Direction ratios | Direction cosines | |
|---|---|---|
Each row was computed exactly. In the last two rows the square root does not simplify, so the cosines keep it.
Reverse the vector in Example 1 to . The cosines become , and the angles become , and . Each new angle is minus the old one, because .
- Find the direction cosines of the line with direction ratios .
- Find the direction cosines of the line with direction ratios . What angle does it make with the -axis?
Answers
- Length . Direction cosines .
- Length . Direction cosines . The -cosine is , so the angle with the -axis is .
11.2.1 Direction cosines of a line passing through two points
Often a line is given by two points on it, and . The vector lies along the line, and its components are the steps from to . So the direction ratios are
Divide each by the length to get the direction cosines (for the direction from to ).
Find the direction cosines of the line through and . The steps are and the length is . So the direction cosines are .
For and the steps are and . The direction cosines are . It is fine to leave in the answer.
A three-dimensional picture with two points, P at (0, 1, 2) and Q at (1, 3, 5), joined by an arrow from P to Q. A dashed staircase of three segments goes from P to Q: one step of 1 along the x direction, one step of 2 along y, one step of 3 along z.
Three points , , are collinear (on one line) exactly when and are in the same direction or opposite directions. That means their direction ratios are proportional.
Test , , . Here and . The second is exactly times the first, so the three points lie on one line.
Now test , , . Here and . They are not proportional, because the ratios , , are different. (Their cross product is , which confirms it.) So , , are not on one line.
EXERCISE 11.1
- Write the direction cosines of the -axis, the -axis and the -axis.
- Can be the direction cosines of a line? What about ? If the first can, find the three angles.
- Find the direction cosines of the line along the vector .
- Find the direction cosines of the line through and .
- A line makes an angle of with the -axis and with the -axis. Find the possible angles with the -axis and the direction cosines.
- A line has direction ratios . Find its direction cosines and the angle it makes with each axis.
- Show that the points , and are collinear.
- Lines have direction ratios and . Are they parallel? Are their direction cosines equal?
Answers
- For the -axis, direction ratios give . For the -axis, . For the -axis, . (Each makes an angle with itself and with the other two axes.)
- The first: , so yes. The angles are , and . The second: , which is not , so no.
- and the length is . The direction cosines are .
- The steps are , and . The direction cosines are .
- and , so and . The angle with the -axis is (for ) or (for ).
- , so the length is . The direction cosines are . The angles are about , and .
- and . Since , they are along the same line, so , , are collinear. ( is on the other side of from .)
- The second is times the first, so the lines are parallel. The direction cosines are and , which are opposite in sign. The lines have the same direction line but opposite directions.
11.3 Equation of a Line in Space
On a flat page, a line has the equation . In space this does not work: one equation in , , describes a surface, not a line. We need another idea.
The idea is to imagine a moving point. Start at a known point and walk in a fixed direction . After "time" , you are at . As takes every real value, forwards and backwards, you trace out the whole line. The letter is called the parameter.
The picture shows the line through with direction . The marked points are .
A three-dimensional picture of a straight line passing through four marked points. The points are at (minus 1, minus 2, 1), (1, minus 1, 2), (3, 0, 3) and (5, 1, 4). Each point is one step of the direction vector (2, 1, 1) further along the line.
There are two common ways to fix a line in space:
- a point on the line and a direction it is parallel to (Section 11.3.1);
- two points on the line (also in Section 11.3.1: the direction is the vector joining them).
11.3.1 Equation of a line through a given point and parallel to a given vector
Let a line pass through the point with position vector , and be parallel to the vector . A general point on the line has position vector . The vector lies along the line, so it is a multiple of : . Since ,
This is the vector equation of the line. Different values of give different points. gives itself.
Write the vector equation of the line through parallel to .
For the point is . Does lie on the line? We need a single that gives all three coordinates. The computer found works for , so yes. For no single works, so it is not on the line.
If the line passes through (position vector ) and (position vector ), its direction is . So
Here gives and gives . Values between and give points between and . For example gives the midpoint.
Find the vector equation of the line through and . The direction is . So . At we get , and at we get the midpoint (the computer confirmed both).
Any multiple of a direction is also a direction. The vector is times . So the same line is also . The parameter is half as large: is now at .
Derivation of cartesian form from vector form
Let the line pass through and have direction ratios . Write the general point as . The vector equation says, component by component:
Solve each for : , , . All three are equal to the same , so
This is the Cartesian form (or symmetric form). It describes the same line with no parameter. If you write direction cosines in the denominators, the line is the same, because is proportional to .
Write the line in Cartesian form. The point is and the direction ratios are . So
Write as a vector equation. Read the point from the numerators (watch the signs): gives , gives , and gives . The direction ratios are the denominators . So . Check: for the point is , and the computer confirmed it is on the line.
For the line through and the direction ratios are , or after dividing by , . The Cartesian form is
In general, the line through and is .
Division by is not allowed, so a zero in the denominator needs care. Take the line through with direction ratios . The -component never changes: for every point. We still write the form in a compact way:
This is a notation that means: , and . For example, is on this line (it is the point with ).
- Write in Cartesian form.
- Write in vector form.
Answers
11.4 Angle between Two Lines
Two lines in space may meet, or may pass each other without meeting (we call these skew lines). In both cases we can still speak of the angle between them. It is the angle between their directions. For skew lines, imagine sliding one line, without turning it, until it meets the other.
Suppose the lines are parallel to and . From the dot product, . Two lines always make two angles, and . We take the acute one (at most ), so we use the absolute value:
In terms of direction ratios and :
With direction cosines and the denominator is , so .
- Perpendicular lines: (the dot product is zero).
- Parallel lines: the direction ratios are proportional: .
Find the angle between the lines with directions and . The dot product is . So the lines are perpendicular: .
Directions and . The dot product is , and both lengths are . So and .
Two straight lines crossing at the origin in three-dimensional space. One goes along the direction (1, 1, 0), the other along (0, 1, 1). The angle between them is 60 degrees.
Find the angle between the lines and . Read the direction ratios from the denominators: and . Then and both lengths are . So and .
Take and . The dot product is , which is negative. Without the absolute value, would give . That is the angle between the vectors, but the angle between the lines is the acute one: , so .
Parallel lines have angle : for directions and the angle is , and the first is times the second.
11.5 Shortest Distance between Two Lines
Two pipes run past each other in a building. You want to join them with the shortest possible rod. Where should the rod go, and how long is it?
Take any point on the first line and any point on the second line. The distance between them depends on which points you choose. Among all such pairs there is a smallest distance. That is the shortest distance between the lines. It is measured along the segment that is perpendicular to both lines (the common perpendicular).
There are three situations. The method depends on which one you have.
| The lines are ... | Shortest distance | How to tell |
|---|---|---|
| intersecting (they meet at a point) | the same point satisfies both equations | |
| parallel | the length of a perpendicular from a point of one line to the other | direction ratios are proportional |
| skew (not parallel, never meet) | the length of the common perpendicular | directions not proportional, and the lines do not meet |
In Section 11.5.1 you will find the distance between skew lines. In Section 11.5.2 you will find the distance between parallel lines.
11.5.1 Distance between two skew lines
Let the skew lines be and . We look for the common perpendicular. A direction that is perpendicular to both and is their cross product . (It is not zero, because skew lines are not parallel.)
Join a point on the first line to a point on the second line. The vector is . The shortest distance is how much of this vector points along , because the common perpendicular is parallel to . That is the length of the projection of on :
Find the shortest distance between and .
- The directions are not proportional, so the lines are not parallel.
- , and .
- , so .
- .
The computer also found the two feet of the common perpendicular, by solving for the closest points: they are on the first line () and on the second line (). The segment is perpendicular to both directions (both dot products are ), and its length is , the same as the formula gave.
Two skew lines in three-dimensional space, one in teal and one in orange, that pass each other without meeting. A short dashed segment joins the point (2, 1, 3) on the first line to the point (3, 2, 1) on the second. This segment is the shortest connection and is perpendicular to both lines.
When , the shortest distance is . The two lines and the connecting vector lie in one plane (they are coplanar), so the lines intersect (or are parallel). Example: and . The triple product is , so . They meet at (found for , ).
Cartesian form
Suppose the lines are given as and . Then , and the cross product is . The top of the fraction is a determinant:
Find the shortest distance between and .
- Points: and , so . Directions: and .
- The determinant is .
- The cross product is , and the sum of squares of its components is .
- .
The determinant is not zero, and the directions are not proportional, so the lines are skew and this distance is correct.
11.5.2 Distance between parallel lines
Let the lines be and . They have the same direction . The distance between two parallel lines is the same everywhere. It is the length of the perpendicular from any point of one line to the other line.
Take on the first line and on the second, and let . The vectors and make a parallelogram. Its area is (base times height). The base is , and the height is exactly the distance between the lines. So , that is
Find the distance between and .
- .
- , with squared length . Also .
- .
The foot of the perpendicular from to the first line is at , that is . Its distance from is , as found.
Two parallel straight lines in three-dimensional space, one in teal and one in orange, both with direction (2, 1, 2). A dashed segment runs from the point (3, 0, 1) on the orange line to the point (7/3, 8/3, 1/3) on the teal line. It is perpendicular to both lines. Its length is the square root of 8.
A point is a "line of zero length", so the same idea gives the distance from a point to a line. Find the distance from to the line through with direction . Here and . The distance is . The foot of the perpendicular is at , that is .
EXERCISE 11.2
- Find the angle between the lines with direction ratios and .
- Show that the lines and are perpendicular.
- Find so that the lines with direction ratios and are perpendicular.
- Write in Cartesian form. Then write in vector form.
- Find the shortest distance between and . Do the lines meet?
- Find the shortest distance between and .
- Find the distance between the parallel lines and .
- Find the distance of the point from the line through the origin along the -axis.
- Are the lines with direction ratios and parallel? What are their direction cosines?
- Show that the lines and meet, and find the point.
Answers
- The dot product is , and both lengths are . Using the absolute value, , so .
- The directions are and . The dot product is , so the lines are perpendicular.
- The dot product is . It is zero when . Check: . (For example, would give .)
- First: . (For the point is on the line.) Second: the point is and the direction is , so .
- and . The dot product is , so the distance is . The lines meet, at (, ).
- , with squared length . , and the dot product is . So .
- . The cross product has squared length , and . So .
- The direction is . , with squared length , and . So . (The -coordinate does not matter: only the sideways distance counts.)
- The first is times the second, so they are parallel. Direction cosines: and , which are opposite in sign.
- Comparing coordinates gives and (the and equations), so and . The equation holds (). The lines meet at .
Miscellaneous Exercise on Chapter 11
- Show that the lines with direction ratios and are perpendicular.
- Find the angle between the -axis and the line through the origin and .
- A unit cube has corners at and . Two of its long (body) diagonals go from to and from to . Find the angle between them.
- In the same unit cube, find the shortest distance between the body diagonal through and and the edge from to .
- Show that the points , , form a right-angled triangle, and say where the right angle is.
- Two straight pipes both run in the direction of the -axis. One passes through the point and the other through . How far apart are they?
Answers
- , so they are perpendicular.
- The -axis has direction . , so . This is the same as for equal angles in Section 11.2.
- The directions are and . The dot product is , and both lengths are . So and .
- The diagonal has direction through the origin. The edge has direction through . The cross product is , with squared length . The dot product with is . So .
- and . Their dot product is , so the angle at is . (Both sides have length , so it is also isosceles.)
- For parallel lines, . This is the distance between the two points in the floor plane.
Summary
- Direction cosines of a directed line: , , , with . Reversing the direction changes all three signs.
- Direction ratios are any numbers proportional to . Then , and similarly for and .
- Through two points: the direction ratios are . Three points are collinear when two such vectors are proportional.
- Vector equation: (point , direction ). Through two points: .
- Cartesian form: . Through two points: use , , as the denominators.
- Angle between lines: (always acute). Perpendicular: . Parallel: ratios proportional.
- Skew lines: . If the top is , the lines meet. In Cartesian form the top is a determinant.
- Parallel lines: . The same formula gives the distance from a point to a line.