Can Euler's identity be extended to quaternions?

One can define $e^x$, $\sin x$ and $\cos x$ in any Banach algebra by means of power series, e.g. $e^x = \sum x^n/n!$. Then, for any square root of $-1$ in the algebra (which we will denote by $i$, although there could be many, as there are in the quaternions), it is a formal consequence of the power series that $e^{ix}=\cos x + i \sin x$. Because these functions are defined via power series, this is all tautological, and there isn't really any deep significance.

There are things two that make Euler's formula interesting over the reals. First, $e^x$, $\cos x$ and $\sin x$ are usually defined by non-power series methods, and so Euler's formula expresses some sort of non-obvious relation. Second, these functions satisfy all sorts of identities which can be better understood in terms of the identity. However, when we are working over a noncommutative Banach algebra (like the quaternions or $n \times n$ matrices), we generally have that $e^{a+b}=e^a e^b$ only when $ab=ba$, and so the most useful algebraic property of $e^x$ is gone, which means that so are the interesting relations you might want.


Edit: I would like to explain the calculation done in Robert's answer in terms of what I have written above.

Let $q=a+bi+cj+dk=a+r\frac{bi+cj+dk}{r}$ where $r^2=b^2+c^2+d^2$, and we have assumed $r>0$. Note that $\frac{bi+cj+dk}{r}$ is a square root of $-1$, which we will temporarily write as $\sqrt{-1}$. Since $a$ commutes with everything, we have

$$e^q=e^{a+r\sqrt{-1}}=e^a e^{r\sqrt{-1}} = e^a( \cos(r) + \sqrt{-1} \sin(r))= e^a(\cos(r) + \frac{\sin(r)}{r}(bi+cj+dk)).$$

So we see that everything follows from the standard formula $e^{ix}=\cos x + i \sin x.$


For a quaternion $q = a + b i + c j + d k$ with $a,b,c,d$ real and $\sqrt{b^2 + c^2 + d^2} = r > 0$, we have $e^q = e^a (\cos(r) + \frac{\sin(r)}{r} (b i + c j + d k))$.


For any non-real element $\theta\in\mathbb H$ the subalgebra generated by $1$ and $\theta$ is isomorphic to complex numbers. So, yes, Euler's formula holds (it's spelled out in Robert Israel's answer) but it gives nothing new, essentially.


Regarding the second question, the revised form of Euler's identity using $\tau$ conveys strictly less information than the original identity, and still suffers from an unnatural choice of square root of $-1$ (not a big deal, except when people make claims of beauty or simplicity). In the complex world, it's more natural (to me) to define $\mathbb{Z}(1)$ as the kernel of exponentiation, and phrase Euler's identity as the statement that $\mathbb{Z}(1)$ is generated by $2\pi$ (or $\tau$) times a square root of minus one.

(One problem with the general use of this $\tau$ is that it is very cumbersome in the theory of modular forms, where $\tau$ is already reserved as the coordinate on the complex upper half-plane. One often sets $q = e^{2 \pi i \tau}$ as a Fourier series variable, and this looks very bad when you replace $2\pi$ with $\tau$.)

Regarding your first question, in a noncommutative topological ring like the quaternions, exponentiation is not a homomorphism (and the kernel is not a group). However, the real span of $1$ and $i$ (or any other choice of square root of $-1$) is isomorphic to the complex numbers, and the restriction of exponentiation to this subring is a homomorphism from the additive group to the multiplicative group. Euler's identity therefore holds, but for possibly silly reasons.


(It is rather a comment and directly follows from previous answers)

We could say briefly using Hamilton terminology:

For any “unit right quaternion” $r$ (i.e., $r=xi +yj+zk$, $x^2+y^2+z^2=1$) it is true an analogue of the Euler's identity $e^{r\pi}+1 = 0$.

Right quaternions now also called “pure imaginary”.