Illustrated · 2 min
It's pretty easy to find the equation of a line in two dimensions. We just whip out the slope-intercept formula, point-slope formula, or any of the other options available to us. But what if somebody asked you to find the equation of a line in three dimensions? How about four dimensions?
If you're anything like me, you'd be a little thrown off! But have no fear, we can describe any line in any dimension using our favorite mathematical construct: vectors!
Let's take this point in 3D:

Point in 3D
For the purposes of making this a little easier to understand, let's say this point is (1, 2, 3).
Now how do we usually find lines in two dimensions? Well, we normally have two points and we want to find the equation of a line that passes through both of them. So let's say (1, 2, 3) is our first point and (3, 1, 2) is our second point.
What do we do here? We can't really use a slope-intercept formula, can we? However, let's think about the vector that goes from the first point to the second. Using our knowledge of vectors, we would know what that is: <(3-1), (1-2), (2-3)> = <2, -1, -1>.

caption
You might be thinking, "But this still doesn't help us write an equation for a line..." Hang on a second! Let's do a quick mental exercise first.
Bob the Bug is currently standing on point (1, 2, 3). In one second, he can travel to point (3, 1, 2). If Bob is traveling in a straight line, where will be the next point he goes? Well, following the pattern from the previous jump, he would go to point (5, 0, 1). In other words, he is using a vector to travel in a straight line from one point to another. If he keeps traveling using that same vector to determine his next location, he'll be going in a straight line!
Now let's make some equations for Bob's jumping.
In one second, Bob went from (1, 2, 3) to (3, 1, 2). Let's use a variable t to describe Bob's time. For the first second, t = 1.
If you plug in t = 1, that gets you the point you want! Now try plugging in t = 2. What point do you get? It should be (5, 0, 1)!
Now let's use a more general definition to describe these vector-lines:
For two points and and the vector <a, b, c> that travels between them, we can describe any point on the same line as:
where t is any real number.
(Please note: You can do this in any dimension you like! Can you see why?)
