Studying Lines with Maple

Copyright 2001 by James F. Hurley, University of Connecticut Department of Mathematics, Unit 3009, Storrs CT 06269-3009. All rights reserved.

The interactive version of this notebook is available in MSB 203 in the Math 220 folder.

A line
L in R^3 has parametric vector equation

= x[0] + t v ,

where x[0] = O P[0] is the vector from the origin to a known point P[0] on L , v is a vector in the direction of L and t is the real parameter.

Example 3(a), Section 1.4 , of the forthcoming second edition of Multivariable Calculus by James F. Hurley asks whether the lines

x = t , y = -t , z = 1 + 3 t and x = 2 + s , y = s , z = 4.

are parallel, intersect or are skew. Since the direction vectors for the lines,
v = (1, -1 , 3 ) and w = (1, 1, 0) are clearly not scalar multiples of each other, the lines are definitely not parallel. Plotting them can help resolve the question of intersection.

The following routine generates such a plot. Its principal tool is the three-dimensional parametric plotting command spacecurve , which is part of Maple's plots3d package. The colon at the end of the first line suppresses printing the list of the package's many routines. The colons at the end of the text two lines suppress plotting of the individual lines in isolation. The final line displays Maple's standard plot of the lines as the parameters s and t range over the interval [ -2 , 2].

> with (plots):
firstline := spacecurve( [t, - t, 1 + 3*t], t = -2..2, axes = framed, labels = ["x", "y", "z"] ):
secondline := spacecurve( [2 + s, s, 4], s = -2..2, axes = framed, labels = ["x", "y", "z"] ):
display(firstline, secondline);

[Maple Plot]

Unfortunately, Maple's default display of the plot doesn't make it that clear whether the lines meet. To investigate further, click on the plot. Notice that bounding lines then appear around it. A new plotting menu bar and context bar also appear at the top of the screen. You can then use Maple's
interactive 3-dimensional rotation capability. Depress the mouse button and drag the mouse to rotate the graph and view it from different angles. Try it!

Manipulation of the image suggests strongly that the lines do intersect, at a point P whose coordinates appear to be approximately ( 1, -1, 4 ). How can we confirm that?

By equating the expressions for the
x - and y - coordinates of the two lines, and solving the resulting system of three equations in the two variables s and t . A simple way to do that is to solve the first two equations for those variables, and then check whether the solution satisfies the third equation. In this example, that gives the system

s + 2 = t
= -t

of two equations in s and t . Addition shows that s = -1 . Then the second equation gives t = 1. For those values, the z -coordinates coincide, because 1 + 3 = 4. So the two lines do indeed intersect, at the point P whose coordinates are x = 1, y = -1 , z = 4.

Example 3(b) asks the same question for the two lines

x = s , y = s , z = 0 and x = t + 1, y = -t , z = 3 t + 1.

Edit the above Maple routine by changing to these equations, and then generate a plot of the lines.

> with (plots):
firstline := spacecurve( [s, s, 0], s = -2..2, axes = framed, labels = ["x", "y", "z"] ):
secondline := spacecurve( [t + 1, -t, 3*t + 1], t = -2..2, axes = framed, labels = ["x", "y", "z"] ):
display(firstline, secondline);

[Maple Plot]

As before, the default plot doesn't indicate clearly whether the lines intersect. Try rotation again. After some manipulating you should be able to get a picture like the following, which suggests that the lines are skew, but lie in parallel planes not that far apart.

[Maple Plot]


To confirm that algebraically, equate x and y from the two lines to get the simple system

s = t
s =

Adding those equations gives at once that s = 0, and so also t = 0. But those values certainly do not satisfy the equation that results from equating the z -coordinates of the two lines:

0 = 3
t + 1.

Hence, there is no algebraic solution to the system of three equations in the two variables s and t that results from equating the respective x -, y - and z -coordinates of the two lines. Therefore, the two lines do not intersect.