I have a matrix $M$ computed as follows: $$ M = PDQ $$
$D$ is a diagonal matrix. $M$ is not necessarily symmetric.
I estimate a rotation matrix from $M$ as follows: $$ \left(U,S,V^T\right) = \mathrm{svd}(M) $$ $$ R = VU^T$$
Determinant of $R$ is ensured to be $1$, and $R^T = R^{-1}$
This computation is part of an optimization problem with respect to $Q$ above, and as part of it, I want to compute the partial derivative $$ \frac{\partial R}{\partial Q} $$
Is there a well-defined way to compute exactly this term?