2

I would like to know how to write quaternions as polar form. Because I heard that if $A$ and $B$ are elements of $C$, this can be done with the form $A \cdot e^{B \cdot j}$.

But how can I do that? Can I do it like this

$ \begin{align*} a + b \cdot i + c \cdot j + d \cdot k &= \sqrt{\left( a + b \cdot i \right)^{2} + \left( c + d \cdot i \right))^{2}} \cdot \exp\left( \tan^{-1}\left( \frac{c + d \cdot i}{a + b \cdot i} \right) \cdot j \right)\\ \end{align*} $?

The Art Of Repetition
  • 2,428
  • 1
  • 7
  • 34
  • 4
    Hint: show that if $b^2+c^2+d^2=1$, then $(bi+cj+dk)^2=-1$. Use that to show that, if $b^2+c^2+d^2=1$, then $$e^{(bi+cj+dk)\theta}=\cos\theta+ (bi+cj+dk)\sin\theta$$ – Akiva Weinberger Jan 08 '23 at 01:10
  • Thank you! I think that is helpful. – DoxxTheMathGeek Jan 08 '23 at 09:41
  • If you have any questions, please always show us your attempts and thoughts behind the problem so that we can really help you and not just solve the task for you. SE also has quite "high standards", which should also be maintained. – The Art Of Repetition Jan 22 '23 at 02:37

1 Answers1

3

How to convert Quaternions into Polar form?

In general if you have a quaternion $q$ with $ q = q_{w} + q_{x} \cdot \mathrm{i} + q_{y} \cdot \mathrm{j} + q_{z} \cdot \mathrm{k} $, you can write it as $ q = \left| q \right| \cdot \exp\left( \theta \cdot \left( \cos\left( \varphi_{x} \right) \cdot \mathrm{i} + \cos\left( \varphi_{y} \right) \cdot \mathrm{j} + \cos\left( \varphi_{z} \right) \cdot \mathrm{k} \right) \right) $ where $ \left| q \right| = \sqrt{q_{w}^{2} + q_{x}^{2} + q_{y}^{2} + q_{z}^{2}} $.

We already know from studying quaternions in spatial rotation that $ e^{\theta \cdot \left( u_{x} \cdot \mathrm{i} + u_{y} \cdot \mathrm{j} + u_{z} \cdot \mathrm{k} \right)} = \cos\left( \theta \right) + \left( u_{x} \cdot \mathrm{i} + u_{y} \cdot \mathrm{j} + u_{z} \cdot \mathrm{k} \right) \cdot \sin\left( \theta \right) $ so we get $ q = \left| q \right| \cdot \left( \cos\left( \theta \right) + \left( \cos\left( \varphi_{x} \right) \cdot \mathrm{i} + \cos\left( \varphi_{y} \right) \cdot \mathrm{j} + \cos\left( \varphi_{z} \right) \cdot \mathrm{k} \right) \cdot \sin\left( \theta \right) \right) $.

