This is the formula for the distance of a point from a line.

Given a line in a plane ax+by+c=0 with a,b,c real coefficients and a,b not both zero; the distance from a point `(x_0,y_0)` to the line is :

`d=(|ax_0+by_0+c|}/sqrt(a^2+b^2)`

a,b,c are the coefficients from the equation of the line while `x_0,y_0` are the coordinates of the given point.

Ex: Find the distance from the point (3,2) to the line y=2x+1:

The line in general form is 2x-y+1=0 and the point is (3,2)

The distance is `d=(|2(3)+(-1)(2)+1|)/sqrt(2^2+(-1)^2)=5/sqrt(5)=sqrt(5)`

To check note that the line `y=-1/2x+7/2` is perpendicular to the given line and contains the point (3,2). The two lines intersect at (1,3). We can use the distance formula to find the distance between these two points: `d=sqrt((3-1)^2+(2-3)^2)=sqrt(5)` as above.