In this explainer, we will learn how to find the perpendicular distance between a point and a straight line or between two parallel lines on the coordinate plane using the formula.

By using the Pythagorean theorem, we can find a formula for the distance between any two points in the plane. For example, to find the distance between the points and , we can construct the following right triangle.

Since the distance between these points is the hypotenuse of this right triangle, we can find this distance by applying the Pythagorean theorem.

### Recap: Distance between Two Points in Two Dimensions

The distance, , between the points and is given by

This formula tells us the distance between any two points. We can use this to determine the distance between a point and a line in two-dimensional space. We want this to be the shortest distance between the line and the point, so we will start by determining what the shortest distance between a point and a line is. To do this, we will first consider the distance between an arbitrary point on a line and a point , as shown in the following diagram.

First, if lies on line , then the distance will be zero, so letβs assume that this is not the case. We could find the distance between and by using the formula for the distance between two points. However, we do not know which point on the line gives us the shortest distance. We can find a shorter distance by constructing the following right triangle.

Since is the hypotenuse of the right triangle , it is longer than . The same will be true for any point on line , which means that the length of is the shortest distance between any point on line and point . We call this the perpendicular distance between point and line because and are perpendicular. We are now ready to find the shortest distance between a point and a line.

### How To: Identifying and Finding the Shortest Distance between a Point and a Line

We want to find the shortest distance between the point and the line : , where both and cannot both be equal to zero. If is vertical or horizontal, then the distance is just the horizontal/vertical distance, so we can also assume this is not the case. If lies on line , then the distance will be zero, so letβs assume that this is not the case.

We know the shortest distance between the line and the point is the perpendicular distance, so we will draw this perpendicular and label the point of intersection . There are a few options for finding this distance. For example, since the line between and is perpendicular to , we could find the equation of the line passing through and to find the coordinates of . However, we will use a different method. We start by dropping a vertical line from point to . We call the point of intersection , which has coordinates .

We can find the shortest distance between a point and a line by finding the coordinates of and then applying the formula for the distance between two points.

We start by denoting the perpendicular distance . To find the length of , we will construct, anywhere on line , a right triangle with legs parallel to the - and -axes. Using the fact that has a slope of , we can draw this triangle such that the lengths of its sides are and , as shown in the following diagram.

We can show that these two triangles are similar. Notice that and are vertical lines, so they are parallel, and we note that they intersect the same line .This tells us because they are corresponding angles. We know that both triangles are right triangles and so the final angles in each triangle must also be equal. Hence, these two triangles are similar, in particular, , giving us the following diagram.

The ratio of the corresponding side lengths in similar triangles are equal, so

The distance between and is the absolute value of the difference in their -coordinates:

We also have

Substituting these into the ratio equation gives

And then rearranging gives us

We want to find an expression for in terms of the coordinates of and the equation of line . We can do this by recalling that point lies on line , so it satisfies the equation

Substituting this into our equation for and simplifying gives

Hence,

Before we summarize this result, it is worth noting that this formula also holds if line is vertical or horizontal. If is vertical, then the perpendicular distance between : and is the absolute value of the difference in their -coordinates:

To apply the formula, we would see , , and , giving us

Since these expressions are equal, the formula also holds if is vertical. We could do the same if was horizontal. This gives us the following result.

### Theorem: The Shortest Distance between a Point and a Line in Two Dimensions

The shortest distance (or the perpendicular distance), , between the point and the line : is given by

We also refer to the formula above as the distance between a point and a line. Letβs see an example of how we can apply this formula to find the distance between a point and a line given in general form.

### Example 1: Finding the Distance between a Point and a Straight Line in Two Dimensions

Find the length of the perpendicular drawn from the point to the straight line .

### Answer

We recall that the perpendicular distance, , between the point and the line : is given by

From the coordinates of , we have and . From the equation of , we have , , and . Substituting these values into the formula and evaluating yields

Therefore, the distance from point to the straight line is length units.

In our next example, we will see how to apply this formula if the line is given in vector form.

### Example 2: Finding the Distance between a Point and a Straight Line Given in Vector Form in Two Dimensions

Find the length of the perpendicular from the point to the straight line .

### Answer

We want to find the perpendicular distance between a point and a line. To do this, we will start by recalling the following formula.

The perpendicular distance, , between and : is given by

In this question, we are not given the equation of our line in the general form. Instead, we are given the vector form of the equation of a line. To apply our formula, we first need to convert the vector form into the general form.

We recall that the equation of a line passing through and of slope is given by the pointβslope form

Since we can rearrange this equation into the general form, we start by finding a point on the line and its slope. In the vector form of a line, , is the position vector of a point on the line, so lies on our line.

So, we can set and in the pointβslope form of the equation of the line. We can find the slope of our line by using the direction vector . We know that our line has the direction and that the slope of a line is the rise divided by the run:

We can substitute all of these values into the pointβslope equation of a line and then rearrange this to find the general form:

This is the equation of our line in the general form, so we will set , , and in the formula for the distance between a point and a line. We will also substitute and into the formula to get

We can then rationalize the denominator:

Hence, the perpendicular distance between the point and the line is units.

Letβs now see an example of applying this formula to find the distance between a point and a line between two given points.

