Some algebra with ternary multiplication #2.
Version of Friday 20 July 2012.
Dave Barber's other pages.

Motivation. In 3-dimensional space over the reals, a famous operation is the binary cross product, which takes two vectors as input and produces one vector as output. First we define some constant column vectors, here for typographical convenience written as transposes of column vectors:

i = [ 1, 0, 0 ]T
j = [ 0, 1, 0 ]T
k = [ 0, 0, 1 ]T

If a general vector a is expanded into components as [ ax, ay, az ]T, then the cross product of a and b is written a × b, and its value is the determinant of this matrix:

 i j k ax ay az bx by bz

Equivalently,

( a × b )x = ay · bzaz · by
( a × b )y = az · bxax · bz
( a × b )z = ax · byay · bx

The cross product not associative, but is anticommutative, meaning that a × b = − b × a. If | a | denotes the Euclidean magnitude of a, then in general | a | × | b | ≠ | a × b |. Indeed, if a and b are parallel, a × b = 0.

Characteristic examples of the cross product are i × j = k, j × i = − k, and i × i = 0.

Quaternions create an associative multiplication by appending a scalar to a 3-dimensional vector and allowing the square of a vector to be a scalar, which remains zero when projected into vector space. Although not commutative, quaternion multiplication does preserve magnitudes: | p | · | q | = | p · q |.

Many generalizations of the cross product have been suggested throughout mathematics, but here we consider the product of three vectors in 4-dimensional real space. Define:

i = [ 1, 0, 0, 0 ]T
j = [ 0, 1, 0, 0 ]T
k = [ 0, 0, 1, 0 ]T
l = [ 0, 0, 0, 1 ]T

Then the cross product of a, b and c is given by the determinant of this matrix:

 i j k l aw ax ay az bw bx by bz cw cx cy cz

Here, characteristic examples are j × k × l = i, i × j × k = − l, and i × j × j = 0.

The purpose of this report is to extend this 3-factor 4-dimension cross product to a magnitude-preserving associative operation, in a manner roughly analogous to the extension of the 2-factor 3-dimension cross product into quaternions.

Official description. We introduce four particles (not necessarily vectors) named i, j, k and l — now in italics. We define, as suggested by the determinant above, 24 of the three-factor multiplication rules that we will need:

 + i = j · k · l = k · l · j = l · j · k − i = k · j · l = j · l · k = l · k · j − j = k · l · i = l · i · k = i · k · l + j = l · k · i = k · i · l = i · l · k + k = l · i · j = i · j · l = j · l · i − k = i · l · j = l · j · i = j · i · l − l = i · j · k = j · k · i = k · i · j + l = j · i · k = i · k · j = k · j · i

A product with an even number of factors is not defined; in particular it makes no sense to write ( a · b ) · c or a · ( b · c ).

The negative sign commutes freely, so ( − a ) · b · c = a · ( − b ) · c = a · b · ( − c ) = − ( a · b · c ). Also, negation on any two factors cancels, for example ( − a ) · ( − b ) · c = a · b · c.

We postulate even associativity. In a sequence of 2 · n + 1 factors [n integer], such as

a0 · a1 · a2 · a3 · … · an

three consecutive factors to be combined must have subscripts that are even-odd-even in that order. When the three factors are correctly grouped, their product has what amounts to an even subscript for further grouping. Examples:

All are equal under even associativity
a0 · a1 · a2 · a3 · a4 · a5 · a6
( a0 · a1 · a2 ) · a3 · a4 · a5 · a6
a0 · a1 · ( a2 · a3 · a4 ) · a5 · a6
a0 · a1 · a2 · a3 · ( a4 · a5 · a6 )
( a0 · a1 · a2 ) · a3 · ( a4 · a5 · a6 )
( ( a0 · a1 · a2 ) · a3 · a4 ) · a5 · a6
( a0 · a1 · ( a2 · a3 · a4 ) ) · a5 · a6
a0 · a1 · ( ( a2 · a3 · a4 ) · a5 · a6 )
a0 · a1 · ( a2 · a3 · ( a4 · a5 · a6 ) )

We will not be able to satisfy the contrasting odd associativity rule, involving the combination of three consecutive factors that have odd-even-odd subscripts, such as a0 · ( a1 · a2 · a3 ) · a4.

Now for some products where the factors are not all different. Here are some applications of the even associative law:

