Friday, October 07, 2022

Abstract Algebra Adventures Part 2: Trirational numbers

Complex numbers are often written in their rectangular form \(a + bi\) where \(a\) and \(b\) are real numbers and \(i\) is an imaginary square root of \(-1\). If we visualize the real number line and the imaginary number line as the orthogonal axes of a Cartesian plane, we could say that \((a,b)\) are the complex number's Cartesian coordinates.

Another useful way to represent complex numbers is via their polar form \(re^{\theta{i}}\), which emphasizes the vector-like nature of complex numbers. In this form, \(r\) is a real number denoting the magnitude of the vector and \(\theta\) is the angle between the positive real axis and the vector. This form is related to another coordinate system: the polar coordinates; the polar coordinates in this case are \((r,\theta)\). We can convert a complex number's polar form to its rectangular form with the help of Euler's formula: \(e^{i\theta}=\cos(\theta) + i\sin(\theta)\).

This post is about a third form for complex numbers. This time, it's based on a type of homogeneous coordinates.


Definitions

By "homogeneous coordinates" I specifically mean coordinates that still represent the same point after each coordinate is scaled by the same amount. Meaning that for a set of, say, three coordinates \((a:b:c)\), we consider them to be homogeneous when \((xa:xb:xc)=(a:b:c)\) for any non-zero positive real number \(x\).

Examples of homogeneous coordinate systems are projective coordinates and barycentric coordinates. But here we will talk about something a bit different from those two.

Given \(a \in{\Bbb{R}}\) and \(b,c \in{\Bbb{R}_{>0}}\), the homogeneous coordinates \((a:b:c)\) can be represented by a complex number written in this form:

\[a*b^{\omega}*c^{\omega^2}\]

where \(\omega=-\frac{1}{2} + i\frac{\sqrt{3}}{2}\) and \(\omega^2=-\frac{1}{2} - i\frac{\sqrt{3}}{2}\) are the primitive third roots of unity.

The third roots of unity have this nice property:

\[1+\omega+\omega^2=0\]

Which means for any non-zero positive number \(x\),

\[x*x^{\omega}*x^{\omega^2}=x^{1+\omega+\omega^2}=1\]

\[\therefore{(xa)*(xb)^{\omega}*(xc)^{\omega^2}=a*b^{\omega}*c^{\omega^2}}\]

In other words, scaling all three components by the same amount does not change the value of the number. This is exactly what we expect from homogeneous coordinates \((a:b:c)\).

(The reason why I'm limiting \(b\) and \(c\) to non-zero positive reals here is because there's no widely accepted method for evaluating complex powers of a negative number or of zero. Readers could try playing with negative denominators if they wish using their own methods. I also have a section below for cases where \(b\) and/or \(c\) are complex numbers, but I want to start this off with the simpler case of real numbers.)


Trirational numbers

For convenience, we'll also use the notation \(a\unicode{x25B6}b\unicode{x25B6}c\), which we'll call a "trirational number" as an analogy to the rational numbers (see the "Comparison to fractions" section below for more on this analogy).

\[a\unicode{x25B6}b\unicode{x25B6}c\overset{\text{def}}{=}a*b^{\omega}*c^{\omega^2}\]

We'll call \(a\) the "numerator" of the trirational number while \(b\) and \(c\) are the two positive "denominators" of the trirational number.

We can also write trirational numbers vertically:

\[\begin{matrix}
a \\[-5pt]
\unicode{x25BC} \\[-5pt]
b \\[-5pt]
\unicode{x25BC} \\[-5pt]
c \\[-5pt]
\end{matrix}\quad\text{or}\quad\begin{matrix}a \\
\unicode{x25B6}b \\
\unicode{x25B6}c \\
\end{matrix}\]


Conversion between forms

Converting from a complex number's polar form to its trirational form and vice versa can be done using these formulas:

\begin{align}
re^{i\theta}&=re^{\frac{\theta}{\sqrt{3}}}\unicode{x25B6}e^{\frac{2\theta}{\sqrt{3}}}\unicode{x25B6}1 \\[10pt]
&=re^{\frac{-\theta}{\sqrt{3}}}\unicode{x25B6}1\unicode{x25B6}e^{\frac{-2\theta}{\sqrt{3}}} \\[10pt]
&=r\unicode{x25B6}e^{\frac{\theta}{\sqrt{3}}}\unicode{x25B6}e^{\frac{-\theta}{\sqrt{3}}}
\end{align}

\[a\unicode{x25B6}b\unicode{x25B6}c = \frac{a}{\sqrt{bc}} * \operatorname{exp}\left(i\operatorname{ln}\left(\frac{b}{c}\right) \frac{\sqrt{3}}{2}\right)\]

