Is the shortest distance between two points in Euclidean $n$-space always a straight line?

This question is related to these two questions [1] and [2].

Here is my question:

Is the shortest distance between two points in Euclidean $n$-space always a straight line?

In two dimensions, the answer is YES (?). I am unsure how to answer the same question for the case of dimension $d \geq 3$.

Added January 24 2017

For the case of Euclidean $n$-space (i.e., $\mathbb{R}^n$), the shortest distance between two points is indeed a straight line for the case $n=2$, a result which is obtained by considering the distance formula (which is an example of what we call a metric) for the length of the line segment $\overline{{P_1}{P_2}}$:

$$d(P_1, P_2) = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

where the point $P_1$ has coordinates $(x_1, y_1)$ and the point $P_2$ has coordinates $(x_2, y_2)$.

I am unsure of how to answer my question for the case of Euclidean $n$-spaces, for dimension $n \geq 3$.

Added Further

That is, given any two arbitrary points $A, B \in {\mathbb{R}}^n$, is the length of the line segment $\overline{AB}$ the shortest distance between $A$ and $B$?

I came across the term geodesic in Wikipedia, but I do not know if it is applicable to this question.

• You need to give more context to your question. Not only the dimension, but also the space (or subspace) itself is relevant to the answer. Anyway, no, straight lines are NOT the shortest objects joining two points. – Edu Jan 24 '17 at 14:58
• What's the definition of a straight line? In the Poincarre disc for example it looks "curvey", hence, Edu's remark is important... – imranfat Jan 24 '17 at 15:00
• You know that the Eucledian metric in $\mathbb{R}^n$ is $d(P_a,P_b) = \sqrt{\sum_{i=1}^{\infty} (a_i - b_i)^2}$, don't you? – Pythagoricus Jan 24 '17 at 15:09
• @JoseArnaldoBebitaDris Ok, so now we get into another trouble. What is the length of a line? Or a path? You see, if you define it via integrals, then yes. The shortest path between two points $A, B$ is a line segment between them. Can be defined as convex hull for example. – freakish Jan 24 '17 at 15:17
• With euclidean metric, if you ask the shortest distanve formally you are asking over all possible paths ( that are rectifiable, other way it's not possible to measure them) which one of them has smallest lenght, and those are well defined notions with integrals. This paths have the property that are arbitrarily well approximated by any polygonal that has vertices inside your path and that each edge is sufficiently small. So the problem is reduced to look at polygonal paths. – Santropedro Jan 24 '17 at 16:04