# Finding the Similarity Transform of a rotation matrix

I have a matrix equation as follows from a sensor calibration problem. At the heart of this problem is a number of 3x3 rotation matrices:

$\mathbf{R}_{b1}^{b2} = \mathbf{R}_{v}^{b} \mathbf{R}_{v1}^{v2} (\mathbf{R}_{v}^{b})^T$

where the following is known: $\mathbf{R}_{v1}^{v2} = \begin{pmatrix} -1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$

And the matrix $\mathbf{R}_{b1}^{b2}$ has already been estimated (and is necessarily symmetric)

What I would like to do is to estimate $\mathbf{R}_{b}^{v}$. I'm guessing that there will be no unique solution, but even if it can be constrained to a family of solutions.

Is there anyone that would be able to give a few hints as to how to go about solving this problem?

It's taken some time, but I have found a nice solution to the problem.

Utimately, the key is in the rotation matrix: $\mathbf{R}_{v1}^{v2} = \begin{pmatrix} -1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$

As it turns out, the eigenvalues of this rotation matrix is -1, -1 and 1. We know that a similarity transform must preserve the eigenvalues, and therefore, the eigenvalues of $\mathbf{R}_{b1}^{b2}$ must also be -1, -1 and 1.

Since $\mathbf{R}_{b1}^{b2}$ is symmetric, we know that there must be an eigendecomposition as follows:

$\mathbf{A} = \mathbf{Q} \mathbf{\Lambda} \mathbf{Q}^T$.

where $\mathbf{\Lambda}$ is a diagonal matrix of eigenvalues and $\mathbf{Q}$ is an orthogonal matrix constructed from the eigenvectors of $\mathbf{A}$.

In this case $\mathbf{\Lambda} = \mathbf{R}_{v1}^{v2}$ and therefore $\mathbf{Q} = \mathbf{R}_{v}^{b}$.

Hence, calculating the eigenvectors of matrix $\mathbf{R}_{b1}^{b2}$ forms a set of possible solutions. Note that $\mathbf{Q}$ is not necessarily special orthogonal - the eigenvectors may be multipled by -1 as required to get the +1 determinate.

Of course, there will be ambiguity in the solution, but choosing which rotation matrix is correct is problem-specific.

• See also the solution from @AlbertH below, noting the eigenvector associated with the eigenvalue +1. Commented Jul 16, 2011 at 4:07

$\mathbf R_{b1}^{b2}$ is a $\pi$ rotation. You can find its axis $a$, determining the eigenvector (with norm $1$) relative to the eigenvalue $1$.
$\mathbf R_v^b$ is the rotation that transforms the $z$ axis into the $a$ axis.

This is an instance of the equation $AX=XB$ (if you right-multiply by $X = {R}_{v}^{b}$), which arises in the so-called hand-eye-calibration problem. You find here a nice list of papers of how to solve this problem.

• Actually, I really like the list of papers, but I have found a much easier way to solve this particular problem. Commented Jul 16, 2011 at 3:50