Geometric Interpretation

The above conversion formula from homogeneous form to polar form shows that if \(b\) and \(c\) are constants, then \(f(x)=x\unicode{x25B6}b\unicode{x25B6}c\) refers to a line passing through the origin and having an angle of \(\operatorname{ln}\left(\frac{b}{c}\right) \frac{\sqrt{3}}{2}\) radians from the positive real number line. The constant \(a\unicode{x25B6}b\unicode{x25B6}c\) refers to a point on that line.

When \(b\) and \(c\) are both scaled by the same constant \(s\), i.e. \(a\unicode{x25B6}sb\unicode{x25B6}sc\), then the result is still a point on the same line, though it would be somewhere else on the line if \(s\neq{1}\).

The same formula also shows the absolute value (i.e. distance from the origin) of any trirational number:

\[|a\unicode{x25B6}b\unicode{x25B6}c|=\frac{|a|}{\sqrt{bc}}\]


Multiplication

Trirational multiplication is component-wise:
\[\left(\begin{matrix}
a_1 \\[-5pt]
\unicode{x25BC} \\[-5pt]
b_1 \\[-5pt]
\unicode{x25BC} \\[-5pt]
c_1 \\[-5pt]
\end{matrix}\right)*
\left(\begin{matrix}a_2 \\[-5pt]
\unicode{x25BC} \\[-5pt]
b_2 \\[-5pt]
\unicode{x25BC} \\[-5pt]
c_2 \\[-5pt]
\end{matrix}\right)=
\begin{matrix}
a_1a_2 \\[-5pt]
\unicode{x25BC} \\[-5pt]
b_1b_2 \\[-5pt]
\unicode{x25BC} \\[-5pt]
c_1c_2 \\[-5pt]
\end{matrix}
\]

There are two ways to write the multiplicative inverse of a non-zero trirational number \(a\unicode{x25B6}b\unicode{x25B6}c\):

\[\left(\begin{matrix}
a \\[-5pt]
\unicode{x25BC} \\[-5pt]
b \\[-5pt]
\unicode{x25BC} \\[-5pt]
c \\[-5pt]
\end{matrix}\right)^{-1}=\begin{matrix}
{\operatorname{sgn}(a)}bc \\
\unicode{x25BC} \\[-5pt]
{|a|}c \\
\unicode{x25BC} \\[-5pt]
{|a|}b \\
\end{matrix}\]

\[(a\unicode{x25B6}b\unicode{x25B6}c)^{-1}=a^{-1}\unicode{x25B6}b^{-1}\unicode{x25B6}c^{-1}\]

The first way requires the absolute value of \(a\) because the denominators are positive by our definition above, while the signum function is used to preserve the sign of the original numerator.

The second way is definitely easier, as we simply take the multiplicative inverse of each component.

The multiplicative inverse has the following polar form:

\[(a\unicode{x25B6}b\unicode{x25B6}c)^{-1}=\frac{\sqrt{bc}}{a} * \operatorname{exp}\left(i\operatorname{ln}\left(\frac{c}{b}\right) \frac{\sqrt{3}}{2}\right)\]



Addition

\[\left(\begin{matrix}
a_1 \\[-5pt]
\unicode{x25BC} \\[-5pt]
b_1 \\[-5pt]
\unicode{x25BC} \\[-5pt]
c_1 \\[-5pt]
\end{matrix}\right)+
\left(\begin{matrix}a_2 \\[-5pt]
\unicode{x25BC} \\[-5pt]
b_2 \\[-5pt]
\unicode{x25BC} \\[-5pt]
c_2 \\[-5pt]
\end{matrix}\right)=\left(
\begin{matrix}
\sqrt{a_1^2+\frac{a_2^2b_1c_1}{b_2c_2}+2a_1a_2\sqrt{\frac{b_1c_1}{b_2c_2}}\cos\left(\operatorname{ln}\left(\frac{b_2c_1}{c_2b_1}\right) \frac{\sqrt{3}}{2}\right)} \\
\unicode{x25B6}{b_1*\operatorname{exp}\left(\frac{\operatorname{arctan2}\Biggl(\frac{a_2}{\sqrt{b_2c_2}}\sin\left(\operatorname{ln}\left(\frac{b_2c_1}{c_2b_1}\right) \frac{\sqrt{3}}{2}\right),\frac{a_1}{\sqrt{b_1c_1}}+\frac{a_2}{\sqrt{b_2c_2}}\cos\left(\operatorname{ln}\left(\frac{b_2c_1}{c_2b_1}\right) \frac{\sqrt{3}}{2}\right)\Biggr)}{\sqrt{3}}\right)} \\
\unicode{x25B6}{c_1*\operatorname{exp}\left(\frac{-\operatorname{arctan2}\Biggl(\frac{a_2}{\sqrt{b_2c_2}}\sin\left(\operatorname{ln}\left(\frac{b_2c_1}{c_2b_1}\right) \frac{\sqrt{3}}{2}\right),\frac{a_1}{\sqrt{b_1c_1}}+\frac{a_2}{\sqrt{b_2c_2}}\cos\left(\operatorname{ln}\left(\frac{b_2c_1}{c_2b_1}\right) \frac{\sqrt{3}}{2}\right)\Biggr)}{\sqrt{3}}\right)} \\
\end{matrix}\right)
\]

