# Get the translation and rotation components of a quaternion

Given a quaternion obtained by compositions of rotations and translations, is it safe to take the $3\times 3$ upper left matrix as the "full rotation" and the last column of the matrix as the "full translation" ?

Using block-matrices, I have : $$\left[ \begin{matrix} R & t\\ 0 & 1 \end{matrix} \right] = \left[ \begin{matrix} 1 & t\\ 0 & 1 \end{matrix} \right] \times \left[ \begin{matrix} R & 0\\ 0 & 1 \end{matrix} \right]$$ where $R$ would be the rotation and $t$ the translation.

Am I right?

Note that what you are describing are not quaternions, they are homogeneous transformations. A quaternion would be used to perform the same function as your $R$, however, you would not store it (or use it) as a matrix. Additionally, quaternions do not encode translations, only rotations.
• Thanks for your answer. I was quite convinced that the $4\times 4$ matrix I show is a "quaternion", welI I was mistaken. – Sylvain B. Nov 4 '16 at 15:10