3D Coordinate Geometry - Equation of a Line
Equation of a Line
To find the equation of a line in a two-dimensional plane, we need to know a point that the line passes through as well as the slope. Similarly, in three-dimensional space, we can obtain the equation of a line if we know a point that the line passes through as well as the direction vector, which designates the direction of the line. The formula is as follows:
The equation of a line with direction vector that passes through the point is given by the formula
where and are non-zero real numbers.
![]()
Consider a line which passes through the point and has direction vector where and are non-zero real numbers. Let be a random point on the line. Then the vector which is the red arrow in the figure, will be parallel to Hence we have
Therefore, any point on the line will satisfy the equation
The equation of a line with direction vector that passes through the point is given by the two formulas
where and are non-zero real numbers.
The proof is very similar to the previous one.
Find the equation of a line with direction vector that passes through the point
According to the formula above, the equation of the line is
In similarity with a line on the coordinate plane, we can find the equation of a line in a three-dimensional space when given two different points on the line, since subtracting the position vectors of the two points will give the direction vector.
Find the equation of the line that passes through the points and
Subtracting the position vectors of the two points gives the direction vector, which is
We can either set or as Using would give
and using would give
Observe that adding 1 to all sides of (2) gives (1), which means that both equations are identical.
What if a coordinate of the direction vector equals zero? Suppose the -coordinate of the direction vector is zero. This indicates that all points on the line would have equal -coordinates. Hence the equation for this case would look like
Similarly, in the case where two coordinates of the direction vector are zero (say, the - and -coordinates), the equation would look like
Find the equation of the line that passes through the two points and
Subtracting the position vectors of the two points gives the direction vector, which is
Since the -coordinate of the direction vector is zero, the equation is
The relationship between two different lines in a three-dimensional space is always one of the three: they can be parallel, skew, or intersecting at one point. If the direction vectors of the lines are parallel, then the lines are also parallel (provided that they are not identical). If the lines do not meet and their direction vectors are not parallel, then they are skew. If the lines meet and their direction vectors are not parallel, then the lines meet at a single point. As we can see, comparing the direction vectors usually gives useful information concerning two lines.
What is the relationship of the following two lines:
The direction vectors of the two lines are and Since the two direction vectors are parallel. This implies that the two lines are either identical or parallel. A point that the first line passes through is Since this point does not satisfy the equation of the second line, the second line does not pass through this point. Therefore, the two lines are parallel.