What is the shortest distance between the line 2 x − y + 1 = 0 and the point ( 2 , 1 ) ? There are many different methods to solve this problem, some more elegant than others, but all worthy of consideration.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The equation of the line is
y − 1 = 2 x
The equation of a circle of radius r centered at ( 1 , 2 ) is
( y − 1 ) 2 = r 2 − ( x − 2 ) 2
We solve for x to find the intersection points in terms of r , getting
x = 5 1 ( 2 ± 5 r 2 − 1 6 )
For this circle to be tangent to the line, the radical needs to vanish, which is true if
r = 5 4 5
Edit: Another approach:
At
x
=
2
, the point on the line is
(
2
,
5
)
.
At
y
=
1
, the point on the line is
(
0
,
1
)
.
The distance between the two points is
2
5
.
The area of the right triangle formed by the
3
points is
4
.
The altitude of the triangle from the hypotenuse is
5
4
5
, which, of course, is the minimum distance we seek.
Nice Solution. Out of all the methods, I would argue that the simplest, but not necessarily the most interesting, is finding the equation of a perpendicular to the given line that passes through A, find the point of intersection, and then use the distance formula.
Log in to reply
Hey, but didn't you want to see all the different ways this could be figured out?
Log in to reply
Of course! I have a pretty interesting solution using similar triangles, if anyone is interested.
Log in to reply
@Maxwell Feiner – Let Y be the vertical distance from the given point P ( a , b ) to the given line, X the horizontal distance and d the shortest distance. Then using similar triangles we have that
Y d = X 2 + Y 2 X ⟹ d = X 2 + Y 2 X Y .
With X = ∣ 2 b − 1 − a ∣ and Y = ∣ ( 2 a + 1 ) − b ∣ we can then calculate d .
In this case X = 2 , Y = 4 and d = 2 0 8 = 5 4 5 .
Is that roughly what you had in mind?
@Maxwell Feiner – Go for it, Maxwell! I love it when people come up with all kinds of ways of solving the same thing. Meanwhile, I've just put in yet another way to solve this, see added comment to my original answer.
sin
α
=
5
2
=
2
h
h = 5 4 = 5 4 5
Solution 2 : the shortest distance between f ( x ) = 2 x + 1 and ( 2 , 1 ) is equal to the shortest distance between f ( x ) = 2 x + 1 and g ( x ) = 2 x − 3
the vertical lenght between
f
(
x
)
and
g
(
x
)
is
∣
f
−
1
(
x
)
−
g
−
1
(
x
)
∣
=
2
and the horizontal lenght between
f
(
x
)
and
g
(
x
)
is
∣
f
(
x
)
−
g
(
x
)
∣
=
4
now
make a right triangle with those lenghts and its hypotenuse will be
2
5
. let
h
be hypotenuse's altitude(it's also the shortest distance between graphs) then:
2
5
h
=
4
⋅
2
⇒
h
=
5
4
5
It can be solved using Lagrange multipliers .
{ r 2 = ( x − 2 ) 2 + ( y − 1 ) 2 2 x − y + 1 = 0
Solving for the smallest r with 2 x − y + 1 = 0 as constraint.
F ( x , y , λ ) = ( x − 2 ) 2 + ( y − 1 ) 2 − λ ( 2 x − y + 1 )
\(\begin{array}{} \dfrac {\partial}{\partial x} F(x,y,\lambda) = 2(x-2) - 2 \lambda = 0 & \implies \lambda = x-2 & ...(1) \\ \dfrac {\partial}{\partial y} F(x,y,\lambda) = 2(y-1) + \lambda = 0 & \implies \lambda = 2-2y & ...(2) \\ \dfrac {\partial}{\partial \lambda} F(x,y,\lambda) = 2x - y + 1 = 0 & \implies 2x - y + 1 = 0 & ...(3) \end{array} \)
( 1 ) , ( 2 ) : λ ⟹ x = 4 − 2 y = x − 2 = 2 − 2 y
( 3 ) : 2 x − y + 1 8 − 4 y − y + 1 ⟹ y = 0 = 0 = 5 9 ⟹ x = 5 2
⟹ r 2 ⟹ r = ( x − 2 ) 2 + ( y − 1 ) 2 = ( 5 2 − 2 ) 2 + ( 5 9 − 1 ) 2 = 2 5 8 0 = 5 4 5
This is probably the most erudite solution so far, Chew.
If equation is ax+by+c=0 and given point is(m,n). Then shortest distance is Mod[(am+bn+c)]/root of a^2+b^2 On solving...... 2(2)+1-1/root of 2^2+1................ 4/root of 5..........on rationalisation we get 4×root 5/5
In the spirit of diversity, here's a calculus solution.
Problem Loading...
Note Loading...
Set Loading...
The shortest distance between a point and a line is between the point and the intersection of the original line and a perpendicular line, which is going through the point.
By rearranging the equation of the original line, we get:
y = 2 x + 1
The equation of the perpendicular line, going through the point (2 , 1):
y = − 0 . 5 x + 2
By solving the simultaneous equations, we will have the coordinates of the point of intersection:
(0.4 , 1.8)
Finally, the distance between these two points:
( 2 − 0 . 4 ) 2 + ( 1 − 1 . 8 ) 2 = 1 . 6 2 + ( − 0 . 8 ) 2 = 5 4 5