Questions tagged [quaternions]

For questions about the quaternions: a noncommutative four dimensional division algebra over the real numbers. Also for questions about quaternion algebras.

The ring of quaternions is a four dimensional division algebra over the real numbers. They are usually denoted as $\Bbb H$ in honor of the discoverer, William Rowan Hamilton.

The construction of the quaternions was given by Hamilton as follows: take three symbols $\mathrm{i},\mathrm{j},\mathrm{k}$ as imaginary units and define $\mathrm{i}^2=\mathrm{j}^2=\mathrm{k}^2=\mathrm{i}\mathrm{j}\mathrm{k}=-1$. As a result, $\mathrm{i}\mathrm{j}=\mathrm{k}$, and $\mathrm{j}\mathrm{k}=\mathrm{i}$ and $\mathrm{k}\mathrm{i}=\mathrm{j}$. Furthermore, $\mathrm{j}\mathrm{i}=-\mathrm{k}$ and $\mathrm{k}\mathrm{j}=-\mathrm{i}$ and $\mathrm{i}\mathrm{k}=-\mathrm{j}$, so $\mathrm{k}\mathrm{j}\mathrm{i}=1$.

Another construction of the quaternions was given by Carl Friedrich Gauß as follows: take three symbols $\mathrm{i},\mathrm{j},\mathrm{k}$ as imaginary units and define $\mathrm{i}\circ\mathrm{i}=\mathrm{j}\circ\mathrm{j}=\mathrm{k}\circ\mathrm{k}=\mathrm{k} \circ \mathrm{j} \circ \mathrm{i}=-1$. As a result, $\mathrm{i}\circ\mathrm{j}=-\mathrm{k}$, and $\mathrm{j}\circ\mathrm{k}=-\mathrm{i}$ and $\mathrm{k}\circ\mathrm{i}=-\mathrm{j}$. Furthermore, $\mathrm{j}\circ\mathrm{i}=\mathrm{k}$ and $\mathrm{k}\circ\mathrm{j}=\mathrm{i}$ and $\mathrm{i}\circ\mathrm{k}=\mathrm{j}$, so $\mathrm{i}\circ\mathrm{j}\circ\mathrm{k}=1$.

A quaternion is a linear combination and can represented as versor

$q=q_{0} + q_{1} \mathrm{i} + q_{2} \mathrm{j} + q_{3} \mathrm{k} ~ \widehat{=} ~ \left[\begin{matrix} q_{0} \\ q_{1}\\ q_{2}\\ q_{3} \end{matrix}\right]\in \mathbb{R}^{4} $ where $q_{0}, q_{1},q_{2},q_{3}\in \Bbb R$

Multiplication between quaternions is carried out by using the distributive rule and the rules for $\mathrm{i}$, $\mathrm{j}$ and $\mathrm{k}$.

The quaternions turn out to be a noncommutative division ring. In fact, $\Bbb R$ and $\Bbb C$ and $\Bbb H$ are the only associative finite dimensional division rings over $\Bbb R$. They are also the only normed division algebras over $\Bbb R$.

1656 questions
41
votes
1 answer

Quaternion distance

I am using quaternions to represent orientation as a rotational offset from a global coordinate frame. Is it correct in thinking that quaternion distance gives a metric that defines the closeness of two orientations? i.e. similar orientations give…
Josh
  • 513
36
votes
2 answers

Exponential Function of Quaternion - Derivation

The equation for the exponential function of a quaternion $q = a + b i + c j + dk$ is supposed to be $$e^{q} = e^a \left(\cos(\sqrt{b^2+c^2+d^2})+\frac{(b i + c j + dk)}{\sqrt{b^2+c^2+d^2}} \sin(\sqrt{b^2+c^2+d^2})\right)$$ I'm having a difficult…
Jade196
  • 493
35
votes
5 answers

Why should quaternions exist?

Why do quaternions exist? I want to believe they exist, but all I can think of are reasons they should not exist. These are my reasons. The quaternions are defined by the following equation: $$i^2 = j^2 = k^2 = ijk = -1$$ There are four equalities…
26
votes
4 answers

