# [seqfan] computations with certain algebras

Joerg Arndt arndt at jjj.de
Sun Nov 22 04:07:54 CET 2009

> [...]

>
> [...]
>  ... or notational trivialities (and I do mean trivialities).

This is not triviality but rather the core of the problem.
You need to understand this to make any progress.

Here is one way to implement algebras where the product
of two units is a scalar multiple of some other unit
(this is the case for e.g. the Cayley-Dickson algebras
and (unless I am mistaken) for your algebra).

Let the product i*j be A*k where i,j,k denote
units (as index of vectors) and A is a real number
(it appears the A are \in {-1,+1} for your algebra).

Create a matrix whose entry (i,j) is k
and a matrix whose entry (i,j) is A.

To multiply two elements, add up quantities
using a double loop.

If you want to have mnemonics for
the units then store them in still another matrix.
Do NOT use the mnemonics in the code itself
(use comments if you want to have them
near the calculations).

An element can be printed as a vector
or using symbols of your choice:
e.g. [3,4,0,5] for the quaternion 3+4*i+0*j+5*k.
Allow the user to choose the format
with both input and output.

> [...]
>
> Sincerely,
> Creighton
>