Assume there are , whose vectors are represented as . Their quaternions are then:

Addition and Subtraction:

The addition and subtraction of the quaternion is:

Multiplication

Quaternion multiplication is the multiplication of each item of with each item of :

The vector form is more concise:

This means that the product of two real quaternions is still real, which is consistent with real number multiplication. However, due to the last outer product, quaternion multiplication is not commutative unless and at are parallel, which means the outer product term is zero.

Length

The length of a quaternion is defined as:

The length of the product is the product of the lengths, so that the unit quaternion keeps unit length when multiplied by another unit quaternion:

Conjugate

The conjugate of a quaternion is to take the imaginary part as the opposite:

We get a real quaternion is the quaternion is multiplied by its conjugate. The real part is the square of its length:

Inverse

The inverse of the quaternion is:

According to this definition, the product of the quaternion and its inverse is the real quaternion :

If is a unit quaternion, its inverse and conjugate are the same. So the inverse of the product has properties similar to matrices:

Scalar Multiplication

Similar to vectors, quaternions can be multiplied by numbers: