This document can be viewed properly only in modern browsers with good support for CSS2 and the full HTML character set.

Quaternions and Linear Algebra

Prerequisites

To understand this, you will need knowledge of the complex numbers, and of matrix algebra, such as is often taught in a high school second-year algebra course, or in first-year college courses.

Nomenclature

The common use of the term vector space requires a scalar multiplication that is commutative. There is a convention only; there are studies of algebras that drop this restriction.

Since quaternion multiplication is not commutative, the quaternions, with scalar multiplication being that of the quaternions, is not properly called a vector space.

Of course, it is possible to restrict the quaternions to an algebra with scalar multiplication using only complex numbers. The restricted algebra is then the vector space of two complex numbers. But that isn’t very interesting.

The proper algebraic term for something like a vector space but with non-commutative scalar multiplication is module. By identifying the quaternions as a module, their properties that generally hold modules come to light. That identification requires of a lot of algebraic study, however.

Moreover, theory of modules does not apply to the octonions, as it requires the scalar multiplication to be associative.

inner product

The doubling procedure provides a representation of the inner product that doesn't make explicit reference to coordinate systems.

Start with the complex numbers, where any two points a and b in the plane may be regarded as complex numbers whose product is

a · b = ( a b* + b a* ) / 2 .

Apply the formula for multiplication, to obtain that for any two elements p = ( a, b ) and q = ( c, d ),

p q* = ( ac* + bd*bcda )
p*q = ( a*c + bd*,  −bc* + da* )
q p* = ( ca* + db*dabc )
q*p = ( c*a + db*,  −da* + bc* ) .

By adding these equations and applying the commutativity of the complex terms,

( p q* + p*q + q p* + q*p ) = ( 2(a*c + c*a) + 2(bd* + db*) ,  0 )
= 4 ( a · c + b · d,  0 )
= 4 p · q .

If p and q are quaternions, then

p · q = ( p q* + p*q + q p* + q*p ) / 4 .

Note that if p and q are pure complex quaternions, the factors on the right of the equation commute, so that the formula for the inner product of two complex numbers is recovered.

Furthermore, from the case p = q, equivalent expressions for the norm are recovered:

|q|2 = q · q = q q* = q*q .

Quaternion matrix algebra

The page on matrix representations of quaternions shows how either left or right multiplication by a quaternion may be represented in matrix form. Just as multiplication on the left by quaternions is algebraically closed, of the sets of matrices corresponding to left and to right quaternion multiplication is closed under matrix multiplication. Thus, the algebra of matrices corresponding to left or right multiplication each form algebras in themselves.

The block matrix representation of quaternion multiplication provides a means of studying the nature of the operation.

 
t v ·
v t Iv ×

Since the conjugate of (t, v) is (t, −v), the matrix representing right multiplication by (t, v)−1 is very easy to write down:

1 (t2 + |v|2) 1/2
 
t v ·
v t Iv ×

Quaternions as linear transformations

Some caution is advisable when interpreting the action of these transformations as quaternion multiplication. Any product of these left quaternion transforms represents the action of successive quaternion multiplications on the left, and in this sense can be considered itself multiplication by a quaternion. However, the product of a left and right quaternion transformation usually does not correspond to multiplication by a quaternion; rather, to multiplication on the left by one quaternion and on the right by a second.

From a linear algebra point of view, this is surprising, as it means that for these transformations, any mixture of left and right transformations is the same as another so long as the order of left transformations and right transformations are individually the same. That is, although the left transformations as well as the right are themselves non-commutative, the two sets of transformations commute with one another.

Another way of looking at this is that the associativity of quaternion multiplication implies commutativity between the linear transformations of left and right quaternions. If q and p are quaternions, and Q and P are the linear transformations corresponding to right multiplication by q and left multiplication by q, then the statement that p(rq) = (pr)q for all quaternions r translates into the notation of transformations as PQr = QPr for all quaternions r, that is, that PQ = QP. But here again, the product PQ does not typically correspond to a quaternion. A product of transformations corresponding to multiplications on the left and right can be viewed as multiplication by a single quaternion on the left and by another on the right, however.

The determinant of a quaternion transformation, corresponding to multiplying by a quaternion q on either side is

|q|4

Geometrically, multiplication by a quaternion corresponds to a scaling and a set of rotations of 4-space. The linear scaling increases the 4-volume by the fourth power of scaling. Furthermore, the operation somehow leaves the sense of a geometrical figure intact, so the sign of the determinant is positive. (However, there is more to this story: there is more room to move in 4-space than in the plane.)

The left-right dichotomy

The fact that quaternion multiplication is not commutative is that, for some quaternions a and b,

a bb a.

But to what extent is the operation of left multiplication different from that of right multiplication?

Viewed as a transformation of the space of quaternions, is multiplication on the left by a fixed quaternion different from any multiplication on the right? That is, for a given a, is there some other quaternion b such that for any quaternion q,

a q = q b ?

Were there such an equivalent right multiplication for a given left multiplication, the two operations would not be essentially different — only notationally different. But this is not the case.

Applying the block matrix representations of quaternion multiplication on the left and right:

 
u w ·
w u Iw ×
  =  
t v ·
v t I + v ×
 .

Evidently, this holds precisely when v = w = 0 and t = u. Since two matrix representations of a linear transformation with respect to a given basis are equal exactly when the linear transformations are identical,

Aside from the case of pure real quaternions, left multiplication by a quaternion is a different transformation than right multiplication by any quaternion.

Otherwise stated:

The set of transformations effected by left quaternion multiplication intersects the set of transformations effected by right quaternion multiplications on the set of multiplications by a real number.

That is, the two sets of transformations are essentially different. This dichotomy has a kinematical interpretation.