So
PQ =
2
2
2
(1
( 2))
(2
4)
(3
( 5))
− −
+
−
+
− −
 = 
77
Thus, the direction cosines of the line joining two points is
3
2
8
,
,
77
77
77
−
Example 4 Find the direction cosines of x, y and z-axis Solution The x-axis makes angles 0°, 90° and 90° respectively with x, y and z-axis Therefore, the direction cosines of x-axis are cos 0°, cos 90°, cos 90° i e