2
$\begingroup$

Let R be a rotation matrix in three-dimensional euclidean space, R ∈ SO(3). Let v be a unit vector in said space.

Is it possible to decompose R into matrices A and B so that following holds?

  • AB = R
  • A is a rotation around the axis indicated by v

If it is possible, how can it be done?

$\endgroup$
  • 1
    $\begingroup$ $A$ is invertible; so, $B=A^{-1}R$. $\endgroup$ – Michael Galuza Jul 16 '15 at 12:32
  • 1
    $\begingroup$ So in particular, $A = I$ and $B = R$ is a solution $\endgroup$ – Niklas B. Jul 16 '15 at 12:34
  • 1
    $\begingroup$ Do you need explicit formula for rotation around $\vec v$? $\endgroup$ – Michael Galuza Jul 16 '15 at 12:45
  • 1
    $\begingroup$ This seems to be much less constrained than other procedures that are called "decomposition." Basically you can take any rotation around $v$, call it $A$, then write the matrix product $AB=R$. Are you sure there are not any additional properties you want $B$ to have, other than making this equation true? $\endgroup$ – David K Jul 16 '15 at 12:50
  • $\begingroup$ Indeed, I did not define the problem very well. I could say that I don't want B to have any rotational components around v, but I'm not sure whether that even makes sense. $\endgroup$ – Emiswelt Jul 16 '15 at 14:22
2
$\begingroup$

You already seen that $B = A^{-1} R$, but what is $A$?

Use the rotation $\varphi$ about an axis $\bf v$ formula defined as

$$ A = \mathbf{1}+(\sin\varphi) [\mathbf{v}\times] + (1-\cos\varphi) [\mathbf{v}\times][\mathbf{v}\times]$$

where $[\mathbf{v}\times]$ is the 3×3 skew symmetric cross product operator. It follows that

$$ A^{-1} = \mathbf{1}-(\sin\varphi) [\mathbf{v}\times] + (1-\cos\varphi) [\mathbf{v}\times][\mathbf{v}\times]$$

So now we have an expression for $B$ in terms of the angle $\varphi$

$$ B(\varphi) = R -(\sin\varphi) \mathbf{v}\times R + (1-\cos\varphi) \mathbf{v}\times \mathbf{v}\times R $$

To find $\varphi$ I suggest taking the trace if $B$ and maximizing it. Why? The trace of any 3×3 rotation matrix is: ${\rm trace}(R(\theta))=(1+2\cos\theta)$ with a maximum value at $\theta=0$. By maximizing the trace we are finding rotation $\varphi$ which yields the smallest rotation $B$.

NOTE:

The trace of a combined rotation is $${\rm trace}( {\rm Rot}(\mathbf{u},\varphi){\rm Rot}(\mathbf{v},\theta)) =\\ n^2+\cos\theta (1-n^2)+\cos\varphi(1-n^2+\cos\theta(1+n^2))-2(\sin\varphi\sin\theta) n$$

where $n=\mathbf{v}\cdot\mathbf{u}$ is the dot product of the two axes.

$\endgroup$
3
$\begingroup$

You can solve for $B$ as follows. Let $R$ be the rotation you specified, and $A$ be any rotation around the axis indicated by $v$. Then define $$B = A^{-1}R$$ $A$ has an inverse since all rotations do. Now $$AB = R$$

$\endgroup$
  • $\begingroup$ How is it possible to get the rotation around the axis indicated by v? Niklas B suggested using a vector w that's orthogonal to v and apply R. However, It's possible that for different w the result is different, for example when we rotate by 90° around the axis orthogonal to v and w, than A will always be I. $\endgroup$ – Emiswelt Jul 16 '15 at 12:39
  • 1
    $\begingroup$ @Emiswelt There are many possible solutions to the problem. You will find a $B$ for each $A$ you choose. $\endgroup$ – muaddib Jul 16 '15 at 12:41
  • 1
    $\begingroup$ Look up the Rodrigue's Rotation Matrix $\endgroup$ – ja72 Jul 16 '15 at 12:56
1
$\begingroup$

As the other answers note, $B = A^{-1}R$, or equivalently $BR^{-1} = A^{-1}$.

If you would like the Axis/Angle representations of $A$ and $B$ to be orthogonal (i.e. so that $AA(A) \cdot AA(B) = 0$), it is possible to do this explicitly without solving an optimization problem.

First, if $AA(A) || v$, then choose some vector $w$ s.t. $w \cdot v = 0$.

Now we want to find the matrix $B$ s.t. $BR^{-1} w \cdot v = 0$.

To do this, we first compute a (normalized) projection $p = \frac{R^{-1}w - (R^{-1}w \cdot v)v}{||R^{-1}w - (R^{-1}w \cdot v)v||}$ (Formula to project a vector onto a plane).

Now we compute $B$ to be the matrix that rotates $R^{-1}w \rightarrow p$ (Calculate Rotation Matrix to align Vector A to Vector B in 3d?).

The resulting matrix ($BR^{-1} || RB^{-1} = A$) fixes the axis $v$ by construction, and $B$ must fix an axis orthogonal to $v$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.