
Bradley T. answered 01/23/23
Tutor for Python and High School and Middle School Math
If you graph these lines, you will notice that it is two vertical lines. And you can sort of intuitively know that that shortest distance is the horizontal line segment between them. In this case 9-5 = 4
But I want to solve this problem with a more general approach, so no matter what the equation is, you can find the shortest distance between parallel lines. And that begins with a fact: The shortest distance between two parallel lines is the length of the perpendicular line segment connecting them.
If we can find the equation of a line that is perpendicular to the parallel lines, we will be half way to the solution.
In this case, the equation is x=5, and the slope is undefined. Any vertical line has an undefined slope. And the perpendicular is a horizontal line. In general, you would find the negative reciprocal of the slope.
A horizontal line has a slope of 0.
So the equation of our perpendicular line is y = 0x + b.
We want a perpendicular line, and this means we only care about the slope. The b is the y intercept, and this moves our line, but if our slope never changes, our line will always be perpendicular. This means, we can choose to make b whatever we want. Lets make b=0 because that is easiest.
y=0 is the equation of our perpendicular line.
Now, we need to find the points that intersect both the parallel lines and the perpendicular line.
- x = 5 and y = 0 There's nothing to plug in, these are our coordinates: (5,0)
- x = 9 and y = 0 Again, we just are given the coordinates: (9,0)
Now, we need to calculate the distance between these two points. A very useful formula for that is the distance formula:
Let's plug in everything into distance formula.:
And there we have our answer. d = 4
I hope you can use this to answer any and all questions of the shortest distance between parallel lines