Consider the general form of equation of straight line.
$$ax + by + c = 0$$
$$\Rightarrow ax + by = -c$$
$$\Rightarrow \frac{ax}{-c} + \frac{by}{-c} = 1$$
$$\Rightarrow \frac{x}{\frac {-c}{a}} + \frac{y}{\frac {-c}{b}} =1 $$
this is equation of line in intercept form with x-intercept $\frac {-c}{a}$ and y-intercept $ \frac {-c}{b}$
In above fig. $\overline {OD}\bot\overline {AB}$
Now consider $\Delta$OAD
$$Cos\alpha =\frac {\overline{OD}}{\overline{OA}} = \frac{P}{\frac {-c}{a}} =\frac {-aP}{c} $$
In $\Delta$OBD
$$Cos(90-\alpha)=\frac {\overline{OD}}{\overline{OB}} = \frac{P}{\frac {-c}{b}} =\frac {-bP}{c} $$
Since Cos($90-\alpha$)= Sin $\alpha$ Therefore,
$$Sin\alpha = \frac {-bP}{c}$$
Now
$$tan\alpha =\frac {sin \alpha}{cos\alpha} = (\frac {-bP}{c})(\frac{-c}{aP})$$
$$tan \alpha = \frac {b}{c}=> \frac {perpendicular}{base}$$
$$\Rightarrow hyp = \pm\sqrt{a^2+b^2} (by Pythagorean theorem).........(a)$$
$$\Rightarrow cos\alpha = \frac {a}{\pm\sqrt {a^2+b^2}},sin\alpha = \frac {b}{\pm\sqrt {a^2+b^2}}...............(1)$$
Now for transforming general equation of straight line to normal form:
Consider the general form of equation of straight line
$$ax+by+c=0$$
$$\Rightarrow ax+by=-c$$
Now in order to to have Normal form of equation of straight line it is said that divide both sides by $\pm\sqrt{a^2+b^2}$, then we get
$$\frac {a}{\pm\sqrt{a^2+b^2}}x+\frac {b}{\pm\sqrt{a^2+b^2}}y=\frac {-c}{\pm\sqrt{a^2+b^2}}$$
Using equations (1) in above we get
$$xcos\alpha+ysin\alpha=\frac {-c}{\pm\sqrt{a^2+b^2}}$$
Now comparing with normal equation of straight line i.e.$xcos\alpha+ysin\alpha=P$
$$\implies P=\frac {-c}{\pm\sqrt{a^2+b^2}}$$
Now the question is:
1: In equation (a) $hyp = \pm\sqrt{a^2+b^2}$ but according to figure in $\Delta OAD hyp=\overline{OA}= \frac{-c}{a}$
How $\pm\sqrt{a^2+b^2}=\frac{-c}{a}$?