Quaternions: why does ijk = -1 and ij=k and -ji=k

Currently i am studying quaternions. I do understand that i, j and k are imaginary numbers. so $i^2 = j^2 =k^2 = -1$. But I could not understand this: $$\begin{matrix}ij=k,&ji=-k,\\jk=i,&kj=-i,\\ki=j,&ik=-j\end{matrix}$$ Why is this? There seems no…
26
votes
4 answers

what is the relation between quaternions and imaginary numbers?

I understand the idea behind complex and imaginary numbers. I am trying to understand quaternions. What is the relation between imaginary (or complex) numbers, and quaternions?
user56834
  • 12,925
22
votes
2 answers

Combining rotation quaternions

If I combine 2 rotation quaternions by multiplying them, lets say one represents some rotation around x axis and other represents some rotation around some arbitrary axis. The order of rotation matters, so the order of the quaternion multiplication…
Dan Webster
  • 853
  • 1
  • 8
  • 17
21
votes
3 answers

What does multiplication of two quaternions give?

I'm using quaternions as a means to rotate an object in the application I'm developing. If one quaternion represents a rotation and the second quaternion represents another rotation, what does their multiplication represent? Many web sites talk…
Nazerke
  • 321
17
votes
2 answers

the logarithm of quaternion

I'm reading 3D math primer for graphics and game development by Fletcher Dunn and Ian Parberry. On page 170, the logarithm of quaternion is defined as \begin{align} \log \mathbf q &= \log \left( \begin{bmatrix} \cos \alpha & \mathbf n \sin \alpha…
tpeng
14
votes
1 answer

Normalizing a quaternion

How do I normalize a quaternion $$q=w + \mathbf ix + \mathbf jy + \mathbf kz = a + v$$ ? I already know: The normalized quaternion is called unit quaternion and can be calculated in this way: $$U_q = {q \over ||q||}$$ Does this mean I have to divide…
domisum
  • 275
11
votes
2 answers

How do quaternions represent rotations?

I wonder how $qvq^{-1}$ gives the rotated vector of $v$. Is there any easy-to-understand proof for it? I was on Wikipedia, but I could not understand the proof there because of the conversions. Why is $uv-vu$ the same as $2(u \times v)$, and why is…
user7217
  • 271
11
votes
3 answers

Are j and k on different imaginary planes than i?

I'm trying to understand Quaternions. So I understand that a Quaternion is written like $xi+yj+zk+w$. I also understand that $i^2 = j^2 = k^2 = ijk = -1$, and how that can be used to derive equations such as $ij = k$ and $jk = i$. One things that…
9
votes
2 answers

Square roots of $-1$ in quaternion ring

In this Wikipedia page it is said that the square roots of -1 in the quaternion ring are the elements of the imaginary sphere. I don't understand why this is so. I don't understand the system that's written there. If I…
Bruno Stonek
  • 12,527
9
votes
3 answers

negative quaternion

I often see claims that the negative of a quaternion represents the same rotation, just that the axis and angle have both been reversed. However, if I look at the axis-angle representation of the quaternion $q=[\cos(\theta/2),\vec{n}\sin(\theta/2)]$…
compmatsci
  • 205
  • 1
  • 2
  • 6
8
votes
3 answers

How to get a part of a quaternion? e.g. get half of the rotation of a quaternion?

if I have a quaternion which describes an arbitrary rotation, how can I get for example only the half rotation or something like 30% of this rotation? Thanks in advance!
chris LB
  • 183
7
votes
2 answers

Simple expression for imaginary part of a quaternion

From a complex number, $z=x+iy$ and its conjugate there is a simple way to evaluate the real part and imaginary part, \begin{equation} \text{Re}(z)=\frac{z+z^*}{2} \end{equation} and \begin{equation} \text{Im}(z)=\frac{-i(z-z^*)}{2} \end{equation} I…
LOC
  • 302
  • 1
  • 11
1
2 3
12 13