What are dual quaternions?

Introduction

The world of mathematics is a place of boundless beauty and wonder, where abstract concepts take on a life of their own and reveal hidden truths about the universe around us. Through the language of numbers, patterns, and shapes, we are able to unlock the secrets of nature and explore the very essence of reality itself. And yet, for all its complexity and depth, mathematics is a tool that is accessible to all of us, regardless of our background or experience. By embracing the childlike curiosity and sense of wonder that lies within us, we can unlock new perspectives and tap into the limitless potential of the mathematical universe. So let us journey together into the world of numbers and discover the awe-inspiring beauty that lies within.

Art and music, with their power to inspire and evoke emotions, can also play a crucial role in helping us better understand the world around us. The greatest scientists throughout history have understood this and recognized the importance of artistic expression in their work. In fact, some discoveries can only be truly understood and described through art, as there may not yet be a mathematical language to capture their essence. The beauty and complexity of art can inspire us to create new mathematical concepts and models, or at the very least, deepen our understanding of existing ones. By embracing the intersection of art and science, we can tap into the full range of human creativity and unlock new pathways to discovery.

Imaginary Numbers

One of the most fascinating and enigmatic concepts in mathematics is that of complex, or imaginary numbers. While the term imaginary may suggest something that is not real or tangible, these numbers play a vital role in our understanding of the complex and interconnected world around us. The concept of imaginary numbers was first introduced by Italian mathematician Gerolamo Cardano in the 16th century, as he sought to solve cubic equations, e.g.,

\begin{align} ax^3 + bx^2 + cx + d = 0 \label{eq:cubic} \end{align}

Reportedly, Cardano fought with the necessity to (albeit temporarily) include the root of a negative number in his derivation of a general solution to cubic polynomials (Eq. $\eqref{eq:cubic}$). Later, it was mathematician Rafael Bombelli who first provided a clear exposition of imaginary numbers, recognizing their potential to solve certain types of equations that could not be solved by real numbers alone [La Nave, Federica; Mazur, Barry (2002), "Reading Bombelli", The Mathematical Intelligencer, 24 (1): 12–21, doi:10.1007/BF03025306, S2CID 189888034]. We can describe complex numbers in the form $a + bi$, where a and b are real numbers, and i is an indeterminate satisfying $i^2 = −1$, often referred to as the imaginary number.

Since then, the concept of imaginary numbers has been further developed and refined by mathematicians such as John Wallis and Leonhard Euler, and has become a cornerstone of modern mathematics and its applications in science and engineering.

Quaternions

So, in one-dimensional space you have Real numbers, two-dimensional you have Complex numbers, in three-dimensional... we don't really have any corollary. The idea of complex numbers, which consist of a real part and an imaginary part, was a groundbreaking concept in mathematics that opened up new possibilities for solving equations and understanding the world around us. However, it was the Irish mathematician William Rowan Hamilton who took this concept even further with the development of quaternions.

Hamilton had been searching for a way to extend the idea of complex numbers to three-dimensional space, as he believed that such an extension would have significant applications in the field of mechanics. He spent years trying to find a way to represent three-dimensional rotations using only real numbers, but all of his attempts proved unsuccessful.

It was during a walk along the Royal Canal in Dublin on October 16, 1843 that Hamilton had a breakthrough. He later described the moment as a eureka moment, where he realized that he needed four dimensions to represent three-dimensional rotations. He then developed a system of hypercomplex numbers that he called quaternions, which consisted of four parts: a real part and three imaginary.

\begin{align} i^2 = j^2 = k^2 = ijk = −1 \label{eq:quaternion} \end{align}

The development of quaternions revolutionized the study of mechanics and paved the way for the development of vector analysis and other advanced mathematical concepts. Today, quaternions are used extensively in fields such as computer graphics, robotics, and aerospace engineering, among others. Hamilton's visionary work serves as a testament to the power of mathematical thinking and the boundless possibilities that emerge when we push the boundaries of our understanding.

Despite their non-intuitive nature and additional mathematical machinery, quaternions have become increasingly popular in a wide range of applications, particularly in computer graphics and robotics. One of the reasons for this is their ability to represent rotations without suffering from singularities, which can cause problems in other methods such as Euler angles.

In computer graphics, quaternions are used extensively for animation and camera control. They provide a smooth and efficient way to interpolate between different orientations, which is essential for creating realistic and visually appealing animations. In addition, quaternions are used to represent the orientation of 3D objects in virtual environments, allowing for realistic and interactive experiences.

In robotics, quaternions are used for tasks such as robot motion planning and control. They provide a compact and efficient way to represent the orientation of a robot, which is essential for tasks such as grasping and manipulation. In addition, quaternions can be used to represent the orientation of sensors, such as cameras and lidar, which are essential for navigation and perception in robotics.

Despite their limitations, quaternions have proven to be a powerful mathematical tool in a wide range of applications. They provide a compact and efficient way to represent rotations in three-dimensional space, and their ability to avoid singularities makes them a reliable and robust method for many applications. As our understanding of quaternions continues to grow, we can expect to see them used in even more applications in the future

Dual Numbers