If we compare the ral parts of both sides of the equation of the quaternion (the one in the algebraic form and the one in the polar form), we get: $$ \begin{align*} q = q_{w} + q_{x} \cdot \mathrm{i} + q_{y} \cdot \mathrm{j} + q_{z} \cdot \mathrm{k} ~&\wedge ~q = \left| q \right| \cdot \left( \cos\left( \theta \right) + \left( \cos\left( \varphi_{x} \right) \cdot \mathrm{i} + \cos\left( \varphi_{y} \right) \cdot \mathrm{j} + \cos\left( \varphi_{z} \right) \cdot \mathrm{k} \right) \cdot \sin\left( \theta \right) \right)\\ \end{align*} $$ $$ \begin{align*} q_{w} + q_{x} \cdot \mathrm{i} + q_{y} \cdot \mathrm{j} + q_{z} \cdot \mathrm{k} &= \left| q \right| \cdot \left( \cos\left( \theta \right) + \left( \cos\left( \varphi_{x} \right) \cdot \mathrm{i} + \cos\left( \varphi_{y} \right) \cdot \mathrm{j} + \cos\left( \varphi_{z} \right) \cdot \mathrm{k} \right) \cdot \sin\left( \theta \right) \right)\\ q_{w} + q_{x} \cdot \mathrm{i} + q_{y} \cdot \mathrm{j} + q_{z} \cdot \mathrm{k} &= \left| q \right| \cdot \cos\left( \theta \right) + \left| q \right| \cdot \left( \cos\left( \varphi_{x} \right) \cdot \mathrm{i} + \cos\left( \varphi_{y} \right) \cdot \mathrm{j} + \cos\left( \varphi_{z} \right) \cdot \mathrm{k} \right) \cdot \sin\left( \theta \right) \quad\mid\quad \Re\left( \right)\\ \Re\left( q_{w} + q_{x} \cdot \mathrm{i} + q_{y} \cdot \mathrm{j} + q_{z} \cdot \mathrm{k} \right) &= \Re\left( \left| q \right| \cdot \cos\left( \theta \right) + \left| q \right| \cdot \left( \cos\left( \varphi_{x} \right) \cdot \mathrm{i} + \cos\left( \varphi_{y} \right) \cdot \mathrm{j} + \cos\left( \varphi_{z} \right) \cdot \mathrm{k} \right) \cdot \sin\left( \theta \right) \right)\\ q_{w} &= \left| q \right| \cdot \cos\left( \theta \right) \quad\mid\quad \div \left| q \right|\\ \frac{q_{w}}{\left| q \right|} &= \cos\left( \theta \right) \quad\mid\quad \arccos\left( \right)\\ \arccos\left( \frac{q_{w}}{\left| q \right|} \right) &= \arccos\left( \cos\left( \theta \right) \right)\\ \arccos\left( \frac{q_{w}}{\left| q \right|} \right) &= \theta\\ \theta &= \arccos\left( \frac{q_{w}}{\left| q \right|} \right)\\ \end{align*} $$

So all we have to do is $ \varphi_{x} $, $ \varphi_{y} $ and $ \varphi_{z} $ determine. In fact, we can do this with all components of the quaternions: $$ \begin{align*} q_{w} + q_{x} \cdot \mathrm{i} + q_{y} \cdot \mathrm{j} + q_{z} \cdot \mathrm{k} &= \left| q \right| \cdot \left( \cos\left( \theta \right) + \left( \cos\left( \varphi_{x} \right) \cdot \mathrm{i} + \cos\left( \varphi_{y} \right) \cdot \mathrm{j} + \cos\left( \varphi_{z} \right) \cdot \mathrm{k} \right) \cdot \sin\left( \theta \right) \right)\\ q_{w} + q_{x} \cdot \mathrm{i} + q_{y} \cdot \mathrm{j} + q_{z} \cdot \mathrm{k} &= \left| q \right| \cdot \cos\left( \theta \right) + \left| q \right| \cdot \cos\left( \varphi_{x} \right) \cdot \mathrm{i} \cdot \sin\left( \theta \right) + \left| q \right| \cdot \cos\left( \varphi_{y} \right) \cdot \mathrm{j} \cdot \sin\left( \theta \right) + \left| q \right| \cdot \cos\left( \varphi_{z} \right) \cdot \mathrm{k} \cdot \sin\left( \theta \right) \quad\mid\quad \dot\Im\left( \right)\\ \dot\Im\left( q_{w} + q_{x} \cdot \mathrm{i} + q_{y} \cdot \mathrm{j} + q_{z} \cdot \mathrm{k} \right) &= \dot\Im\left( \left| q \right| \cdot \cos\left( \theta \right) + \left| q \right| \cdot \cos\left( \varphi_{x} \right) \cdot \mathrm{i} \cdot \sin\left( \theta \right) + \left| q \right| \cdot \cos\left( \varphi_{y} \right) \cdot \mathrm{j} \cdot \sin\left( \theta \right) + \left| q \right| \cdot \cos\left( \varphi_{z} \right) \cdot \mathrm{k} \cdot \sin\left( \theta \right) \right)\\ q_{a} &= \cos\left( \varphi_{a} \right) \cdot \sqrt{\left| q \right|^{2} - q_{w}^{2}}\\ q_{a} &= \cos\left( \varphi_{a} \right) \cdot \sqrt{\left| q \right|^{2} - q_{w}^{2}} \quad\mid\quad \div \left( \sqrt{\left| q \right|^{2} - q_{w}^{2}} \right)\\ \frac{q_{a}}{\sqrt{\left| q \right|^{2} - q_{w}^{2}}} &= \cos\left( \varphi_{a} \right) \quad\mid\quad \arccos\left( \right)\\ \arccos\left( \frac{q_{a}}{\sqrt{\left| q \right|^{2} - q_{w}^{2}}} \right) &= \arccos\left( \cos\left( \varphi_{a} \right) \right)\\ \arccos\left( \frac{q_{a}}{\sqrt{\left| q \right|^{2} - q_{w}^{2}}} \right) &= \varphi_{a}\\ \varphi_{a} &= \arccos\left( \frac{q_{a}}{\sqrt{\left| q \right|^{2} - q_{w}^{2}}} \right)\\ \end{align*} $$

