# lines in 3 dimensions.

**URL:** <https://boards.straightdope.com/t/lines-in-3-dimensions/275707>\
**Category:** Factual Questions\
**Created:** [November 19, 2004, 8:00pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707 "2004-11-19T20:00:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Larry\_Borgia](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/larry_borgia/32/156_2.png) [@Larry\_Borgia](https://boards.straightdope.com/u/Larry_Borgia)\
**Post date:** [November 19, 2004, 8:00pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707/1 "2004-11-19T20:00:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Orbifold](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@Orbifold](https://boards.straightdope.com/u/Orbifold)\
**Post date:** [November 19, 2004, 8:07pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707/2 "2004-11-19T20:07:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Orbifold](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@Orbifold](https://boards.straightdope.com/u/Orbifold)\
**Post date:** [November 19, 2004, 8:10pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707/3 "2004-11-19T20:10:21Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Giles](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/giles/32/60_2.png) [@Giles](https://boards.straightdope.com/u/Giles)\
**Post date:** [November 19, 2004, 8:20pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707/4 "2004-11-19T20:20:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [November 19, 2004, 10:08pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707/5 "2004-11-19T22:08:12Z")

</div>

> [@](#):
>
> Given two non-parallel planes, the interestiuon of those planes is a straight line, so the equations for two planes will do the trick:

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

---

<div class="post-metadata">

**Author:** ![Danalan](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Danalan](https://boards.straightdope.com/u/Danalan)\
**Post date:** [November 19, 2004, 10:21pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707/6 "2004-11-19T22:21:49Z")

</div>

> [@Larry Borgia](#):
>
> Any high school kid can figure out the equation of a line on an x-y plane and draw it.

Not true. Sadly.

---

<div class="post-metadata">

**Author:** ![Telemark](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/telemark/32/372_2.png) [@Telemark](https://boards.straightdope.com/u/Telemark)\
**Post date:** [November 19, 2004, 10:24pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707/7 "2004-11-19T22:24:19Z")

</div>

> [@ZenBeam](#):
>
> There are an infinite number of planes that will go through any two points, so I don’t see how this helps.

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

---

<div class="post-metadata">

**Author:** ![Cabbage](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@Cabbage](https://boards.straightdope.com/u/Cabbage)\
**Post date:** [November 19, 2004, 11:17pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707/8 "2004-11-19T23:17:40Z")

</div>

> [@ZenBeam](#):
>
> There are an infinite number of planes that will go through any two points, so I don’t see how this helps.

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.

---

<div class="post-metadata">

**Author:** ![tim314](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tim314/32/3468_2.png) [@tim314](https://boards.straightdope.com/u/tim314)\
**Post date:** [November 19, 2004, 11:21pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707/9 "2004-11-19T23:21:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Larry\_Borgia](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/larry_borgia/32/156_2.png) [@Larry\_Borgia](https://boards.straightdope.com/u/Larry_Borgia)\
**Post date:** [November 19, 2004, 11:31pm UTC](https://boards.straightdope.com/t/lines-in-3-dimensions/275707/10 "2004-11-19T23:31:37Z")

</div>

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.”
