The length of the perpendicular from the point (x_{1}, y_{1}) to the line ax + by + c = 0 is

To find the length of the perpendicular from the origin, put x_{1} = 0 and y_{1} = 0.

The general equation of the straight line is

ax + by + c = 0

y = −(a/b)x − (c/a)

This is of the form y = mx + c

∴ m= − a/b