Start with the field of real numbers R. The first generalisation of these was the field of complex numbers which is 2-dimensional over R. Next came Hamilton's quaternions H which are 4-dimensional over R. The quaternions are no longer a field but they are still a division ring.

In 1845 Cayley made a further generalisation when he created the octonions O. (In fact they were also independently invented by J.J. Graves slightly earlier.) This time O is 8-dimensional over R. A typical octonion is a 2x2 matrix

``` --  --
| a  r |
| s  b |
--  --
```
where a,b are real numbers and r,s are vectors in R3. Obviously the usual 2x2 matrix multiplication won't work here. But we can define a multiplication by the following rule:
``` --  --  --  --       --                         --
| a  r || c  t |  =  | ac - r.v       at + dr +sxv |
| s  b || v  d |     | sc + bv + rxt  bd - s.t     |
--  --  --  --       --                         --
```
Here, we are making use of two operations on R3, the dot product, (p,q) -> p.q and the cross product, (p,q) -> pxq.

In O most of the axioms for a ring still hold (the identity element is the 2x2 identity matrix) and each nonzero element has an inverse but associativity does not hold. The main interest in the octonions is that they can be used to construct g2, an important non-classical Lie algebra. (Note that the same construction will work with any base field replacing R.)