Quaternions in Python

Tom Loredo loredo at astro.cornell.edu
Wed Oct 10 21:24:29 CEST 2001

Johann Hibschman wrote:
> >>>>> "Erik" == Erik Max Francis <max at alcyone.com> writes:
>     Erik> You're missing the point.  Quaternions can behave
>     Erik> qualitatively differently from their corresponding matrices.
> Eh?  Say you have the Pauli spin matrices (complex 2x2 matrices), how
> on earth do those behave qualitatively different from quaternions?  As
> far as I can tell, they *are* quaternions.

Erik's point is that the Pauli matrices are not quaternions (an algebraic
abstraction), but rather provide
a matrix representation of the quaternion algebra.  You can use the
algebra simply by following its rules directly, without using the
matrix representation.  What the matrix representation buys you is
that you can implement the more complicated multiplication rule
of quanternion algebra in terms of sets of standard real multiplications.
What it may cost you (besides efficiency) is that some calculations
that are well-posed using the algebra directly become numerically
ill-posed using a particular matrix representation.  I don't know
any such operations off the top of my head, but Erik's assertion
is plausible to me.

Tom Loredo

More information about the Python-list mailing list