Theorem

This means that if going through an intermediate point creates a longer path than the direct route, that path cannot be the shortest path and therefore does not need to be considered when finding the shortest path.
Triangle inequality
In mathematics, the triangle inequality states that for any triangle, the sum of the lengths of any two sides must be greater than or equal to the length of the remaining side. This statement permits the inclusion of degenerate triangles, but some authors, especially those writing about elementary geometry, will exclude this possibility, thus leaving out the possibility of equality. If a, b, and c are the lengths of the sides of a triangle then the triangle inequality states that
https://en.wikipedia.org/wiki/Triangle_inequality

Seonglae Cho