lines in 3 dimensions.

Any high school kid can figure out the equation of a line on an x-y plane and draw it. given an equation of a line ax+by=c you can find the intercepts, or put it in point slope form. Given two points you can find the slope between them and use the two point form to come up with the intercept.

But how do you find the equation and draw a line in three dimensions? I just realized I have no idea.

Given two points (a,b,c) and (d,e,f) how do I find the equation of the line between them?

given an equation Ax+By+Cz+D=0 how do I draw the line?

I’ll do some googling but I thought I’d try the board first.

Ax+By+Cz+D=0 is the equation of a plane in three dimensions, so that doesn’t help.

To get the equation of a line, there are a couple of ways. First, vectors. This:

(x,y,z) = (a,b,c) + t (d-a,e-b,f-c)

is a parametric equation for the line through the points (a,b,c) and (d,e,f). You can also re-write the above vector equation as a system of equations, one for each co-ordinate:

x = a + t(d-a)
y = b + t(e-b)
z = f + t(f-c)

And if you want, you can eliminate the parameter “t” algebraically, leaving you with two equations in three unknowns:

(y-b)(d-a) = (x-a)(e-b)
(z-f)(d-a) = (x-a)(f-c)

But that’s about as good as it gets. There’s no way to get one single equation representing a line (without using vectors) because one equation in three variables generally describes a surface, i.e. a two-dimensional object, and not a line which is a one-dimensional object.

I screwed up the “z” equation. The parametric equations should be:

x = a + t(d-a)
y = b + t(e-b)
z = c + t(f-c)

And after eliminating “t”, you get:

(y-b)(d-a) = (x-a)(e-b)
(z-c)(d-a) = (x-a)(f-c)

Stupid typos…

Given two non-parallel planes, the interestiuon of those planes is a straight line, so the equations for two planes will do the trick:

ax + by + cz + d = 0
ex + fy + gz + h = 0

There are an infinite number of planes that will go through any two points, so I don’t see how this helps.

Not true. Sadly.

But two planes intersect in a line. Knowing the two planes defines the line. The equations are for two planes, not for two points.

Yeah, but I see what Giles is doing–so what if there’s an infinite number of them? Simply pick any (distinct) two of them.

In practice, however, I’m not sure that this method would really help the OP. If he’s asking about finding the equation of a line in three dimensions, he may not know how to go about finding the equation for a plane in three dimensions (or maybe he does, I’m just speculating).

Orbifold’s method, however, is much quicker and simpler any way you look at it.

Another way to think about why you need two equations:

A line is one-dimensional, a plane is two-dimensional, and space is three-dimensional. To go from two dimensions (the Cartesian xy-plane) to one dimension (a line in the plane) takes one constraint, since we’ve reduced the number of dimensions by one. Hence, one equation. But to go from three-dimensional Cartesian space to a one-dimensional line in space takes two constraints, since we’ve reduced the number of dimensions by two. Hence, two equations.

Huh, so its harder than I thought. Well at least I don’t have to feel bad at not being able to figure it out by myself, though I do feel stupid for not catching that ax+by+cz=d is a plane. Now I have to learn about vectors and parametric equations.

Danalan, I guess you should change “can” to “should be able to.”