Let $A\in \mathbb{R}^{n\times n}$. Its SVD is

$A=U\Sigma V^T$

We know $U$ and $V$ are orthogonal matrices. But in some practice, we require they should be rotation matrix. Note the SVD of a matrix is not unique. When can we get $U$ and $V$ as rotations?

1. If $\det A>0$, $\det UV>0$.
2. Define $E=diag(1,1,-1)$. (let’s consider 3D cases). If $U$ and $V$ are reflections, $UE$ and $VE$ are rotations.
3. If $A=U\Sigma V^T$, then $A=UE\Sigma E^TV^T$.

Hence, we can always find rotation matrix in SVD if $\det A>0$. But for $\det A=0$, I haven’t figured it out yet.

Edit: if $\det A=0$, $U$ or $V$ can either be rotation or reflection without changing the SVD. See here for a good discussion on this.

The following is an example for $\det A=0$.

A =
1     2     3
4     5     6
1     2     3
>> [U,S,V]=svd(A)
U =
-0.3619    0.6075   -0.7071
-0.8591   -0.5118    0.0000
-0.3619    0.6075    0.7071
S =
10.1961         0         0
0    1.0192         0
0         0    0.0000
V =
-0.4080   -0.8166    0.4082
-0.5633   -0.1268   -0.8165
-0.7185    0.5631    0.4082
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> V1=V*diag([1,1,-1])
V1 =
-0.4080   -0.8166   -0.4082
-0.5633   -0.1268    0.8165
-0.7185    0.5631   -0.4082
>> U*S*V1'
ans =
1.0000    2.0000    3.0000
4.0000    5.0000    6.0000
1.0000    2.0000    3.0000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> U1=U*diag([1,1,-1])
U1 =
-0.3619    0.6075    0.7071
-0.8591   -0.5118   -0.0000
-0.3619    0.6075   -0.7071
>> U1*S*V'
ans =
1.0000    2.0000    3.0000
4.0000    5.0000    6.0000
1.0000    2.0000    3.0000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
But
>> U1=U*diag([1,-1,1])
U1 =
-0.3619   -0.6075   -0.7071
-0.8591    0.5118    0.0000
-0.3619   -0.6075    0.7071
>> U1*S*V'
ans =
2.0112    2.1570    2.3027
3.1480    4.8677    6.5875
2.0112    2.1570    2.3027