Lines in space

For some purposes it is very convenient to represent a line in space as a parametric vector equation. If two points are known on the line this equation is very easy to find. Let points
A = (Ax,Ay,Az), and B = (Bx,By,Bz) be two points on a line.
Let the position vectors of points A and B be A and B.
The vector V from point A to point B is simply
V = B - A = (Bx-Ax,By-Ay,Bz-Az). V is a vector that points along the desired line.

A parametric vector equation of the line through A and B is
L(t) = A + t*V
where t is a scalar called the parameter.

This is shown in the following figure.

Note that for this form of the equation of the line when t=0 then L(t) = A, and when t=1 then L(t) = B. So in this case t is just the fractional distance from point A to point B. The range of t is not restricted so the line extends infinitely in both directions.

An alternate form of the line is to use the unit vector,
U = V/|V|, along the line. Then L(t) = A + t*U. In this case t is the actual distance a point on line L(t) is from point A toward point B, in the same units as the coordinate system.

If C is a point not on line AB then a line through point C and parallel to line AB is simply:
LC(s) = C + s*V, where s is a scalar parameter.


Terms