P(x1,y1,z1) and Q(x2,y2,z2) ∴ Direction ratios of line PQ=(x2−x1,y2−y1,z2−z1) ⇒ direction cosine of PQ= [(x2−x1)2+(y2−y1)2+(z2−z1)2x2−x1, (x2−x1)2+(y2−y1)2+(z2−z1)2y2−y1, (x2−x1)2+(y2−y1)2+(z2−z1)2z2−z1] =[PQx2−x1,PQy2−y1,PQz2−z1]
where PQ=(x2−x1)2+(y2−y1)2+(z2−z1)2