In 3D space, a line can be described using vector equations, coordinates, or parametric forms. The distance and orientation between two points on a line are measured using Euclidean distance and direction cosines.
\[ d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} \]
Direction cosines represent the cosines of angles made by a line with the x, y, and z axes.
\[ l = \cos \alpha = \frac{x_2 - x_1}{d}, \quad m = \cos \beta = \frac{y_2 - y_1}{d}, \quad n = \cos \gamma = \frac{z_2 - z_1}{d} \]
The fundamental identity for direction cosines: \[ l^2 + m^2 + n^2 = 1 \]