Given a $3\times3$ matrix $M$, if we would like to get the closest $\mathrm{SO}(3)$ matrix $R$ that minimizes
\begin{equation}
 \|R-M\|\_F
\end{equation}


then $R$ = $UV^{T}$ where $U$ and $V^{T}$ are the orthogonal matrices from the singular value decompositon of $M$. i.e. $M = U\Sigma V^{T}$ as explained in this [answer](https://mathoverflow.net/questions/86539/closest-3d-rotation-matrix-in-the-frobenius-norm-sense). When $UV$ is not a "special" orthogonal matrix i.e. $det(UV^{T}) = -1$ we replace the singular vector $u\_3$ by $-u\_3$.


My question is why only $u\_3$ and why not any other column of $U$ or row of $V^{T}$?


(Posting this as a question instead of a comment since I don't have enough reputation yet, sorry!)



Finding the closest special orthogonal matrix in Frobenius norm sense
By right-multiplying both $R$ and $M$ by $V$ and left-multiplying by $U^T$ you are leaving the objective invariant. Now the new $M$ is diagonal (actually, it's $\Sigma$), and it's not hard to convince yourself that so should the new $R$ be. If $\det(UV^T) = -1$, then the constraint means $R$ is a diagonal matrix with $\pm 1$ as its diagonal entries, and an odd number of $-1$s. Since $\Sigma$ is nonnegative, the choice that minimizes the distance is to make the entry corresponding to the smallest diagonal entry in $\Sigma$ the sole $-1$. 


