Quaternions vs Axis angle
Whats the use of representing rotation with quaternions compared to normal axis angle representation? I've been trying to learn quaternions and they make enough sense but as far as I can tell quaternions are just axis angle with a transformed axis and angle of rotation. How exactly does transforming the axis and angle of rotation affect the matrix instead of just representing it normally through axis angle?
I think the best way to understand the advantage of quaternions is to consider them as an extension to the three-dimensional space of the representation of rotations in the plane with complex numbers.
As a rotation of angle $\theta$ around the origin in the plane is represented, in a very simple and expressive way, by the complex number $e^{i\theta}$, so a rotation of an angle $2\theta$ in space, around an axis passing through the origin, is represented by a quaternion $e^{\mathbf{u}\theta}$, where $\mathbf{u}$ is the imaginary quaternion that correspond to the unit vector oriented along the axis of rotation. So we have the correspondence: $$ \vec{w}=R_{\mathbf{u},\theta} \; \vec{v} \quad \longleftrightarrow \quad \mathbf{w}= e^{\mathbf{u}\theta/2}\mathbf{v}e^{-\mathbf{u}\theta/2} $$
For example, given the rotation around the axis passing through the origin and the point of coordinates $(1,1,1)$ and angle $\theta=\pi/2$, it is easy to write the corresponding quaternion: $$ e^{\frac{\theta}{4}\frac{ (\mathbf{i}+\mathbf{j}+\mathbf{k})}{\sqrt{3}}} $$ which is simpler and more expressive then the corresponding matrix. And, using the properties of quaternions, we can easily prove corresponding properties for rotations, as:
reverse the versor is equivalent to reverse the rotation: $\quad e^{\theta(-\mathbf{u})}=e^{-\theta\mathbf{u}}$
rotations about the same axis commute: $\quad e^{\theta\mathbf{u}}e^{\psi\mathbf{u}}=e^{\psi\mathbf{u}}e^{\theta\mathbf{u}}=e^{(\theta+\psi)\mathbf{u}}$
but rotation about different axis don't : $ \quad \quad e^{\theta\mathbf{u}}e^{\theta\mathbf{v}}\ne e^{\theta\mathbf{v}}e^{\theta\mathbf{u}} \ne e^{\theta(\mathbf{u}+\mathbf{v})}$
and solve problems about rotations (as in Rotation Equivalence using Quaternions).
And more: we can easily see (in analogy with $U(1)$ for complex numbers) that unit quaternions form a group under multiplication, corresponding to the 3-sphere $S^3$, that is a double covering of $ SO(3,\mathbb{R})$ where the exponential $e^z$ is the canonical link between Lie algebras and Lie groups.
Obviously you can prove all these things even in the formalism of the matrices, but the use of quaternions seems more simple and expressive.
Finally, the use of quaternions is also useful from the computational point of view, because it is simple to implement and allows to avoid some problems as indicated in the Wikipedia page quoted by @Alexander Gruber.
From what I understand, a quaternion is a unit-length vector on a hyper-sphere (which is a four dimensional sphere). And if you multiply two quaternions you get a quaternion out again representing the combined rotation. You cannot do that easily with two axis/angle pairs.