# What is the shortest distance from the point (2, 1) to the line x - y = -1?

## Question:

What is the shortest distance from the point {eq}(2,\ 1) {/eq} to the line {eq}x - y = -1 {/eq}?

## Distance Between a Point and a Line:

When we know the equation of a line {eq}L:\,\,ax + by + c = 0 {/eq} and a point {eq}P\left( {{x_0},{y_0}} \right) {/eq} outside the line we are able to apply the corresponding formula to derive the distance between the point {eq}P {/eq} and the line {eq}L {/eq}: {eq}d\left( {P,L} \right) = \frac{{\left| {a{x_0} + b{y_0} + c} \right|}}{{\sqrt {{a^2} + {b^2}} }} {/eq}.

{eq}\eqalign{ & {\text{If we have that the equation of the line }}\,L{\text{ is }}\,ax + by + c = 0{\text{ and a point }}\,{P_0}\left( {{x_0},{y_0}} \right){\text{ }} \cr & {\text{outside the line}}{\text{, then}}{\text{, the shortest distance from the point }}\,{P_0}{\text{ to the line }}L{\text{ is given by: }} \cr & \,\,\,\,d\left( {P,L} \right) = \frac{{\left| {a{x_0} + b{y_0} + c} \right|}}{{\sqrt {{a^2} + {b^2}} }} \cr & {\text{Now}}{\text{, in this particular case we have the point }}P\left( {{x_0},{y_0}} \right) = \left( {2,1} \right){\text{ and the line}} \cr & x - y + 1 = 0.{\text{ So}}{\text{, by replacing:}} \cr & \,\,\,\,d\left( {P,L} \right) = \frac{{\left| {1 \cdot 2 - 1 \cdot 1 + 1} \right|}}{{\sqrt {{1^2} + {{\left( { - 1} \right)}^2}} }} \cr & \,\,\,\,d\left( {P,L} \right) = \frac{{\left| {2 - 1 + 1} \right|}}{{\sqrt {1 + 1} }} = \frac{2}{{\sqrt 2 }} = \boxed{1.4142} \cr & {\text{Therefore}}{\text{, the shortest distance from the point }}\,{P_0}{\text{ to the line }}L{\text{ is }}\,\boxed{d\left( {P,L} \right) = 1.4142} \cr} {/eq} 