0:00 / 0:00

Distance From a Point to a Line in R2

If Ax+By+C=0Ax+By+C=0 is a line in R2R^2, then the shortest distance between a point P(x1,  y1)P\left(x_1,\ \ y_1\right) and this line is d=Ax1+By1+CA2+B2\displaystyle d=\frac{\left|Ax_1+By_1+C\right|}{\sqrt{A^2+B^2}}

Example
Find the distance between the point (1, 3)\left(1,\ -3\right) and the line 2xy+1=02x-y+1=0

d=2(1)(3)+122+(1)2=2+3+14+1=65d=\frac{\left|2\left(1\right)-\left(-3\right)+1\right|}{\sqrt{2^2+\left(-1\right)^2}}=\frac{\left|2+3+1\right|}{\sqrt{4+1}}=\frac{6}{\sqrt{5}}

Practice: Distance From a Point to a Line in R2

Find the distance between the point P(1,2)P\left(1,-2\right) and the following lines:
a) 3x2y5=03x-2y-5=0
b) r=[0, 1]+t[1, 3]\vec{r}=\left[0,\ -1\right]+t\left[1,\ 3\right]

Practice: Distance Between 2 Parallel Lines in R2

Calculate the distance between the two lines 2x6y+6=02x-6y+6=0 and x3y8=0x-3y-8=0.