To understand quaternions better, I suggest you take a look at geometric algebra, see for example this video, this book, or Google around for better books/resources.
Basically, in 2D (resp 3D) a rotation by a quaterion is actually just a double reflection about two 2D lines (resp 3D planes), the rotation will be the double of the angle between the two lines (resp planes). You can easily get a feeling of that by drawing it on the piece of paper.
Furthermore, the lines (resp planes) can be rotated without changing the effect of the rotation. So if you have 4 lines (planes) for doing 2 consecutive rotations, you can always rotate the first pair so that the second line of the first pair coincides with the first line of the second pair (or vice versa = associativity). Now a reflection about two coincident lines (planes) is an identity operation, meaning that any sequence of rotations can be collapsed to a single rotation (in matrix terms, the product of matrices is a single matrix).
Likewise, a translation is a double reflection about two parallel lines (planes), the distance will be the double of the distance between the two 2D lines (3D planes). This is known as dual-quaternions. Again you can move the two lines without changing the translation, collapsing any sequence of translations into a single translation.
You can now combine these two, coming to the geometrical conclusion that any sequence of translations and rotations can collapse into a single translation and rotation, just by rotating and translating the line (plane) pairs.
A friend of mine has been working on ganja.js, a nice Javascript library for doing this an a lot more.
But be warned, geometric algebra is still considered "alternative math", not well accepted by the mainstream community, just as reactive programming was when I discovered it... It is very addictive, because it merges so many different mathematical areas into a single beautiful framework. Actually, by just starting with a linear space and adding a single property (that a geometric product * exists for which v * v is a real number), the full and rich geometric algebra follows.