>


We construct two lines; the first contains the point and the direction , the second the points and . The Line and Plane objects understand lists as points and Vectors as directions.
>


 (1) 
>


 (2) 
Let us see if intersects .
>


 (3) 
>


 (4) 
The intersection is a point.
>


 (5) 
>


 (6) 
We can also find by obtaining equations for both lines (there are two for each) and solving them simultaneously. The default coordinate variables are , , and ; when constructing a line or plane, you can choose different variables.
>


 (7) 
>


 (8) 
>


 (9) 
We can obtain various other representations of a line with the GetRepresentation command.
>


 (10) 
>


 (11) 
>


 (12) 
>


 (13) 
We construct a third line, parallel to .
>


 (14) 
>


 (15) 
What is the relative position of with respect to ?
>


 (16) 
>


 (17) 
>


 (18) 
We can compute the (Euclidean) distance between a pair of lines using the Distance command. Intersecting lines are at distance 0.
>


 (19) 
>


 (20) 
>


 (21) 
The GetPlot command shows a visualization of the line.
>


In order to combine visualizations, one can use plots:display. With all features of the visualizations turned on, it is a little crowded, so we turn some of them off.
>


Let's consider the plane containing and .
>


 (22) 
What is the relative position of and ?
>


 (23) 
>


 (24) 
>


 (25) 
The distance between and is the same as the distance between and . This is always the case when is parallel to , which contains , but is not parallel to .
Since and intersect, also intersects the plane containing and .
>


 (26) 
>


 (27) 
Now let us consider a family of lines. We let be a line containing the point and the direction , for some values and .
>


 (28) 
>


 (29) 
>


 (30) 
>


 (31) 
If we can find values for and that make the numerators of both those distances zero, we get a line that intersects both and .
>


 (32) 
We now let be the particular line with these values for and .
>


 (33) 
>


 (34) 
>


 (35) 
>


 (36) 
Additional examples can be found in the MultivariateCalculus Example Worksheet.