# Distance Between a Point and a Line

## Distance Between a Point and a Line

The distance between a point P and a line e on the plane is the length of the line segment that is perpendicular to the line e and that joins point P to the line.

### Notation

The distance between a point P and a line e is: d(P, e), which is read “distance from P to e.”

### Formula

In a Cartesian coordinate system, the distance d between a point P with coordinates $$(x_{1},y_{2})$$ and a line e with the equation $$\mathrm{A}x+\mathrm{B}y+\mathrm{C}=0$$ est donnée par la formule :

$$d(\mathrm{P},\mathrm{e})=\left | \frac{\mathrm{A}x_{1}+\mathrm{B}y_{1}+\mathrm{C} } {\sqrt{\mathrm{A}^{2}+\mathrm{B}^{2}}} \right |$$

### Example

Consider the line e with the equation $$3x+y-1=0$$ and the point P(2, 5). The distance from P to e can be calculated as follows:

$$d(\mathrm{P},\mathrm{e})= \frac{3\times 2+1\times5-1 } {\sqrt{3^{2}+1^{2}}}$$

or approximately 3.1623.