I have two quaternions, $Q_0$ and $Q_1$. I want to find the unit angular velocity vector $w$ that rotates $Q_0$ in the direction of $Q_1$ (shortest path). How can I do this?

The analog of what I want in terms of linear velocity is to take points $P_0$ and $P_1$, and find the vector $v = (P_0-P_1)/||P_0-P_1||$.

  • $\begingroup$ Are $Q_k$ full or imaginary quaternions? Same length $|Q_0|=|Q_1|$? With rotation you mean an operation $Q_1=W^{-1}Q_0W$ with $W=\cos\phi/2+w\sin\phi/2$ where $w$ is an imaginary unit quaternion? $\endgroup$ Feb 23, 2014 at 10:01
  • $\begingroup$ You can assume that they are both unit quaternions representing rotations. $\endgroup$ Feb 23, 2014 at 18:15
  • $\begingroup$ Ok, if $Q_{0,1}$ themselves are rotations, then you are looking for $Q_1=Q_0W$ or $W=Q_0^{-1}Q_1=\cos ϕ +w\sin ϕ$ and one arc from $Q_0$ to $Q_1$ is $Q(t)=Q_0(\cos(tϕ) +w\sin(tϕ))$ for $t\in[0,1]$. This is by no means unique, one could also start with $Q_1=WQ_0$ to obtain a different path. I'm not sure that in $S^3$ uniqueness of shortest paths is as simple as in $S^2$. $\endgroup$ Feb 23, 2014 at 18:43
  • $\begingroup$ No, the path is unique, and has a symmetric formulation that is independent of the computation approach. $\endgroup$ Feb 23, 2014 at 19:22

1 Answer 1


Given that $Q_0$ and $Q_1$ are unit quaternions, i.e., located on the 3-sphere $S^3$, the question for the shortest path from $Q_0$ to $Q_1$ can be rotated by left multiplication with $Q_0^{-1}$ to the question of the shortest path from $1$ to $W=Q_0^{-1}Q_1\in S^3$.

Now represent $W$ as $\cosϕ+w\sinϕ$, $ϕ\in[0,\pi]$, $|w|=1$, $Re(w)=0$, the obvious shortest arc on the sphere is given by $W(t)=\cos(tϕ)+w\sin(tϕ)$, $t\in[0,1]$. Rotating the solution back to the initial situation gives


And since $w=(Q_0^{-1}Q_1-\cosϕ)/\sinϕ$, one has the more symmetric formula



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .