## Prerequisites

This page compares quaternion multiplication and orthogonal matrix multiplication as a means to represent rotation.

If you are not familiar with this subject you may like to look at the following pages first:

## Description

The transformations that we want to model, such as rotation and translation, are reversible so we need a mathematical algebra that is also reversible, that is we need to always find the inverse, so:

if ,

multivector a translates b into c

then we need to be able to find the inverse a^{-1} which translates c into b

one condition which meets this requirement is:

a a†=scalar_{}

as explained here.

So using the multiplication table here and multiplying out the terms of a a† gives:

e = +e*e+e1*e1+e2*e2+e3*e3+e12*e12+e31*e31+e23*e23+e123*e123

e1 = +e*e1+e1*e+e2*e12-e3*e31+e12*e2-e31*e3+e23*e123+e123*e23

e2 = +e*e2-e1*e12+e2*e+e3*e23-e12*e1+e31*e123+e23*e3+e123*e31

e3 = +e*e3+e1*e31-e2*e23+e3*e+e12*e123+e31*e1-e23*e2+e123*e12

e12 = -e*e12+e1*e2-e2*e1-e3*e123+e12*e-e31*e23+e23*e31+e123*e3

e31 = -e*e31-e1*e3-e2*e123+e3*e1+e12*e23+e31*e-e23*e12+e123*e2

e23 = -e*e23-e1*e123+e2*e3-e3*e2-e12*e31+e31*e12+e23*e+e123*e1

e123 = -e*e123-e1*e23-e2*e31-e3*e12+e12*e3+e31*e2+e23*e1+e123*e

canceling out positive and negative terms and adding equal terms (and drop the a. prefix sice all terms refer to the same multivector) gives:

scalar = e*e+e1*e1+e2*e2+e3*e3+e12*e12+e31*e31+e23*e23+e123*e123

0 = 2*e*e1+2*e2*e12-2*e3*e31+2*e23*e123

0 = 2*e*e2-2*e1*e12+2*e3*e23+2*e31*e123

0 = 2*e*e3+2*e1*e31-2*e2*e23+2*e12*e123

0 = 0

0 = 0

0 = 0

0 = 0

Luckily the last 4 equations cancel out completely and we can simplift the other equations as follows:

scalar = e^{2}+e1^{2}+e2^{2}+e3^{2}+e12^{2}+e31^{2}+e23^{2}+e123^{2}

0 = e*e1+e2*e12-e3*e31+e23*e123

0 = e*e2-e1*e12+e3*e23+e31*e123

0 = e*e3+e1*e31-e2*e23+e12*e123

One solution to these equations would be to let:

- e= -e123
- e23= e1
- e31= e2
- e12= e3

This gives:

scalar = 2*e^{2}+2*e1^{2}+2*e2^{2}+2*e3^{2}

0 = e*e1+e2*e3-e3*e2-e1*e

0 = e*e2-e1*e3+e3*e1-e2*e

0 = e*e3+e1*e2-e2*e1-e3*e

so 3 more equations cancel out and we are left with:

scalar = 2*e^{2}+2*e1^{2}+2*e2^{2}+2*e3^{2}

If we let scalar = 2 then e, e1, e2 and e3 have a unit length.

If turns out that this quantity (now consisting of 4 scalar values) has the same properties as a quaternion and so if we make it unit length as suggested it can represent a rotation transformation. However, if we want to represent an isometry (rotation and translation), we need to goto 4D multivectors as described here.

**Pure Rotation**

If all ex, ey, ez and exyz input terms set to zero gives:

e = | a.e * b.e | 0 | 0 | 0 | - a.exy * b.exy | - a.ezx * b.ezx | - a.eyz * b.eyz | 0 |

ex = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

ey = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

ez = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

exy = | a.exy * b.e | 0 | 0 | 0 | + a.e * b.exy | + a.eyz * b.ezx | - a.ezx * b.eyz | 0 |

ezx = | a.ezx * b.e | 0 | 0 | 0 | - a.eyz * b.exy | + a.e * b.ezx | + a.exy * b.eyz | 0 |

eyz = | a.eyz * b.e | 0 | 0 | 0 | + a.ezx * b.exy | - a.exy * b.ezx | + a.e * b.eyz | 0 |

exyz = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

If we include exyz back in we get: