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.
\begin{align*} i^2=j^2=k^2=ijk&=-1\\ i^2jk&=-i\\ -jk&=-i\\ -j^2k&=-ji\\ k&=-ji \end{align*}