Addition and subtraction of octonions is done by adding and subtracting corresponding terms and hence their coefficients, like quaternions. Multiplication is more complex. Multiplication is distributive over addition, so the product of two octonions can be calculated by summing the products of all the terms, again like quaternions. The product of each pair of terms can be given by multiplication of the coefficients and a multiplication table of the unit octonions, like this one (due to Cayley, 1845, and Graves, 1843):