comment: <> (Now introduce the dual numbers (Good ref: https://youtu.be/ceaNqdHdqtg). Building upon this theme of imagination and thinking beyond the rules laid out, Clifford discovers dual numbers. Similar to imaginary numbers as well, but have a basis of epsilon (called the dual number) and one. Describe the basic mathematical operations. Mention automatic differentiation as a practical application.)

Dual numbers are a type of hypercomplex numbers that are similar to complex numbers, but with an additional imaginary unit. In complex numbers, the imaginary unit is denoted by i and is defined as the square root of -1. In dual numbers, the imaginary unit is denoted by ε (epsilon) and is defined as the square root of 0 (i.e., $ε² = 0$).

The basic form of a dual number is expressed as a + bε, where a and b are real numbers. Just as with complex numbers, addition and multiplication of dual numbers is defined by the distributive, associative, and commutative laws. For example, the sum of $(a + bε)$ and $(c + dε)$ is $(a+c) + (b+d)ε$, and the product of $(a + bε)$ and $(c + dε)$ is $ac + (ad+bc)ε + bdε²$.

Dual numbers were invented by the French mathematician Joseph-Louis Lagrange in the late 18th century. Lagrange was interested in finding a way to represent infinitesimal quantities in a way that was rigorous and mathematically sound. Infinitesimals had long been used in calculus to represent small changes or deviations from a larger quantity, but they were not well understood from a rigorous mathematical standpoint.

To address this issue, Lagrange introduced the concept of dual numbers. He defined a dual number as a quantity of the form a + bε, where a and b are real numbers and ε is a new imaginary unit that represented an infinitesimal quantity. Lagrange then developed a rigorous mathematical framework for working with dual numbers, including rules for addition, multiplication, and differentiation.

One of the key features of dual numbers is their ability to represent infinitesimal quantities. Specifically, a dual number of the form a + εb represents a point in a two-dimensional plane, where a is the real part and b is the infinitesimal part. This can be useful in applications such as calculus and physics, where infinitesimals are used to represent small changes or deviations from a larger quantity.

In addition to representing infinitesimal quantities, dual numbers have several other applications. For example, they can be used to represent transformations in robotics and computer graphics, just as quaternions are used to represent rotations. They can also be used to perform automatic differentiation, a technique used in machine learning and optimization to efficiently compute gradients of functions.

Overall, dual numbers are a useful and versatile mathematical tool, with applications in a variety of fields. Their ability to represent infinitesimal quantities and perform automatic differentiation make them particularly useful in calculus, physics, and machine learning. The invention of dual numbers by Lagrange provided a rigorous mathematical foundation for working with infinitesimal quantities, which helped to resolve many of the issues and inconsistencies that had plagued calculus up to that point. Today, dual numbers continue to be an active area of research and development in mathematics and its applications.

Dual Quaternions

To improve upon the limitations of quaternions to only be able to represent 3-dof motion (i.e., just rotation), we can extrapolate using dual numbers paired with quaternions a means and mathematics to describe 6-dof motion in 3-dimensions using a construct called dual quaternions. Dual quaternions are an extension of quaternions that combine the properties of quaternions and dual numbers. They were first introduced by the mathematician William Rowan Hamilton (the discoverer of the quaternion - See Eq. $\eqref{eq:quaternion}$ - mentioned earlier).

To create dual quaternions, Hamilton simply extended the definition of a quaternion to include an additional imaginary unit that represented an infinitesimal quantity. The resulting dual quaternion is a quantity of the form

\begin{align} Q = a + bi + cj + dk + ε(A + Bi + Cj + Dk) \label{eq:dualquaternion} \end{align}

where a, b, c, and d are real numbers, i, j, and k are the standard quaternion imaginary units, and A, B, C, and D are the dual quaternion imaginary units. Some basic operations using dual quaternions are as follows:

Noting the form described in Eq. $\eqref{eq:dualquaternion}$, for a given pair of quaternions $(Q_1,Q_2)$, a dual quaternion can be written as: $$DQ=Q_1+\epsilon Q_2$$ where $\epsilon$ is the dual unit with the property $\epsilon^2=0$.

The addition of two dual quaternions $DQ_1=(Q_1+\epsilon Q_2)$ and $DQ_2=(Q_3+\epsilon Q_4)$ is defined as: $$DQ_1+DQ_2=(Q_1+Q_3)+\epsilon (Q_2+Q_4)$$

The multiplication of two dual quaternions is defined as: $$DQ_1 \times DQ_2=(Q_1 \times Q_3)+\epsilon (Q_1 \times Q_4 + Q_2 \times Q_3)$$ where $\times$ denotes quaternion multiplication.

The conjugate of a dual quaternion $DQ=(Q_1+\epsilon Q_2)$ is defined as: $$DQ^*=Q_1^*-\epsilon Q_2^*$$ where $^*$ denotes quaternion conjugation.

The norm of a dual quaternion $DQ=(Q_1+\epsilon Q_2)$ is defined as: $$|DQ|=\sqrt{Q_1^*Q_1}$$

The inverse of a non-zero dual quaternion $DQ$ is defined as:

$$DQ^{-1}=\frac{Q_1^*-\epsilon Q_2^*}{|DQ|^2}$$

Conclusion

Dual quaternions have several useful properties that make them particularly pragmatic in applications such as computer graphics and robotics. For example, they can be used to represent rigid-body transformations, such as rotations and translations, in a compact and efficient manner. They also have a natural interpretation in terms of screw theory, a branch of mathematics that deals with the geometry and mechanics of rigid bodies.

Dual quaternions also find use in other fields such as differential geometry, algebraic topology, and quantum mechanics. They are a powerful and versatile mathematical tool that continues to be an active area of research and development.

In the next article in this series, we will look at implementing the dual quaternions in a programming language to make them more useful for practical applications.

Note: This article was partially inspired by Lex Fridman podcast epsiode with mathematician, Edward Frenkel.