Shortest distance between two points

  • #1
brotherbobby
702
163
TL;DR Summary
I am trying to convince myself that the shortest distance between two points on a plane is indeed along a straight line and not the distance along a pair of lines that join them via a third intermediary point as shown below.
1715670366681.png
I copy and paste the diagram I drew for the problem to the right. The two points in question are A and B. The vertical from B is ##d## units long and is ##s## units away from A.

What is the shortest way to go from A to B?

We expect it to be a distance of (say) ##y=\sqrt{s^2+d^2}##.

Thus, if we travel from A to B via an intermediary point C at a distance ##x## from A and extremise the path ##\text{AC}\rightarrow \text{CB}##, we should obtain ##\boxed{\boldsymbol{x=0}}## for shortest path.

Let's see.



The distance ##\small{\text{AC}+\text{CB}=y=x+\sqrt{d^2+(s-x)^2}\Rightarrow \dfrac{dy}{dx}= 1-\dfrac{s-x}{\sqrt{d^2+(s-x)^2}}}##.

For minimum (extremum, more generally), ##\small{\dfrac{dy}{dx}=0\Rightarrow \dfrac{s-x}{\sqrt{d^2+(s-x)^2}}=1\Rightarrow (s-x)^2=d^2+(s-x)^2}##.

The last expression is not true for all ##x##. I was hoping I'd get an expression that would say ##x=0##.

Where am I going wrong?
 
Last edited:
Physics news on Phys.org
  • #2
Your expression for the distance is incorrect. It should be:
$$
y = |x| + \sqrt{d^2 + (s-x)^2}
$$
This is not differentiable at ##x = 0##. Here is a plot of ##y(x)## for ##d = 2## and ##s = 1##:
1715673273173.png
 
  • #3
Apart from that, there is the triangle inequality, which is a basic result in geometry:
$$
A + B \geq C
$$
which is true for any sides of a triangle.

Edit: This is easy to show in any inner product space. Given an inner product and vectors ##\vec v = \vec u + \vec w##, it holds that
$$
v^2 = \vec v^2 = \vec u^2 + \vec w^2 + 2\vec u \cdot \vec w \leq u^2 + v^2 + 2uv = (u+v)^2
$$
 
Last edited:
  • #4
Orodruin said:
our expression for the distance is incorrect. It should be:
y=|x|+d2+(s−x)2
I didn't understand the ##|x|## bit.

(I am aware that it is not differentiable at ##x=0##)
 
  • #5
1715674269946.png

You meant to say ##A+B\ge C##, right?
 
  • #6
The first law of the butterfly, states simply that, the shortest distance between two points is a zigzag line.
 
  • #7
brotherbobby said:
I didn't understand the ##|x|## bit.

(I am aware that it is not differentiable at ##x=0##)
Your expression says that if ##x## is negative, then the line segment ##AC## has negative length. The actual length of the line segment ##AC## is the absolute value of ##x## (or ##\sqrt{x^2}## if you will, but that's the same for real numbers).

brotherbobby said:
View attachment 345212
You meant to say ##A+B\ge C##, right?
Yes, I thought I edited that out before anyone saw it ... brain jumped to Pythagoras' theorem for some reason. (Also, using the quote feature is more efficient than screen shots)
 
  • #8
Baluncore said:
The first law of the butterfly, states simply that, the shortest distance between two points is a zigzag line.
The crow has more sense.
 
  • #9
Orodruin said:
Your expression says that if x is negative, then the line segment AC has negative length. The actual length of the line segment AC is the absolute value of x (or x2 if you will, but that's the same for real numbers).
Yes, pardon me. So it's ##|x|##, and yes that invalidates my procedure even if I had put the ##|x|## correctly owing to the lack of differentiability.

Orodruin said:
Also, using the quote feature is more efficient than screen shots
I could never use the "Quote" feature here. I copy the statement and select "Reply" instead. However, copying is poor with mathematics. Let me show you.

Orodruin said:
Edit: This is easy to show in any inner product space. Given an inner product and vectors v→=u→+w→, it holds that
An example of how it looks. You, being the writer of the statement, can barely understand what's written. Not to mention that the second line which was entirely mathematicsl did not even appear.
 
  • #10
Orodruin said:
Edit: This is easy to show in any inner product space. Given an inner product and vectors v→=u→+w→, it holds that
Ok, still no luck with "Insert Quotes". The inline mathematics is garbled. The displaymath line does not appear.
A screenshot seems the only option for now.
 
  • #11
brotherbobby said:
I could never use the "Quote" feature here. I copy the statement and select "Reply" instead. However, copying is poor with mathematics. Let me show you.
Use the ”Reply” feature and delete any part you don’t want to quote.

Like so:

brotherbobby said:
Yes, pardon me. So it's ##|x|##, and yes that invalidates my procedure even if I had put the ##|x|## correctly owing to the lack of differentiability.
Not invalidate. It is still important to conclude that the function has no local extrema where differentiable. Once you know that, check the point where it is not differentiable.
 
  • #12
Orodruin said:
Apart from that, there is the triangle inequality, which is a basic result in geometry:
$$
A + B \geq C
$$
which is true for any sides of a triangle.

Edit: This is easy to show in any inner product space. Given an inner product and vectors ##\vec v = \vec u + \vec w##, it holds that
$$
v^2 = \vec v^2 = \vec u^2 + \vec w^2 + 2\vec u \cdot \vec w \leq u^2 + v^2 + 2uv = (u+v)^2
$$
Let's see how this works without me deleting anything. Only by clicking on Post Reply am I going to find out.

Yes looks alright (edit).
 

FAQ: Shortest distance between two points

What is the shortest distance between two points?

The shortest distance between two points in a Euclidean space is a straight line connecting them. This is based on the principle that a straight line is the most direct path between two locations.

How do you calculate the shortest distance between two points in a coordinate system?

To calculate the shortest distance between two points (x1, y1) and (x2, y2) in a Cartesian coordinate system, you can use the distance formula: D = √((x2 - x1)² + (y2 - y1)²).

Does the shortest distance change in three-dimensional space?

No, the principle remains the same. In three-dimensional space, the shortest distance between two points (x1, y1, z1) and (x2, y2, z2) can be calculated using the formula: D = √((x2 - x1)² + (y2 - y1)² + (z2 - z1)²).

Are there situations where the shortest distance is not a straight line?

Yes, in curved spaces or when obstacles are present, the shortest path may not be a straight line. For example, on the surface of a sphere, the shortest distance between two points is along a great circle, which is a curved path.

What is the significance of the shortest distance in real-world applications?

The concept of the shortest distance is crucial in various fields such as navigation, urban planning, and network design. It helps in optimizing routes, reducing travel time, and minimizing costs in logistics and transportation systems.

Back
Top