Complex Numbers and Quaternions

Complex Numbers

From the birth of algebra to the early 1500's, mathematicians struggled to solve the cubic equation,

\begin{equation} x^3+ax^2+bx+c=0 \end{equation}

As late as 1494, Luca Pacioli had declared this problem to be as difficult as the quadrature of the circle. Luckily, Pacioli was wrong and just ten years later, Scipione del Ferro struck the first blow in solving this problem. He was able to find the solution to the so called depressed cubic,

\begin{equation} x^3+bx+c=0 \end{equation}

Then in 1545, with his Ars Magna (The Great Art), Girolamo Cardano was able to show how to reduce any cubic down to the depressed cubic and thereby solve any cubic equation. A great achievement, no doubt, but arguably of equal importance was his use of the square root of a negative number. In the process of trying to answer the question of finding two numbers whose product is 40 and whose sum is 10, he arrived at the solutions,

\begin{align} 5+\sqrt{-15}\\ 5-\sqrt{-15} \end{align}


\begin{align} 5+\sqrt{-15}+5-\sqrt{-15}=10\\ (5+\sqrt{-15})(5-\sqrt{-15})=25+15=40\\ \end{align}

Although these two numbers form the answer to the proposed question, mathematicians at this time were not completely comfortable with their introduction because they did not represent a physical quantity. Let's get ourselves comfortable with these new numbers.


In order to start creating an algebra that accounts for square roots of negative numbers, we need to define how they interact with our already existing real numbers. We start by defining the imaginary unit, which we represent with $i$, as $i=\sqrt{-1}$.

If we combine this imaginary unit with the real numbers via the operations of arithmetic, we obtain what are called the complex numbers. Any complex number can be expressed in the form $a+bi$ where $a$ and $b$ are real numbers. The complex numbers are an extension of the real numbers. In other words, the real numbers are a subset of the complex numbers. This is due to the fact that every real number can be written in the form $a+bi$ where $b=0$.

Graphical Representation

Since every complex number has both a real and an imaginary part, we can represent them graphically as points in a 2D plane. We call this the complex plane. The complex plane has two axes, the real axis running horizontally and the imaginary axis running vertically.

Polar Form

As we saw previously, points in the plane can be represented by an angle and a radius. For complex numbers, this is no different. For any complex number, we can describe the angle made with the positive real axis and the distance from the origin. This distance is referred to as the modulus.
Therefore, for a complex number $c=a+bi$,

\begin{array} {rcl} \mbox{Angle}&:& \tan \theta = \frac{b}{a}\\ \mbox{Modulus}&:&|c|= \sqrt{a^2+b^2} \end{array}


Now we will look at some of the operations of algebra on these complex numbers.


To add two complex numbers, $c_1=a_1+b_1i$ and $c_2=a_2+b_2i$, we add the real parts of both numbers to obtain the real part of our sum and likewise we add the imaginary part of both numbers to obtain the imaginary part of our sum.

\begin{equation} c_1+c_2=(a_1+a_2)+(b_1+b_2)i \end{equation}

Graphically these two points in the complex plane add together in a manner similar to our 2D vector addition. As you can see below, we create our familiar parallelogram.

\begin{equation} (4+1i)+(2+3i)=(6+4i) \end{equation}

Notice that the coefficients of the real and imaginary parts are determined by a real number addition. Therefore, complex addition inherits commutativity from the real numbers. That is to say,

\begin{equation} c_1+c_2=c_2+c_1 \end{equation}

Graphically, this is equivalent to travelling on the other legs of the parallelogram.

Scalar Multiplication

To multiply a complex number by a pure real number, or scalar, we simply distribute the scalar to both parts of our complex number. That is to say,

\begin{equation} k(a+bi)= ka+kbi \end{equation}

Since this operation is based on real number multiplication, scalar multiplication is commutative. In other words,

\begin{equation} k(a+bi)=(a+bi)k \end{equation}

If we look at this result in polar form,

\begin{array} {rcl} \mbox{Angle}&:& \tan \theta = \frac{kb}{ka}=\frac{b}{a}\\ \mbox{Modulus}&:&|c|= \sqrt{k^2a^2+k^2b^2}=|k|\sqrt{a^2+b^2} \end{array}

we see that scalar multiplication does not affect $\tan \theta$, but scales the modulus by the factor $|k|$. If $k<0$, the new angle is the initial angle plus $\pi$. That is to say, our point is reflected through the origin.
An immediate result of this is


Now that we have scalar multiplication, we define subtraction to be addition of the additive inverse.

\begin{equation} c_1-c_2=c_1+(-1)c_2=(a_1+b_1i)+(-a_2-b_2i)=(a_1-a_2)+(b_1-b_2)i \end{equation}


To multiply two complex numbers we use the distributive property.

