2
$\begingroup$

I'm trying to implement $\log({\bf q})$ in python, where ${\bf q} = (q_0,\ldots,q_7) \in \mathbb{O}$ is an octonion. There is a well known definition of $\log({\bf q})$ for quaternions ${\bf q} = (s,v) \in \mathbb{H}$, which essentially boils down to $$\log({\bf q}) = \left( \log(\|{\bf q}\|),\left( \frac{1}{\|v\|} \arccos \frac{s}{\|{\bf q}\|}\right)v \right) \in \mathbb{H}$$ for ${\bf q} = (s,v)$ with $v \not= 0$ (see f.i. https://math.stackexchange.com/questions/2552/the-logarithm-of-quaternion). This definition can be extended to octonions ${\bf q}$ immediately with $v = (q_1,\ldots,q_7)$. With this definition we get $\exp(\log({\bf q})) = {\bf q}$ for a wide range of ${\bf q} \in \mathbb{O}$, but unfortunately $\log(\exp({\bf q})) \not= {\bf q}$ even for many ${\bf q} \in \mathbb{H}$. Is there /can there be any definition of $\log({\bf q})$ for ${\bf q} \in \mathbb{H}$ or ${\bf q} \in \mathbb{O}$ such that $\exp(\log({\bf q})) = {\bf q}$ and $\log(\exp({\bf q})) = {\bf q}$ for a wide range of ${\bf q}$?

Edit: If $|s| > \|v\|$ for ${\bf q} = (s,v)$ (the power series can be used in principle) we get $\log(\exp({\bf q})) = {\bf q}$. But what if $|s| < \|v\|$?

$\endgroup$
6
  • 1
    $\begingroup$ There's already an issue of definition in the complex plane. However, since each quaternion lies in a conjugate of a fixed complex plane, one can glue all definitions of log on complex minus non-positive reals to define it over all on the complement of the non-positive reals. It coincides with the power series on the open unit ball around 1. $\endgroup$
    – YCor
    Commented Nov 2, 2023 at 11:33
  • 1
    $\begingroup$ Morally, the logarithm for quaternions or octonions should be defined as the (multivalued) inverse function of the corresponding exponential function, which is defined by the usual power series in both cases. In each case there ought to be the equivalent of a Riemann surface for the logarithm function, on which it is single-valued. $\endgroup$ Commented Nov 2, 2023 at 11:43
  • $\begingroup$ @YCor: I think, it's impossible to find a (maybe not everywhere continuous) function $\log$ with the desired properties. I wondering why? The function $x \to \sqrt x$ in $\mathbb{C}$ can be extended to octonions without problems. Of course there are problems at $\mathbb{C} \setminus -\mathbb{R}_+$. $\endgroup$ Commented Nov 2, 2023 at 12:16
  • $\begingroup$ Usually the standard trick here it consider the power series $\ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - ... $ this can then be defined for matrices, quaternions, and really any algebra that contains a copy of $\mathbb{N}$ $\endgroup$ Commented Nov 2, 2023 at 15:35
  • $\begingroup$ Now to extend it to all of your space, you can define a quaternion derivative much like the complex derivative and then this gives you a system of equations in $\mathbb{R}^4$ that generalizes the Cauchy Riemann Equations in $\mathbb{R}^2$. Now you have a PDE problem, given that function power series above (viewed now as a function of $\mathbb{R}^4$) you can try to "analytically" extend it in such a way that all sections of it obey the new PDE system $\endgroup$ Commented Nov 2, 2023 at 15:37

2 Answers 2

10
$\begingroup$

In characteristic zero, you can always just use the power series to define $\log(1+x)$ with a radius of convergence of $1$, since your algebras are at least power associative. It will satisfy $\exp(\log(1+x))=1+x$. But it won't have many other good properties such as taking products to sums, because of lack of commutativity. Two generator subalgebras of $\mathbb{O}$ are at least associative, but that isn't good enough.

Incidentally, it's better to write $\mathbb{H}$ instead of $\mathbb{Q}$ for Hamilton's quaternions, for reasons that I hope are obvious.

Edit: For your edited question, maybe what you're looking for is the paper of Gentili, Preselj and Vlacci, "Slice conformality and Riemann manifolds on quaternions and octonions." This paper constructs the analogue of the Riemann surface associated to $\mathbb{C}$.

