TITLE: Computing explicitly the Riemannian Distance on $GL_n^+$
QUESTION [7 upvotes]: $\newcommand{\ep}{\epsilon}$
Let  $GL_n^+$ be the Lie group of invertible $n \times n$ matrices with positive determinant. In particular it's a connected open submanifold of the Euclidean space $\mathbb{R}^{n^2}$.
Now consider it with the induced metric from $\mathbb{R}^{n^2}$. (So it's a Riemannian submanifold of $\mathbb{R}^{n^2}$).
For clarity, this means endowing $GL_n^+ $ with the pullback metric of the Euclidean metric $e$ along the inclusion $ i:GL_n^+ \to (\mathbb{R}^{n^2},e) $. Explicitly: $g_z(X,Y) =tr(X^TY)$ , where $X,Y \in T_z(GL_n^+)$.
Questions:
(1) Is there an explicit formula for the Riemannian distance between two matrices $A,B \in  GL_n^+$?
Conjecture: The Riemannian distance equals the Euclidean one.
Attempted proof: 
Since $GL_n^+$ is open in $\mathbb{R}^{n^2}$, it follows that it's a totally geodesic submanifold. (That is, all it's geodesics are geodesics in $(\mathbb{R}^{n^2},e)$, i.e they are the usual straight lines in Euclidean space).
$GL^+(\mathbb{R}^n)$ is open $\Rightarrow$ for any $A \in GL^+(\mathbb{R}^n)$, there is an Euclidean ball centered around it which is contained in $GL_n^+$. Hence, for all matrices close enough to $A$ their distance from $A$ is just the Euclidean one. (since the straight line beteen them is in our submanifold).
Now consider $A,B \in GL_n^+$. Let $\alpha:[0,1] \to GL_n^+$ be the straight line path between them. Then:
$$ \det(\alpha(t))=\det(A+t(B-A)) $$ is a polynomial in $t$ of degree $\le n$ . Hence, it has only finitely many zeroes. This implies there are no more than $n$ points $t_i$ where $\alpha(t_i)$ is not invertible. 
Hence, we only need to show we can make arbitrary small perturbations around each such 'bad' non-invertible matrix. This would imply the Riemannian distance equals the Euclidean one. 
It would be nice if someone could find a neat argument to show this maneuver is indeed possible.
Update:  This conjecture is false. The key point (as noted by Jason DeVito and loup blanc) is that the determinant is negative for non-negligible parts of the straight-line path $\alpha$. Now, by continuity argument, any path which approximates too closely the straight path must enter a region of negative determinant.
It turns out that the behaviour depends on the number of sign changes of the determinant.
Example for a case where the distance is Euclidean (a "jump" is possible): take $n=2$,$A,B=\pm Id$. Start with a path from $Id$ to $\begin{bmatrix}\ep & 0 \\ 0 & \ep\end{bmatrix}$. Then go via
(1) $t \to \begin{bmatrix}\ep & -t \\ t & \ep\end{bmatrix}$ to $\begin{bmatrix}\ep & -\ep \\ \ep & \ep\end{bmatrix}$ ($t$ goes $0 \to \ep)$ .
(2) $t \to \begin{bmatrix}t & -\ep \\ \ep & t\end{bmatrix}$ to $\begin{bmatrix}-\ep & -\ep \\ \ep & -\ep\end{bmatrix}$ ($t$ goes $\ep \to -\ep)$.
(3) $t \to \begin{bmatrix}-\ep & -t \\ t & -\ep\end{bmatrix}$ to $\begin{bmatrix}-\ep & 0 \\ 0 & -\ep\end{bmatrix}$ ($t$ goes $\ep \to 0)$ .
Now continue with straight line until reaching $-Id$.
How much this maneuver cost us?
The derivatives of the 3 broken straight paths we took were: $\begin{bmatrix}0 & -1 \\ 1 & 0\end{bmatrix}, Id , \begin{bmatrix}0 & -1 \\ 1 & 0\end{bmatrix}$. their norms are $\sqrt 2$. Hence, the total lenght is $\sqrt2 \cdot 4\ep$ which is arbitrarily small, as required.
(Also, note that the determinant was always $t^2 + \ep^2 > 0$ so we stayed in $GL_n^+$).

(2) Can we compute explicitly for a given $A \in GL_n^+$, it's distance from $SO(n)$? 
$dist(A,SO(n)) =\underset{X \in SO(n)}{\text{min}} d(A,X)$
($SO(n)$ is the special orthogonal group and the minimum exists since $SO(n)$ is compact and $d$ is continuous)
And who is the minimizer (the closest matrix to $A$ in $SO(n)$)? Is it unique?
Note: Right or Left multiplication by elements of $SO(n)$ are isometries of $GL_n^+$ with the induced metric. Thus, $d$ is left (right)-$SO(n)$ invariant.
In particular, if $ A = U\Sigma V^T $ is the SVD-dscomposition of $A$, then:
$dist(A,SO(n)) = dist(\Sigma,SO(n)) $ , where $\Sigma$ is a square, diagonal matrix whose diagonal elements are the (strictly positive) singular values of $A$.
So for the question of computing the distance from $SO(n)$ (and the minimizer) is reduced to matrices of this type. (i.e diagonal + positive entries).

REPLY [3 votes]: "Conjecture: The Riemannian distance equals the Euclidean one."

Not possible.  It would be equivalent to real matrices with Det $\geq 0$ forming a convex set, which they don't.
You can't just argue that the Det=0 locus is polynomial, which has finite intersection with any line.  The intersections can be avoided with complex coordinates, but not for a polynomial hypersurface in $R^m$, which has codimension 1 and separates the space into components.  Entire intervals of the line between points may be excluded. Geodesics between points near the hypersurface may have to crawl along the hypersurface, or take some more complicated path.