### Example 3: Finding the Perpendicular Distance between a Given Point and a Straight Line

Find the length of the perpendicular drawn from the point to the straight line passing through the points and .

### Answer

We first recall the following formula for finding the perpendicular distance between a point and a line.

The perpendicular distance, , between the point and the line : is given by

Therefore, we can find this distance by finding the general equation of the line passing through points and . We can find the slope of this line by calculating the rise divided by the run:

Using this slope and the coordinates of gives us the pointβslope equation which we can rearrange into the general form as follows:

We have the values of the coefficients as , , and . From the coordinates of , we have and . Substituting these into our formula and simplifying yield

Hence, the perpendicular distance from the point to the straight line passing through the points and is units.

In our next example, we will use the distance between a point and a given line to find an unknown coordinate of the point.

### Example 4: Finding the Distances between Points and Straight Lines in Two Dimensions

If the length of the perpendicular drawn from the point to the straight line is 10 length units, find all the possible values of .

### Answer

We recall that the perpendicular distance, , between the point and the line : is given by

We are told , , , , , and . Substituting these values into the distance formula and rearranging yield

Hence, either

Solving the first equation,

Solving the second equation,

Hence, the possible values are or .

We can see why there are two solutions to this problem with a sketch. We sketch the line and the line , since this contains all points in the form .

We then see there are two points with -coordinate at a distance of 10 from the line .

In our previous example, we were able to use the perpendicular distance between an unknown point and a given line to determine the unknown coordinate of the point. In our next example, we will use the coordinates of a given point and its perpendicular distance to a line to determine possible values of an unknown coefficient in the equation of the line.

### Example 5: Finding the Equation of a Straight Line given the Coordinates of a Point on the Line Perpendicular to It and the Distance between the Line and the Point

If the length of the perpendicular drawn from the point to the straight line equals , find all possible values of .

### Answer

We recall that the perpendicular distance, , between the point and the line : is given by

We are given , , , , and . Substituting these values into the formula and rearranging give us

Hence, there are two possibilities:

Solving the first equation,

Solving the second equation,

This gives us that either or .

We can see this in the following diagram.

Since we know the direction of the line and we know that its perpendicular distance from is , there are two possibilities based on whether the line lies to the left or the right of the point .

We can extend the idea of the distance between a point and a line to finding the distance between parallel lines.

Letβs consider the distance between arbitrary points on two parallel lines and , say and , as shown in the following figure.

We can see that this is not the shortest distance between these two lines by constructing the following right triangle.

The line segment is the hypotenuse of the right triangle, so it is longer than the perpendicular distance between the two lines, . Since the choice of and was arbitrary, we can see that will be the shortest distance between points lying on either line.

We notice that because the lines are parallel, the perpendicular distance will stay the same. Hence, we can calculate this perpendicular distance anywhere on the lines. If we choose an arbitrary point on , the perpendicular distance between a point and a line would be the same as the shortest distance between and .

We can summarize this result as follows.

### Definition: Distance between Two Parallel Lines in Two Dimensions

The distance between two parallel lines can be found as the perpendicular distance between any point on one line and the other line.

In our next example, we will see how we can apply this to find the distance between two parallel lines.

### Example 6: Finding the Distance between Two Lines in Two Dimensions

What is the distance between lines and ?

### Answer

We know that any two distinct parallel lines will never intersect, so we will start by checking if these two lines are parallel. We recall that two lines in vector form are parallel if their direction vectors are scalar multiples of each other. We see that so the two lines are parallel. This means we can determine the distance between them by using the formula for the distance between a point and a line, where we can choose any point on the other line.

We choose the point on the first line and rewrite the second line in general form. Its slope is the change in over the change in .This is given in the direction vector:

Using the point and the slope, we can write the equation of the second line in pointβslope form:

We can then rearrange:

We want to find the perpendicular distance between and . We recall that the perpendicular distance, , between the point and the line : is given by

We have , , , , and . Substituting these values in and evaluating yield

Hence, the distance between the two lines is length units.

In our final example, we will use the perpendicular distance between a point and a line to find the area of a polygon.

### Example 7: Finding the Area of a Parallelogram Using the Distance between Two Lines on the Coordinate Plane

Consider the parallelogram whose vertices have coordinates , , , and . Calculate the area of the parallelogram to the nearest square unit.

### Answer

Recall that the area of a parallelogram is the length of its base multiplied by the perpendicular height. Since the opposite sides of a parallelogram are parallel, we can choose any point on one of the sides and find the perpendicular distance between this point and the opposite side to determine the perpendicular height of the parallelogram. We can therefore choose as the base and the distance between and as the height. The length of the base is the distance between and . It is given by

To find the perpendicular distance between point and , we recall that the perpendicular distance, , between the point and the line : is given by

We need to find the equation of the line between and .The slope of this line is given by

Thus, the pointβslope equation of this line is which we can write in general form as

We can then find the height of the parallelogram by setting , , , , and :

Finally, we multiply the base length by the height to find the area:

Letβs finish by recapping some of the key points of this explainer.

### Key Points

- The perpendicular distance is the shortest distance between a point and a line.
- The perpendicular distance, , between the point and the line : is given by
- We can find the distance between two parallel lines by finding the perpendicular distance between any point on one line and the other line.