# Why do two different quaternions appear to have the same rotation?

When using a Quaternions I've noticed something I don't quite understand.

If I'm rotation $\frac{\pi}{2}$ radians on the Y axis it goes from $[0,0,0,1]$ to $[0,\sqrt{2},0,\sqrt{2}]$. A rotation of $\pi$ radians is $[0,1,0,0]$. A rotation of $\pi+\frac{\pi}{2}$ is $[0,\sqrt{2},0,-\sqrt{2}]$. A full rotation comes out to be $[0,0,0,-1]$, which, for some reason, appears to be indifferent from the $[0,0,0,1]$ quaternion I've started out with.

But if I rotate it the other way, the y axis grows "negatively". That is to say, a rotation of $-\frac{\pi}{2}$ comes out to be $[0,-\sqrt{2},0,\sqrt{2}]$, different from the one I get with a rotation of $\pi+\frac{\pi}{2}$, yet acts exactly the same.

Why are there two rotations that appear to be the same thing?

• The quaternions $q$ and $-q$ represent the same rotation. – Rahul Feb 29 '16 at 19:22
• @Rahul Why is that? – user112513312 Feb 29 '16 at 19:23
• Because rotating by $\theta$ about the axis $u$ is the same as rotating by $-\theta$ about $-u$. – Rahul Feb 29 '16 at 19:30

A rotation of angle $2\theta$ around an axis oriented by the versor $\mathbf{u}$ ( with $|\mathbf{u}|=1$) is represented by the quaternion: $$\cos \theta +\mathbf{u}\sin \theta$$
if we change: $$\theta \rightarrow - \theta \qquad \mathbf{u} \rightarrow - \mathbf{u}$$
$$\cos (-\theta)-\mathbf{u}\sin (-\theta)= \cos \theta +\mathbf{u}\sin \theta$$