$\endgroup$
7
  • $\begingroup$ Thank you, I've changed the question. Using power series is too slow. I tried the algorithm of the question for $q = (1,v)$ with $\|v\| < 1$. Here we actually have $\exp(\log(q)) = \log(\exp(q)) = q$, Which seems to indicate that power series are not needed. $\endgroup$ Commented Nov 2, 2023 at 10:33
  • $\begingroup$ It might behave well in commutative subsets of the quaternions and octonions, similar to how in matrix exponentiation $e^{A+B} = e^A e^B$ if $A,B$ commute $\endgroup$ Commented Nov 2, 2023 at 15:33
  • $\begingroup$ @DieterKadelka What do you mean "Using power series is too slow."? I am sure that library functions to calculate logs, exponential functions, trig functions and all other transcendental functions are using power series (with some clever tricks). Any formula that you will write will be calculated in the end using power series. $\endgroup$ Commented Nov 2, 2023 at 16:09
  • 1
    $\begingroup$ @OlegEroshkin Have you ever tried computing Bessel functions of the first kind $J_n(z)$? The power series converges for all $z$, but if $z$ is not small then it involves massive cancellation, and this results in poor control over rounding errors. This is why Miller's backwards recurrence algorithm was developed; this is used by Unix bc -l for example. $\endgroup$ Commented Nov 2, 2023 at 21:49
  • 1
    $\begingroup$ @DaveBenson: Thank you once again. It seems that actually no solution for this problem is possible, even for complex $x$. For instance, if $x = 1+4j$, then $(x^{10})^{0.1} \not= x$. $\endgroup$ Commented Nov 3, 2023 at 9:48
6
$\begingroup$

The group $U_q$ of unit quaternions is a Lie group. As a manifold it is diffeomorhic to the unit sphere in $\newcommand{\bR}{\mathbb{R}}$ $\bR^4$. (This group is infact isomorphic to the matrix Lie group $SU(2)$=unitary matrices with determinant $1$.)

There is an exponential map, defined by the usual power series, from the vector space $V$ of purely imaginary quaternions to $U_q$. This map is onto.

Note that any $v\in V$ satisfies $v^2=-1$ so

$$\exp(tv)=\cos t +(\sin t)v. $$

This exponential defines a diffeomorphism

$$ \big\{\; v\in V;\;\;\Vert v\Vert <\pi\;\big\}\ni v\to \exp(v) \in U_q\setminus\{-1\}.$$

Its inverse can be described explicitly in terms of the spherical coordinates on the unit sphere.

Note that if $q$ is a unit quaternion, and $q=\cos t+(\sin t) v$, $t\in [0,\pi)$,$\DeclareMathOperator{\re}{\mathbf{Re}}$ then $t=\arccos\big(\re (q)\big)$. Then

$$\tag{1} \log (q)=tv=\frac{\arccos(\re q)}{\sin(\arccos(\re q))}\big(q-\re q\big). $$

For a general quaternion $q=s+tv$, $s\in\bR$, $v\in V$, we have

$$\exp(s+tv)= e^s\big(\; \cos t +(\sin t)v\;\big). $$

If $q\neq -\Vert q\Vert$ one can then define a logarithm of $q$ in an obvious way

$$\log q=\log \Vert q\Vert+\log\big(\Vert q\Vert^{-1} q\big). $$

The paths $t\mapsto \exp(tv)$ are the geodesic in the unit spfere that start at the Norh pole. Use this analogy for octonions.

$\endgroup$
5
  • $\begingroup$ Thank you, Liviu Nicolaescu. I will try to implement your suggestions, but maybe its impossible to prisent a final answer to my problem. $\endgroup$ Commented Nov 3, 2023 at 9:59
  • $\begingroup$ What I was trying to suggest is that you are looking for the inverse of the exponential map on a rather special Rimann manifold: round sphere. The exponetial map in such case has a simple description and a simple inverse. $\endgroup$ Commented Nov 3, 2023 at 12:45
  • $\begingroup$ The formula I wrote for quaternions is valid for octonions. if $x$ is an octonioan then $x=\Vert x\Vert q$ where $q$ is a norm one octonion. To find $\log q$ of this octonion use formula (1) in my explanation without any changes. $\endgroup$ Commented Nov 3, 2023 at 15:15
  • 1
    $\begingroup$ Should $\in$ in $t \in \exp(t v)$ be $\mapsto$? $\endgroup$
    – LSpice
    Commented Jan 31 at 19:36
  • 1
    $\begingroup$ @LSpice Thanks for point this out. You are correct. $\endgroup$ Commented Feb 1 at 10:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .