Quaternion Calculator
Welcome to Omni's quaternion calculator, where we'll deal with this mysterious extension of complex numbers: the quaternions. In short, we represent them using four real values, each corresponding to one of the basic unity quaternions: , , , and . To some, they may seem like an artificial creation to make math even more tricky than it already is. To others, they are a useful tool in 3D geometry: mainly to study quaternion rotation. Unfortunately, this doesn't kill the "tricky" part, and, e.g., quaternion multiplication is not a straightforward operation.
But let's not get ahead of ourselves! We begin with where every math topic begins: with an introduction. In our case, it's the quaternion definition.
The quaternion definition
Quaternions are an extension of complex numbers. They were first introduced by the dedicated section).
, who used them to describe several properties of the three-dimensional space (for more, seeHowever, nowadays, most often, we introduce them from the algebraic point of view. Let's take a look at the formal quaternion definition.
💡 Quaternions are expressions of the form , where , , , and are arbitrary real numbers and , , and are base elements sometimes called the basic unity quaternions.
By the above quaternion definition, we see that the space is spanned by four base elements: , , , and . The three letters don't stand for any particular value: they simply denote independent base vectors. Nevertheless, if seems familiar, it well should! In fact, if the coefficients of and (i.e., and in the above quaternion definition) are both zero, then we obtain the (well-known) complex numbers! As such, we indeed obtain their extension.
More or less, Hamilton's idea was to have one expression whose individual parts (i.e., the base elements' coefficients) describe the distinct directions in a three-dimensional space. From there, he only needed to introduce operations between these new thingies. On the one hand, we'd like them to satisfy some properties and form a nice algebraic structure. On the other, the operations should be usable and have real-life explanations. After all, quaternions originated from geometry — a very real-life area of mathematics.
Now that we know what a quaternion is, we can go further. The subsequent sections describe the basic rules governing these numbers. Note how Omni's quaternion calculator lets you find all values and objects we mention. For more information on how to use the tool, see the last section.
Adding and subtracting quaternions
This one's easy. Recall from the above section that quaternions are spanned by four base elements: , , , and . As such, if we want to add or subtract two such expressions, we do it the same way as in any vector space: move from one base element to the other and add or subtract the respective coefficients of the two quaternions. And since these coefficients are simply real numbers, it boils down to the very basics of mathematics which we learned in primary school.
Plain sailing, wouldn't you say? Such addition satisfies all the reasonable properties: it's associative, commutative, and every quaternion has its opposite such that .
Unfortunately, the story is a bit more difficult for multiplication and even more so for division.
Quaternion multiplication and division
In real and complex numbers, we got used to the distributive property of multiplication over addition, so we'd like to have a similar law here. After all, quaternions are sums of four elements: the real part and the , , and parts. In other words, we want to have: