# Distance Formula Question

1. Aug 26, 2012

I feel like a total noob, but my friend is reviewing distance formula and asked for my help. I can't seem to get the correct answer, which his teacher wrote as (3√5)/5

What is the distance from the line y=2x to the parallel line y=2x+3?

The vertical distance is obviously 3, but that is not what they want. When I try two different x-values, 1 for y=2x and 2 for y=2x+3, I get the following:

(1,2) for y=2x
and
(2,7) for y=2x+3

When I plug those into the distance formula I get √26:
√(2-1)^2 + (7-2)^2

It has been a long time since I did this, what am I forgetting? I am sure it is something simple...

2. Aug 26, 2012

### Mentallic

The distance between two parallel lines is defined as being the perpendicular (perpendicular to both lines) distance between the two lines. The vertical line isn't perpendicular, and the points you've chosen are making a line even more slanted than the vertical line. Draw the equations on graph paper, plot the points you suggested and notice that the line connecting the two points is far from the shortest distance between the two lines.

If you want to find the shortest distance, you're going to have to first find the gradient of the line that is perpendicular to y=2x and y=2x+3.

3. Aug 27, 2012

### Diffy

Yes, this is correct.

Step by step.

1) Find the equation of a line perpendicular to your two parallel lines.

2) Find the points of intersection. There should be two. One for the first parallel line and one for the second.

3) Find the distance between those two points.

HINT:
It doesn't matter what perpendicular line you use. So use something that will make your math a little easier :-)

Since y = 2x passes through the origin, picking a perpendicular that passes through the origin as well will make life easy.

4. Aug 27, 2012

### HallsofIvy

In general, when we talk about the distance between two extended bodies (anything other than two points), we mean the shortest of all distances between points in each set.) And, because the hypotenuse of a right triangle is longer than either leg, that is always along a line perpendicular to the bodies.

5. Aug 27, 2012

### Bacle2

This may end up being the same as what others suggested, but you can also take

a point in one of the lines and find its orthogonal projection into the other line.

6. Aug 27, 2012

### willem2

Or you can just use calculus.

A point on the y = 2x +3 line, will have coordinates (x, 2x+3)
The distance from (x, 2x+3) to the point (0,0) on the other line is

$$\sqrt {x^2 + (2x+3)^2} = \sqrt{ 5x^2 + 12x + 9}$$

If the distance is at a minimum, the square of the distance will also be at a minium,
so you can ignore the square root, and you can differentiate 5x^2 + 12x + 9
and set the result to 0, to get a minimum"

10x + 12 = 0, so x = -6/5 and the point is (-6/5, 3/5)

The distance from this point to (0,0) is

$$\sqrt {\frac {36}{25} + \frac { 9} {25}} = \sqrt {\frac {9} {5}} = \frac {3 \sqrt{5}} {5}$$

7. Aug 28, 2012

### azizlwl

Gradient of perpendicular line to y=2x and y=2x+3 is -1/2(mn=-1).
At x=0, their distance vertically is 3.

Tanθ=-1/2, Cos(θ-90)=1/√5
Distance =3.1/√5 = 3/√5 =(3√5)/5

Last edited: Aug 28, 2012