What are quaternions?
First, we need to check the mathematical elements that are required to describe and work with a quaternion. Without this, the quaternion is hard to understand.
Imaginary and complex numbers
If we try to solve this simple quadric equation, we are stuck if we are limited to the mathematical rules of the real numbers:
As the square of a number is always equal to or greater than zero and never negative, this equation has no result in the default mathematics world.
To be able to solve such equations, so-called imaginary numbers were introduced. The problem with equations like the one in the preceding formula is older than you may think: the basics of imaginary numbers have been known since the 15th century, and their usage was widely accepted in the 18th century.
To visualize the principle of imaginary numbers, a two-dimensional cartesian plane is used, as shown in Figure 7.1. The normal real numbers are on the horizontal x axis, while the imaginary...