<s>[INST] Equation for Distance of the Straight line from the Origin. By reduction of the equation $ax + by + c = 0 $ of a straight line to the normal form , we get 
$$\left(\frac{-a}{\sqrt{a^2 + b^2}}\right)x + \left(\frac{-b}{\sqrt{a^2 + b^2}}\right)y = \frac{c}{\sqrt{a^2 + b^2}}$$
And,
$$p= \frac{∣c∣}{\sqrt{a^2 + b^2}}$$
And my textbook says that $p$ is the distance of the straight line from the origin. I don't know why we are getting it as a distance from origin?
I know $p= x\cos\theta + y\sin\theta$ ( where $p$ is distance of line from origin).
Also I want to know how can we relate both equations?
 [/INST] Note that by Cauchy Schwarz, if $(x, y)$ satisfies $ax+by+c = 0$, then
$$c^2= (-c)^2 = (ax+by)^2 \le (a^2+b^2)(x^2+y^2). $$
(The last inequality can be checked directly). Thus every points $(x, y)$ on the line satisfies 
$$\tag{1} \sqrt{x^2+y^2} \ge \frac{|c|}{\sqrt{a^2+ b^2}}.$$
On the other hand, the point 
$$(x,y)= \left(\frac{-ac}{\sqrt{a^2+b^2}}, \frac{-bc}{\sqrt{a^2+b^2}}\right)$$
lies on the line and has distance 
$$\frac{|c|}{\sqrt{a^2+b^2}}$$
from the origin. Thus we are done. 
</s>