A line in three-dimensional space is determined by one point and one direction. Both data come together in the standard parametric / vector form.
Vector form
A line through the point with position vector a in the direction of the (non-zero) vector d consists of all points
r=a+td,t∈R.
The parameter t traces the line: at t=0 you're at a; at t=1 you're at a+d, etc.
The same line is described by many such equations. Replacing a by any other point a′ on the line, or scaling d by any non-zero constant, gives an equally valid description.
Cartesian form
If a=(x0,y0,z0) and d=(d1,d2,d3), then writing r=(x,y,z):
x=x0+td1,y=y0+td2,z=z0+td3.
Eliminate t:
d1x−x0=d2y−y0=d3z−z0.
This is the symmetric or Cartesian form. It is valid only when no di=0; when some component of d vanishes, you write that coordinate as a constant equation. E.g., if d3=0: d1x−x0=d2y−y0,z=z0.
Line through two given points
A line through A=(x1,y1,z1) and B=(x2,y2,z2) has direction AB=(x2−x1,y2−y1,z2−z1). So
r=a+t(b−a),
or in Cartesian form
x2−x1x−x1=y2−y1y−y1=z2−z1z−z1.
(With the same caveat about zero denominators.)
Converting between forms
Vector → Cartesian: read off the point (x0,y0,z0) and the direction (d1,d2,d3), then write the symmetric form.
Cartesian → Vector: from d1x−x0=d2y−y0=d3z−z0, the line is r=(x0,y0,z0)+t(d1,d2,d3).
When is a given point on a line?
Substitute. In vector form: solve p=a+td for t. If a consistent t exists in all three coordinates, p is on the line. In Cartesian form: plug into the symmetric equation and check that all three ratios are equal.
Worked examples
Example 1. Find the vector and Cartesian equations of the line through (2,−1,3) in the direction i^+2j^−2k^.
Vector: r=(2,−1,3)+t(1,2,−2), i.e. r=(2+t)i^+(−1+2t)j^+(3−2t)k^.
Cartesian: 1x−2=2y+1=−2z−3.
Example 2. Find the equation of the line through (1,0,2) and (4,3,8).
Direction: (3,3,6), or simplified (1,1,2). Vector form: r=(1,0,2)+t(1,1,2).
Cartesian: 1x−1=1y=2z−2.
Example 3. Find the equation of the x-axis.
Point (0,0,0), direction (1,0,0). Vector form: r=ti^. Cartesian: y=0, z=0.
Example 4. Does the point (3,2,1) lie on 1x−1=3y+1=−1z−2?
Check: 13−1=2; 32+1=1; −11−2=1. Not all equal , so no.
Example 5. Find λ if the point (λ,1,2) lies on the line 2x−1=0y−1=3z−2.
The middle ratio 0y−1 is interpreted as y−1=0, i.e. y=1 , which is satisfied by our point. So the other two ratios must agree: 2λ−1=32−2=0, so λ=1.
Example 6. Find the foot of the perpendicular from (1,2,3) to the line 1x=2y=3z.
Parametrise: r=t(1,2,3). Foot F=(t,2t,3t) on the line is the one where PF⊥ direction (1,2,3). PF=(t−1,2t−2,3t−3). Dot with (1,2,3): (t−1)+(4t−4)+(9t−9)=14t−14=0, so t=1. Foot: (1,2,3). (Interesting , the point itself is on the line.)
Try it yourself
Find the vector equation of the line through (0,1,2) in direction i^+j^+k^.
Find the Cartesian equation of the line through (1,2,3) and (4,5,6).
Find direction ratios of the line 2x−1=−1y+3=5z.
Does the point (2,−1,5) lie on 1x−1=−1y+2=1z−4?
Find the Cartesian equation of the line through (1,0,−1) parallel to the y-axis.
Find vector and Cartesian forms of the line through (0,0,0) and (2,3,−1).
Find the equation of the line through (2,1,4) perpendicular to the lines r=t(1,1,0) and r=s(0,1,1).
Find the foot of perpendicular from (1,2,1) to the line 1x=2y−1=3z−2.
Find α,β if (α,β,7) lies on 1x=2y=7z.
The line through (1,−1,3) with direction (2,1,2) crosses the xy-plane at what point?
Find the image of (1,2,3) in the line 1x−1=2y−1=1z+1.
Find the distance between (1,0,0) and the line 1x=2y=3z.
Convert vector form r=(1,2,−1)+t(3,1,2) to Cartesian.
Convert Cartesian form 1x+1=−1y−2=2z to vector.
Pitfalls and tricks
Both forms describe the same line. Pick whichever is convenient for the problem.
Zero denominators in Cartesian form are handled by writing the corresponding coordinate as a constant equation.
A line in 3D needs two equations (two simultaneous constraints) in Cartesian form , symmetric form packages them as one chain.
Parameter t is arbitrary , it does not matter that it appears explicitly; eliminate it for Cartesian.
To check whether a point is on a line, plug into the parametric form and solve for t.