\begin{equation} c_1c_2=(a_1+b_1i)(a_2+b_2i)=a_1a_2+a_1b_2i+a_2b_1i+b_1b_2i^2 = (a_1a_2-b_1b_2)+(a_1b_2+a_2b_1)i \end{equation}


Multiplicative Inverse




Now we want to extend the idea of complex numbers to higher dimensions. A quaternion will consist of a real part and three imaginary parts. The imaginary unit i along with two new imaginary units j and k. So the general form of a quaternion is $a+bi+cj+dk$, where $a,b,c$ and $d$ are real numbers. These new imaginary units have the following property.

\begin{equation} i^2=j^2=k^2=ijk=-1 \end{equation}

This property along with quaternion multiplication can then be used to derive the following.

\begin{equation} ij=k , ji=-k \end{equation}
\begin{equation} jk=i , kj=-i \end{equation}
\begin{equation} ki=j , ik=-j \end{equation}

Scalar/Vector Notation

Since the quaternion $a+bi+cj+dk$, consists of a scalar component $a$ along with three complex components $b,c,d$ it is often written in the form $[s,\vec{v}]$ where $s=a$ and $\vec{v}=<b,c,d>$

Graphical Representation

Previously, we saw that complex numbers could be thought of as points in the complex plane. Quaternions, unfortunately are 4D objects, so although we can think of them as points in 4D space, that space is beyond our capabilities of visualization. What we can do though is view the vector portion of the quaternion as representing a point in 3D space. Letr on when we apply quaternions to 3D rotation, this is exactly the representation we will use.


Say we have the two following quaternions.

\begin{eqnarray} q_1=a_1+b_1i+c_1j+d_1k = [a_1,\vec{v_1}]\\ q_2=a_2+b_2i+c_2j+d_2k = [a_2,\vec{v_2}]\\ \end{eqnarray}


\begin{eqnarray} q_1+q_2=(a_1+b_1i+c_1j+d_1k) + (a_2+b_2i+c_2j+d_2k)\\ =(a_1+ a_2)+(b_1 + b_2)i+(c_1 + c_2)j+(d_1 + d_2)k \end{eqnarray}

Scalar Multiplication

\begin{eqnarray} tq_1=t(a_1+b_1i+c_1j+d_1k) = (ta_1+tb_1i+tc_1j+td_1k)\\ \end{eqnarray}


\begin{eqnarray} q_1-q_2=(a_1+b_1i+c_1j+d_1k) - (a_2+b_2i+c_2j+d_2k)\\ =(a_1 - a_2)+(b_1 - b_2)i+(c_1 - c_2)j+(d_1 - d_2)k \end{eqnarray}


In order to multiply two quaternions, we need to use the distributive property, much like we did for complex numbers.

\begin{eqnarray} q_1q_2=(a_1+b_1i+c_1j+d_1k) \cdot (a_2+b_2i+c_2j+d_2k)\\ =(a_1a_2)+(a_1b_2)i+(a_1c_2)j+(a_1d_2)k\\ +(b_1a_2)i+(b_1b_2)i^2+(b_1c_2)ij+(b_1d_2)ik\\ +(c_1a_2)j+(c_1b_2)ji+(c_1c_2)j^2+(c_1d_2)jk\\ +(d_1a_2)k+(d_1b_2)ki+(d_1c_2)kj+(d_1d_2)k^2\\ =(a_1a_2-b_1b_2-c_1c_2-d_1d_2)\\ +(a_1b_2+b_1a_2+c_1d_2-d_1c_2)i\\ +(a_1c_2+c_1a_2+d_1b_2-b_1d_2)j\\ +(a_1d_2+d_1a_2+b_1c_2-c_1b_2)k\\ \end{eqnarray}

This can be written more compactly using the scalar/vector notation. Say $q_1=[s_1,\vec{v_1}]$ and $q_2=[s_2,\vec{v_2}]$. Then we have,

\begin{align} q_1 \cdot q_2 = [s_1s_2-\vec{v_1} \cdot \vec{v_2},s_1 \vec{v_2}+s_2\vec{v_1}+\vec{v_1} \times \vec{v_2}] \end{align}


If $q=[s,\vec{v}]$, then we define the conjegate of $q$ to be $q^*=[s,-\vec{v}]$. An important property of conjugates is that

\begin{eqnarray} qq^*=[ss-\vec{v} \cdot -\vec{v}, -s \vec{v}+s\vec{v} + \vec{v} \times \vec{v}]\\ =[ss+|\vec{v}|^2,\vec{0}]\\ =[|q|^2,\vec{0}]\\ =|q|^2 \end{eqnarray}


\begin{align} q_1^{-1}=\frac{q_1^*}{|q_1|^2} \end{align}

Notice that in the special case where our quaternion is unit length, that is to say a unit quaternion, $q^{-1}=q^*$.



Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License