Geometry: Lines
Distance point and line
When we talk about the distance between two objects, we mean the shortest distance.
To determine a way to calculate the distance to a line from a point. We will first determine how we can calculate the distance between two points.
Distance between two points
The distance between points #\blue P=\blue{\rv{x_P, y_P}}# and #\green Q=\green{\rv{x_Q, y_Q}}# is given by: \[d(\blue P,\green Q)=\sqrt{(\green{x_Q}\blue{x_P})^2+(\green{y_Q}\blue{y_P})^2}\]
We write #d(\blue P,\green Q)# for the distance between #\blue P# and #\green Q#.
Using this we can also determine the distance between a point #P# and a line #l#. The shortest distance between #P# and line #l# is found using the line perpendicular to line #l# through point #P#. The distance between point #P# and line #l# is the distance from point #P# to the point of intersection of the perpendicular line and line #l#.
Distance to point to line
Roadmap 
example 

We calculate the distance between a point #\blue P# a line #\green l#. 
#\blue P=\blue{\rv{2,4}}# #\green l: \green{y=2x+5}# 

Step 1 
Determine an equation for the line #\purple k# perpendicular to #\green l# through point #\blue P#. 
#\purple k: \purple{y=\tfrac{1}{2}x +5}# 
Step 2 
Calculate the coordinates of the point of intersection #S# of line #\purple k# and line #\green l#. 
#S=\rv{0,5}# 
Step 3 
Calculate the distance between #S# and #\blue P#. This is also the distance between #\blue P# and #\green l#. 
#d(S,\blue P)=d(\blue P,\green l)=\sqrt{5}# 
We determine the distance between a point #P# and #Q# with the help of the following formula:
\[d(P,Q)=\sqrt{(x_Qx_P)^2+(y_Qy_P)^2}\]
In this case we have:
\[\begin{array}{rcl}d(P,Q)&=&\sqrt{(1{9})^2+(5{9})^2} \\&&\phantom{xxx}\blue{\text{formula filled in}}\\
&=& \sqrt{80} \\&&\phantom{xxx}\blue{\text{calculated}} \\
&=& 4\cdot \sqrt{5} \\ &&\phantom{xxx}\blue{\text{simplified}} \end{array}\]
Or visit omptest.org if jou are taking an OMPT exam.