Quaternions
Quaternions are an extension to the real numbers. They have some similarities with Complex Numbers.
The Quaternions are denoted with the symbol .
where , , and are the basis vectors (or basis elements).
Vector Representation
where:
Matrix Representation
Complex Matrices
As Complex Matrix
Quaternion as complex matrix:
As Real Matrix
Quaternion as real matrix:
Addition
Addition is associative and commutative.
Multiplication
Basis Elements
Quaternion Multiplication (Hamilton Product)
Multiplication is associative but not commutative ().
Inner Product
Conjugation
Norm
Unit Quaternion
A unit Quaternion has the length (norm) of . It’s also called versor.
Rotation
Unit quaternions can be used to represent rotations of an angle around a unit vector .
Note: amd represent the same rotation.
Rotation Matrix
with:
- : Unit Quaternion (therefore only 3 degrees of freedom)
Note:
- corresponds to
- corresponds to
From Rotation Matrix to Quaternion
Given the rotation matrix:
Calculate the Quaternion:
and
From Quaternion to Rotation Matrix