This monster of a formula was based on a Math Stack Exchange answer to a polar addition question. I'd be grateful if anyone would help me simplify this!

There are, thankfully, a couple of special cases that are much simpler:
\[\left(\begin{matrix}
a_1 \\[-5pt]
\unicode{x25BC} \\[-5pt]
b \\[-5pt]
\unicode{x25BC} \\[-5pt]
c \\[-5pt]
\end{matrix}\right)+
\left(\begin{matrix}a_2 \\[-5pt]
\unicode{x25BC} \\[-5pt]
b \\[-5pt]
\unicode{x25BC} \\[-5pt]
c \\[-5pt]
\end{matrix}\right)=\begin{matrix}a_1 + a_2 \\[-5pt]
\unicode{x25BC} \\[-5pt]
b \\[-5pt]
\unicode{x25BC} \\[-5pt]
c \\[-5pt]
\end{matrix}\]


\begin{align}
(a_1\unicode{x25B6}b_1\unicode{x25B6}b_1) + (a_2\unicode{x25B6}b_2\unicode{x25B6}b_2) &=(a_1\unicode{x25B6}b_1) + (a_2\unicode{x25B6}b_2) \\
&= (a_1/b_1) + (a_2/b_2) \\
&=\left(\frac{a_1b_2 + a_2b_1}{b_1b_2}\right) \\
&=(a_1b_2 + a_2b_1)\unicode{x25B6}b_1b_2\unicode{x25B6}b_1b_2
\end{align}

(Notice the hint about how fractions are related to trirationals.)

Someone named Azai, who I met on a math-related Discord server, came up with the following interesting formula (involving the imaginary unit \(i\)) with a little help from Wolfram Alpha:

\[\left(\begin{matrix}
1 \\[-5pt]
\unicode{x25BC} \\[-5pt]
b \\[-5pt]
\unicode{x25BC} \\[-5pt]
c \\[-5pt]
\end{matrix}\right)+
\left(\begin{matrix}1 \\[-5pt]
\unicode{x25BC} \\[-5pt]
1 \\[-5pt]
\unicode{x25BC} \\[-5pt]
1 \\[-5pt]
\end{matrix}\right)=\left(
\begin{matrix}
\sqrt{1+\left(\frac{c}{b}\right)^{i\sqrt{3}/2}}*\sqrt{1+\left(\frac{c}{b}\right)^{-i\sqrt{3}/2}} \\
\unicode{x25B6}{b*\Biggl(\left(\frac{c}{b}\right)^{-i\sqrt{3}/2} + \frac{1}{\sqrt{bc}}\Biggr)^{i/3}} \\
\unicode{x25B6}{c*\Biggl(\left(\frac{c}{b}\right)^{-i\sqrt{3}/2} + \frac{1}{\sqrt{bc}}\Biggr)^{-i/3}}
\end{matrix}\right)
\]

Given \(a_1,a_2,b_1,b_2,c_1,c_2>0\), \((a_1\unicode{x25B6}b_1\unicode{x25B6}c_1)+(a_2\unicode{x25B6}b_2\unicode{x25B6}c_2)=\left((\frac{a_1}{a_2}\unicode{x25B6}\frac{b_1}{b_2}\unicode{x25B6}\frac{c_1}{c_2})+1\right)*(a_2\unicode{x25B6}b_2\unicode{x25B6}c_2)=\left((1\unicode{x25B6}\frac{b_1/b_2}{a_1/a_2}\unicode{x25B6}\frac{c_1/c_2}{a_1/a_2})+(1\unicode{x25B6}1\unicode{x25B6}1)\right)*(a_2\unicode{x25B6}b_2\unicode{x25B6}c_2)\), so Azai's addition formula above can be used to solve more general trirational addition problems when we set \(b=\frac{b_1/b_2}{a_1/a_2}\) and \(c=\frac{c_1/c_2}{a_1/a_2}\). (Thanks to Azai for this insight!)

Lastly, the additive inverse of a non-zero trirational number \(a\unicode{x25B6}b\unicode{x25B6}c\) is simply \((-a)\unicode{x25B6}b\unicode{x25B6}c\)


