Why is it that with quaternions $ij \neq ji$? I've been using rotations in 3d space lately for simulations. Today I came across the quaternion, which from what I understand will be a much better alternative to my cross/dot product methods.
Now I was messing with the algebra, and I can't seem to wrap my head around how $ij$ does not equal $ji$. In elementary school, I learned to treat $i^2=-1$, and to treat it like any other variable with that caveat. So does someone have an alebraic/serious proof of how we can fairly say that $ij$ does not equal $ji$? I understand rotations aren't associative, but that doesn't explain the algebra.

Well, this emerges from the very definition, since we have the so called Hamilton rules (that's the definition of the multiplication inside the set of Quaternions)
$$
i^2=j^2=k^2=ijk=-1
$$
this means, if we multiply from the RIGHT side with $k$, then we get
$$
ijk^2=ij(-1)=-k\Leftrightarrow ij=k
$$
similarly we can get $ji$. we start again at $ijk=-1$, then we multiply from the LEFT side first with $i$ and then with $j$ and we get
$$
jiijk=(-1)(-1)k=ji(-1)\Leftrightarrow k=(-1)ji\Leftrightarrow ji=-k
$$ 
You don't have always commutation of the multiplication, for example look at the matrix multiplication, here it usually doesn't hold either that $AB=BA$ (like your rotations don't commute in general).
If you want to read some of the history behind the invention, then you might have a look to this Hamilton link (thanks to pjs36). Then you'll also see the historical connections of the Quaternions and the Complex Numbers. 
