If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Equation of a line in space

Contains vector and cartesian form of a line in 3D.
In this article we will learn:
  • What conditions are sufficient to uniquely determine a line in space?
  • Equation of a line in vector form
  • Equation of a line in cartesian form

What uniquely determines a line in space?

Suppose we know that a line runs from south-west to north-east. In other words, we know the direction of the line. Is this condition sufficient to uniquely determine the line?
No. See that there can be many parallel lines, all running from south-west to north-east. So, only a direction does not determine the line uniquely.
But now, in addition, we know that the line passes through a specific point P. Can we determine the line uniquely now?
Yes. See that there is only one line which runs from south-west to north-east and also passes through the point P.
Thus a line is uniquely determined if we know its direction, and a point through which it passes.
However, this is not the only way to uniquely determine a line. We can also have other conditions which uniquely determine a line. We will study one more case here.
Suppose we have two distinct points and are given that a line passes through them. Is this line unique?
Yes. See that both the direction of the line and its position in space are fixed by saying that the line passes through two given points.
Although here we have shown lines in two dimensions, check that the above principles remain true for lines in three dimensions as well.
In below sections, we will learn to write the equation of a line in three dimensions for the above two cases. We will write the equation in two different forms - vector form and cartesian form. So, let's begin!

Vector form of the equation of a line

Case 1: Line passing through a given point and parallel to a given vector

Consider a line which passes through a point with position vector a and is parallel to the vector d. See that the vector d defines the 'direction' of the line. Let r be the position vector of a general point on the line. How can we write r in terms of a and d?
First consider the position vector a+d. Does this point on the line? Clearly yes. Now check a+2d. Does this point also lie on the line? Yes. Going on in this fashion see that points with position vectors a+3d, a+4d, a+5d etc. will all lie on the line. Not only these, but other points with position vectors like a+0.7d, a+3.2d etc. will also lie on the line.
How about if we want to go in the opposite direction from a? Does the point with position vector ad lie on the line? Yes. Similarly, see that position vectors like a2d, a3d or a1.5d will all lie on the line. What we have found here is a recipe to describe any general point on the line. We can write the equation of the line as
r=a+λd
where λ is what is called as a parameter in mathematics. Here λ takes on values from to +. As λ moves from to +, we cover all the points which form the line.
Check your understanding 1
What will be the vector equation of the line which is parallel to the vector 5i^+2j^4k^?
Choose 1 answer:

Check your understanding 2
What will be the vector equation of the line passing through the point (1,3,2) and parallel to the vector 7i^+9j^2k^?
Choose 1 answer:

Case 2: Line passing through two given points

Now, consider a line which passes through two points with position vectors a and b. What is the equation of this line?
Note that the line will be parallel to ba. So, in this case ba plays the same role which d played in the above case. We simply replace d with ba in the previous equation. We get
r=a+λ(ba)
This is the equation of a line passing through two points with position vectors a and b. Here, note that r=b+λ(ba), or r=a+λ(ab) will also be valid equations of the line.

Cartesian form of the equation of a line

Case 1: Line passing through a given point and parallel to a given vector

Let's now move on to finding the equations in cartesian form, i.e. we need to find x, y and z coordinates of a general point on the line.
Consider a line which passes through a point (x1,y1,z1) and is parallel to the vector ai^+bj^+ck^.
Because the line is parallel to the vector ai^+bj^+ck^, a,b,c will be the direction ratios of the line. What this means is that when we move from one point on the line to another, the change in the coordinates occurs in the ratio a:b:c.
Start from the point (x1,y1,z1). Does the point (x1+a,y1+b,z1+c) lie on the line? Yes. Note that when the x coordinate increases by a, the y coordinate increases by b, and the z coordinate increases by c.
What about the point (x1+2a,y1+2b,z1+2c)? Yes, this point also lies on the line. See that when the x coordinate increases by 2a, the y coordinate increases by 2b, and the z coordinate increases by 2c. Similarly, other points with coordinates like (x1+3a,y1+3b,z1+3c), or (x1+1.7a,y1+1.7b,z1+1.7c) etc. will also lie on the line.
How about if we want to go in the opposite direction? Does the point (x1a,y1b,z1c) lie on the line? Yes. Note that when the x coordinate decreases by a, the y coordinate decreases by b, and the z coordinate decreases by c. Similarly, other points with coordinates like (x12a,y12b,z12c), or (x12.5a,y12.5b,z12.5c) etc. will also lie on the line.
Going on in this fashion we can say that all the points with coordinates of the form (x1+λa,y1+λb,z1+λc), where λ is a parameter, lie on the line. As λ moves from to +, we would cover all the points which form the line.
In fact, what we have found are the parametric equations of a line. The coordinates (x,y,z) of a general point on the line can be written as
x=x1+λay=y1+λbz=z1+λc
There is a neat way to eliminate the parameter λ. Rewrite the above equations as
xx1a=λyy1b=λzz1c=λ
And now eliminating λ, we get the cartesian equation of a line as
xx1a=yy1b=zz1c

Case 2: Line passing through two given points

Now suppose that a line passes through two points with coordinates (x1,y1,z1) and (x2,y2,z2).
Recall that the direction ratios of such a line will be x2x1,y2y1,z2z1. We can simply replace a,b,c from the above case with x2x1,y2y1,z2z1. The equation of the line becomes
xx1x2x1=yy1y2y1=zz1z2z1
Check your understanding 3
Find the cartesian equation of the line which passes through the points (7,4,6) and (9,1,8).
Choose 1 answer:

Summary

The vector equation of a line is
r=a+λd, for a line passing through a point with position vector a and parallel to the vector d, and
r=a+λ(ba), for a line passing through two points with position vectors a and b.
The cartesian equation of a line is
xx1a=yy1b=zz1c, for a line passing through a point with coordinates (x1,y1,z1) and parallel to the vector ai^+bj^+ck^, and
xx1x2x1=yy1y2y1=zz1z2z1, for a line passing through two points with coordinates (x1,y1,z1) and (x2,y2,z2).

Want to join the conversation?