Comparison to fractions

Just as the fraction of two numbers (e.g. a rational number) can represent a ratio of two numbers, so can trirational numbers represent a ratio of three numbers. This is actually the motivation behind the name "trirational number".

Also, just as how trirational numbers can be evaluated by raising each of its three components to a third root of unity and multiplying the results, the division operation can be seen as evaluating a fraction by raising both of its components to a second root of unity and multiplying the results: \(\frac{a}{b}=a^1*b^{-1}\).  Since the sum of the primitive third roots of unity is \(\omega+\omega^2=-1\), we can see that fractions can be expressed as trirational:

\[a\unicode{x25B6}b\unicode{x25B6}b=a^1*b^{\omega+\omega^2}=\frac{a}{b}\]

All this is to say that trirational numbers are a generalization of fractions. The process of evaluating a trirational number to obtain a complex number is akin to division, which is basically just evaluating a fraction to obtain a quotient. The fact that fractions use the second roots of unity while trirationals use the third roots of unity is the first clue towards further generalization of trirational numbers, but that will be for another post.


Other properties similar to fractions:

  • \(x\unicode{x25B6}1\unicode{x25B6}1=x\)
  • \(0\unicode{x25B6}x\unicode{x25B6}y=0\)
  • \(x\unicode{x25B6}0\unicode{x25B6}y\) and \(x\unicode{x25B6}y\unicode{x25B6}0\) are both undefined.



Types of Trirationals

"Proper" Trirationals

When all three components of a trirational number (including its numerator) are non-zero positive real numbers, we'll call it a proper trirational number. Such trirationals have the following properties:

  • \((x\unicode{x25B6}y\unicode{x25B6}z)^{\omega}=z\unicode{x25B6}x\unicode{x25B6}y\)
  • \((x\unicode{x25B6}y\unicode{x25B6}z)^{\omega^2}=y\unicode{x25B6}z\unicode{x25B6}x\)
  • \((x\unicode{x25B6}y\unicode{x25B6}z)^{-1}=~(x\unicode{x25B6}y\unicode{x25B6}z)^{\omega+\omega^2}=zy\unicode{x25B6}xz\unicode{x25B6}yx\)
  • \(y\unicode{x25B6}x\unicode{x25B6}y=(x/y)^{\omega}\)
  • \(y\unicode{x25B6}y\unicode{x25B6}x=(x/y)^{\omega^2}\)
Take note that any complex number can be represented as a proper trirational number.


Converting negatives to proper trirationals

A negative trirational is by definition not a proper trirational because its numerator is negative. Fortunately, you can transform any negative trirational \(-a\unicode{x25B6}b\unicode{x25B6}c\) into a proper trirational using the following:

\[-1=e^{i\pi}=1\unicode{x25B6}e^{\frac{\pi}{\sqrt{3}}}\unicode{x25B6}e^{\frac{-\pi}{\sqrt{3}}}\]

\[\therefore{-a\unicode{x25B6}b\unicode{x25B6}c=a\unicode{x25B6}b*e^{\frac{\pi}{\sqrt{3}}}\unicode{x25B6}c*e^{\frac{-\pi}{\sqrt{3}}}}\]


Simple trirationals

A simple trirational number is a proper trirational number \(a\unicode{x25B6}b\unicode{x25B6}c\) with only integer components. Any proper trirational number with only rational components can trivially be converted to a simple trirational:

\[\frac{u}{v}\unicode{x25B6}\frac{w}{x}\unicode{x25B6}\frac{y}{z}=uxz\unicode{x25B6}wvz\unicode{x25B6}yvx\]

As with simple fractions, you can reduce a simple trirational to its "lowest terms" by dividing its three components by their greatest common divisor.


Trirationals with Non-Real Components

Technically, we can also use any complex number with a non-zero imaginary part as components of trirational numbers.

\[(a_1+a_2i)\unicode{x25B6}(b_1+b_2i)\unicode{x25B6}(c_1+c_2i)\]

This is because we can use the principal value of the complex logarithm when raising such complex components to third roots of unity. Of course, in the end any complex number can be represented by proper trirationals (i.e. with positive real components), so using complex components just makes things a bit too... complex. 😁

But if you want to go even beyond complex, note that anything isomorphic to \(\Bbb{C}\) will have its own trirational homogeneous form. For example, the quaternion algebra \(\Bbb{H}\) has an infinite number of subalgebras isomorphic to \(\Bbb{C}\), so it has an infinite number of trirational variants based on different quaternion third roots of unity. You can choose any non-negative non-zero element of the quaternion algebra (or any element of any unital algebra that you can validly raise to primitive third roots of unity) as a trirational component.



Continued in Part 3.

No comments: