Direction Cosines of Line Joining Two Points
$$l=\frac{x_2-x_1}{AB}$$
$$m=\frac{y_2-y_1}{AB}$$
$$n=\frac{z_2-z_1}{AB}$$
where:
$$AB=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}$$
Usage
- Used to find the exact direction cosines of a line through two points.