# The shortest path connecting three points

I have 3 points X,Y,Z, lets call them buildings.

I need to find the shortest amount of path that connects the 3 buildings, these buildings can be in any sort of shape and any distance from each other, lets call the distance between each building xy, xz, yz.

I know that the paths need to converge at a point, but I am unsure how to get there given the information I have.

If they formed an equilateral triangle it would look like (or at least I think):

    X
|
/ \
Y   Z


But they can be in any shape and that's only one of them, I need help finding the equation(s) that will give the shortest path connecting all 3 of the buildings.

I was thinking of using the Pythagorean Theorem but am not 100% sure, I was also thinking about using Lagrange Multipliers but with the information given am not sure how to implement them.

I'm just looking for a push in the right direction, I don't need the full solution (it would help but not needed.) If you need any more information about the problem I can try my best but this is about all I have.

• See if this helps. May 30, 2014 at 0:15
• Thanks, this really does help a lot! May 30, 2014 at 3:15

1. If the given triangle has an angle that exceeds ${2\pi}\over 3$, then that particular vertex itself is the point you seek. In this case, the sought-after minimum total distance is comprised of the two shortest sides.