Can I do it like this $ a + b \cdot i + c \cdot j + d \cdot k = \sqrt{\left( a + b \cdot \mathrm{i} \right)^{2} + \left( c + d \cdot i \right))^{2}} \cdot \exp\left( \tan^{-1}\left( \frac{c + d \cdot \mathrm{i}}{a + b \cdot i} \right) \cdot \mathrm{j} \right) $?

Nope, because the formula is unfortunately not correct. You can easily disprove the formula with the simple counterexample $ a = 0 = b $: $$ \begin{align*} &\text{counterexample } a = 0 = b\\ &\quad 0 + 0 \cdot i + c \cdot j + d \cdot k = \sqrt{\left( 0 + 0 \cdot \mathrm{i} \right)^{2} + \left( c + d \cdot i \right))^{2}} \cdot \exp\left( \tan^{-1}\left( \frac{c + d \cdot \mathrm{i}}{0 + 0 \cdot i} \right) \cdot \mathrm{j} \right)\\ &\quad 0 + 0 \cdot i + c \cdot j + d \cdot k = \sqrt{\left( 0 + 0 \cdot \mathrm{i} \right)^{2} + \left( c + d \cdot i \right))^{2}} \cdot \exp\left( \tan^{-1}\left( \underbrace{\frac{c + d \cdot \mathrm{i}}{0}}_{\text{Division by } 0 \text{ is not defined!}} \right) \cdot \mathrm{j} \right)\\ \end{align*} $$ But of course also bring quaternions into the polar form $ A \cdot e^{B \cdot \mathrm{j}} $ (which is discussed here).

The Art Of Repetition
  • 2,428
  • 1
  • 7
  • 34
  • 1
    I'm not checking all of these steps, but this answer seems unnecessarily complicated to arrive at an answer that doesn't seem to be standard. The answers at the duplicated question give a more direct answer. – Brick Jul 02 '24 at 18:23
  • @Brick In short, I simply set a quaternion in normal form equal to the form $|q| e^{...i + ...j + ...k}$ and then solve for the individual components (I hope that helps more). But yes: It would be easier, for example, using the relation $q=e^{\ln(q)}$ or by omitting the $\cos$ around the angles in the exponent. If anyone wants more reference, see this question. – The Art Of Repetition Jul 02 '24 at 18:55
  • I know the answer - No problem with that. This is an unconventional derivation, and I'm not sure that you actually arrived at the right answer at all. With respect to your last comment though - That is definitely wrong. There should be no log in the final answer. – Brick Jul 02 '24 at 18:58
  • @Brick With that I meant using the identity and then taking the logarithm of the quaternion: $q=e^{\ln(q)}=e^{\ln(|q|)+\frac{v}{|v|}\arccos(\frac{s}{|q|})}=|q|e^{\frac{v}{|v|}\arccos(\frac{s}{|q|})}$ where $s$ is the scalar part of $q$ and $v$ is the vector part of $q$. – The Art Of Repetition Jul 02 '24 at 19:07
  • Look at the answer by Emilio Novati on the other question. That's the conventional derivation and correct answer. Your expressions might simplify to that, but I increasingly doubt it with each new comment you've put up. – Brick Jul 02 '24 at 19:09