The problem appears to be that the OP really does NOT understand the basics of three dimensional lines. Rahul, as SteamKing said, the equation you give defines a plane in three dimensions, not a line. The "direction cosines" of a line in three dimensions are the cosines of the angles the line makes with lines parallel to the three coordinate axes. In addition, They are the dot products of a unit vector in the direction of the line with unit vectors in the directions of the three coordinate axes. In particular, if a line is given in parametric form, x= at+ b, y= ct+ d, z= et+ f, then the vector ai+ bj+ ck is in the direction of the line. Dividing by [itex]\sqrt{a^2+ b^2+ c^2}[/itex] is gives a unit vector in that direction. In other words, the three direction cosines are [itex]\frac{a}{\sqrt{a^2+ b^2+ c^2}}[/itex], [itex]\frac{b}{\sqrt{a^2+ b^2+ c^2}}[/itex], and [itex]\frac{c}{\sqrt{a^2+ b^2+ c^2}}[/itex].