This…Implies this…
i · j · ( l · i · k ) = ( i · j · l ) · i · k i · j · j = − k · i · k
i · j · ( k · i · l ) = ( i · j · k ) · i · l i · j · j = − l · i · l
i · j · ( k · l · i ) = ( i · j · k ) · l · i i · j · j = l · l · i
i · j · ( l · k · i ) = ( i · j · l ) · k · i i · j · j = k · k · i
( i · l · j ) · i · k = i · l · ( j · i · k ) k · i · k = i · l · l
k · i · ( l · j · i ) = ( k · i · l ) · j · i k · i · k = j · j · i
( i · k · j ) · l · i = i · k · ( j · l · i ) l · l · i = i · k · k
( j · i · k ) · l · i = j · i · ( k · l · i ) l · l · i = − j · i · j

We introduce four more symbols, namely m, n, o and p. Write + m and − m for the positive and negative equivalents to i · j · j:

 + m = i · j · j = j · j · i = i · k · k = k · k · i = i · l · l = l · l · i − m = j · i · j = k · i · k = l · i · l

Similar calculations deliver n, o and p:

 + n = j · k · k = k · k · j = j · l · l = l · l · j = j · i · i = i · i · j − n = k · j · k = l · j · l = i · j · i + o = k · l · l = l · l · k = k · i · i = i · i · k = k · j · j = j · j · k − o = l · k · l = i · k · i = j · k · j + p = l · i · i = i · i · l = l · j · j = j · j · l = l · k · k = k · k · l − p = i · l · i = j · l · j = k · l · k

Now for the cubes:

 n = − i · j · i = − i · j · ( j · k · l ) = − ( i · j · j ) · k · l = − ( j · j · i ) · k · l = − j · j · ( i · k · l ) = + j · j · j

Similarly obtained are m = i · i · i, o = k · k · k and p = l · l · l. Trial and error revealed that setting m = i, n = j, o = k, p = l, produces even associativity.

Here is a summary of the multiplication rules, with the original 24 in blue and the 40 others in red:

Multiplication of particles
i · i · i = +i i · i · j = +j i · i · k = +k i · i · l = +l
i · j · i = −j i · j · j = +i i · j · k = −l i · j · l = +k
i · k · i = −k i · k · j = +l i · k · k = +i i · k · l = −j
i · l · i = −l i · l · j = −k i · l · k = +j i · l · l = +i
j · i · i = +j j · i · j = −i j · i · k = +l j · i · l = −k
j · j · i = +i j · j · j = +j j · j · k = +k j · j · l = +l
j · k · i = −l j · k · j = −k j · k · k = +j j · k · l = +i
j · l · i = +k j · l · j = −l j · l · k = −i j · l · l = +j
k · i · i = +k k · i · j = −l k · i · k = −i k · i · l = +j
k · j · i = +l k · j · j = +k k · j · k = −j k · j · l = −i
k · k · i = +i k · k · j = +j k · k · k = +k k · k · l = +l
k · l · i = −j k · l · j = +i k · l · k = −l k · l · l = +k
l · i · i = +l l · i · j = +k l · i · k = −j l · i · l = −i
l · j · i = −k l · j · j = +l l · j · k = +i l · j · l = −j
l · k · i = +j l · k · j = −i l · k · k = +l l · k · l = −k
l · l · i = +i l · l · j = +j l · l · k = +k l · l · l = +l
Negating a factor negates the product.

The product is negated when two unequal factors are exchanged, as with j · k · l = − j · l · k or j · i · i = − i · j · i.

Changing exactly one of the three factors assuredly changes the product. Particle multiplication almost forms a ternary quasigroup, lacking odd associativity.

Multiplication is the hard part; the rest is routine.

Using the real numbers w, x, y and z we can form quads, which are of the form w · i + x · j + y · k + z · l also written as the ordered quadruple ⟨ w, x, y, z ⟩. Components can be designated by subscripts: q = ⟨ qi, qj, qk, ql ⟩.

w1, x1, y1, z1 ⟩ + ⟨ w2, x2, y2, z2 ⟩ = ⟨ w1 + w2, x1 + x2, y1 + y2, z1 + z2

Scalar multiplication is routine:

q · w = ⟨ qi · w, qj · w, qk · w, ql · w

Satisfied is the distributive law:

( p + q ) · r · s = p · r · s + q · r · s
p · ( q + r ) · s = p · q · s + p · r · s
p · q · ( r + s ) = p · q · r + p · q · s

Consideration of the distributive law will give the rule for multiplication, which is lengthy.

Multiplication of quads, like that of particles, obeys the even associative law:

( p · q · r ) · s · t = p · q · ( r · s · t )

The magnitude of q is the usual Euclidean | q | = √ ( qi2 + qj2 + qk2 + ql2 ). Multiplication preserves magnitudes: | p · q · r | = | p | · | q | · | r |.

Although we will not develop a full theory of differentiation, we can suggest that with f, g and h as quad functions of a quad argument, it is reasonable to postulate these differentials:

d ( f + g ) = df + dg
d ( f · g · h ) = df · g · h + f · dg · h + f · g · dh