# Quaternion

 of these articles treats the quaternions as mathematical object. For the order pattern for the condition of the holy Roman realm see the article quaternion to the realm condition.
Hamilton

the quaternions are a Verallgemeinerung of the complex numbers. They were devised 1843 by Sir William Rowan Hamilton and often also Hamilton numbers are called. The quantity of the quaternions becomes usually with [itex] \ mathbb {H}< /math> designated. (One notes however that this symbol depending upon context in addition, another meaning can have, see upper half plane and hyperbolic area.)

quaternions are a four-dimensional division algebra over the body of the real numbers with a not commutative multiplication. As four-dimensional real algebra the quaternions are a four-dimensional real vector space. Therefore each quaternion is by four real components[itex] x_0, x_1, x_2, x_3 [/itex] clearly determines. As basis elements of this vector space four elements with the length become [itex] 1 [/itex] selected, those stand perpendicularly one on the other; they become with [itex] 1, i, j, k [/itex] designated. The linear combination of the fourComponents with the four basis elements reads thus

[itex] x_0 + x_1 i + x_2 j + x_3 k [/itex]

Is [itex] \ R< /math> embedded as elements of the form [itex] x_0< /math>, thus with [itex] x_1 = x_2 = x_3 = 0< /math>. The quantitythe complex numbers can be embedded in different ways into the quaternions; the quaternions are however none [itex] \ mathbb C< /math> - algebra.

## arithmetic rules

one transfers from the bodies [itex] \ R< /math> (number real number) and [itex] \ mathbb {C}< /math> (number complex number) operations admitted [itex] +< /math> (Addition) and [itex] \ /math< cdot> (Multiplication) on [itex] \ mathbb {H}<,> one receives an inclined body to /math. The addition is thereby identically to the addition of the vector space and the scalar multiplication of the vector space for the multiplication is taken over. Thus the product of basis elements of the vector space is to only indicate for the definition of the multiplication (see multiplication).

Operationsover two quaternions
< math> \ left (x_0 + x_1 \ cdot i + x_2 \ cdot j + x_3 \ cdot k \ right) + {} \,< /math>

[itex] \ (y_0 + y_1 \ cdot i + y_2 \ cdot j + y_3 \ cdot k \ right) = {} \, /math< left>

[itex] \ left (x_0 + y_0 \ right) + \ left (x_1 + y_1 \ right) \ cdot i + {} \,< /math>
[itex] \ left (x_2 + y_2 \ right) \ cdot j + \ left (x_3 + y_3 \ right) \ cdot k \,< /math>

[itex] \ left (x_0 + x_1 \ cdot i + x_2 \ cdot j+ x_3 \ cdot k \ right) \ cdot {} \,< /math>

[itex] \ (y_0 + y_1 \ cdot i + y_2 \ cdot j + y_3 \ cdot k \ right) = {} \, /math< left>

[itex] \ left (x_0 \ cdot y_0 - x_1 \ cdot y_1 - x_2 \ cdot y_2 - x_3 \ cdot y_3 \ right)+ {} \,< /math>
[itex] \ left (x_0 \ cdot y_1 + x_1 \ cdot y_0 + x_2 \ cdot y_3 - x_3 \ cdot y_2 \ right) \ i cdot + {} \,< /math>
[itex] \ left (x_0 \ cdot y_2 - x_1 \ cdot y_3 + x_2 \ cdot y_0 + x_3 \ cdot y_1 \ right)\ j cdot + {} \,< /math>
[itex] \ left (x_0 \ cdot y_3 + x_1 \ cdot y_2 - x_2 \ cdot y_1 + x_3 \ cdot y_0 \ right) \ k /math< cdot>

associatively and commutatively is associative , but not commutative

the special position of the component is x 0calls one similarly to complex numbers real part or scalar part [itex] s=x_0< /math>, while the components x 1, x 2 and x 3 imaginary part [itex] x_1 i + x_2 j + x_3 k< /math> or vector part< math> v= (x_1, x_2, x_3)< /math> are called. A quaternion, itsReal part 0 is, calls one pure quaternion.

### Bbb C^ know

representation as matrix the quaternions {2 \ <times> 2} /math also as Unterring of the ring math< \> the complex [itex] 2 \ times 2< /math> - stencils (alternatively also as Unterring of the ring [itex] \ R^ {4 \ times 4}< /math> the real[itex] 4 \ times 4< /math> - stencils) to be understood. One sets

 [itex] 1 = \ begin {pmatrix} 1 & 0 \ \ 0 & 1 \ ends {pmatrix}< to /math> [itex] I = \ begin {pmatrix} i & 0 \ \ 0 & - i \ end {pmatrix}< to /math> [itex] J = \ begin {pmatrix} 0 & 1 \ \ -1 & 0 \ end {pmatrix}< to /math> [itex] K = \ begin {pmatrix} 0 & i \ \ i & 0 \ end {pmatrix}< to /math>

one of the following matrix representations to Pauli matrix) as result:

Quaternion [itex] A + b \ cdot i + C \ cdot j + D \ cdot k< /math> as matrix
2x2 complex 4x4 really
< math> \ begin {pmatrix} a+bi & c+di \ \ - c+di & A-bi \ end {pmatrix}< to /math> [itex] \ begin {pmatrix}
` \; \; A & - b & \; \; D & - C \ \ \; \; b & \; \; A & - C & - D \ \ - D & \; \; C & \; \;A & - b \ \ \; \; C & \; \; D & \; \; b & \; \; A`

\ end {pmatrix}< to /math>

### Hamilton rules

for quaternions apply the following Hamilton rules:

 [itex] i \ cdot j = k< /math> [itex] j \ cdot k = i< /math> [itex] k \ cdot i= j< /math> [itex] j \ cdot i = - k< /math> [itex] k \ cdot j = - i< /math> [itex] i \ cdot k = - j< /math>

Additionally i^2 = j^2 = <k^2> = -1 follows \, /math from the linkage rules< math> and [itex] i \ cdot j \ cdot k = -1< /math>.

From this results initself the following multiplication table:

Multiplication table
 · 1 i j k 1 1 i j k i i −1 k − j j j − k −1 i k k j − i −1

the additionis the simplest arithmetic rule for quaternions. One needs individually to add only the components:

[itex] (a_1 + i \, b_1 + j \, c_1 + k \, d_1) + (a_2 + i \, b_2 + j \, c_2 + k \, d_2) = {\,}< /math>
[itex] (a_1 + a_2) + i \, (b_1 + b_2) +j \, (c_1 + c_2) + k \, (d_1 + d_2)< /math>

### subtraction

the addition of the quaternions is commutative there, proceeds one with subtraction similar to the addition and subtracts the individual components:

[itex] (a_1 + i \, b_1 + j \, c_1 +k \, d_1) - (a_2 + i \, b_2 + j \, c_2 + k \, d_2) = {\,}< /math>
[itex] (a_1 - a_2) + i \, (b_1 - b_2) + j \, (c_1 - c_2) + k \, (d_1 - d_2)< /math>

### multiplication

for quaternions are different kinds of the multiplicationdefined. One differentiates in principle between the multiplication according to Grassman and the multiplication according to Euklid, as well as the product, the straight product and the odd product.

#### grass one product

the usual multiplication of the quaternions, also as grass one product well-known, leads itselffrom the multiplication of the complex numbers off.

[itex] q_1 \, q_2 = (A + i \, b) \, (C + i \, D) = (A \ cdot C-b \ cdot D) + i (A \ cdot D + b \ cdot C)< /math>

In the matrix representation this looks as follows:

[itex] (A, b)\, (C, D) = (AC - bd, ad + UC)< /math>

In the case of the quaternions as b and D a three-dimensional vector is used ([itex] b \ tons \ vec u< /math>; [itex] D \ tons \ vec v< /math>) and the cross product of these vectors adds.

[itex] (A + i {\ vec u})\, (C + i {\ vec v}) = (A \, C {\ vec u} \, {\ vec v}) + i (A \, {\ vec v} + \ vec u \, C + {\ vec u} \ times {\ vec v})< /math>

And in the representation as matrix:

[itex] (A, \ vec u) \, (C,\ vec v) =

(A \, C - \ vec u \, \ vec v \, A \, {\ vec v} + \ vec u \, C + {\ vec u} \ times {\ vec v})< /math>

Notice: (first minus the latter, outside plus inside plus cross)

itthus /math develops with the multiplication of pure <quaternions> math< q_a> and [itex] q_b< /math> a quaternion [itex] q< /math>, its scalar part [itex] S (q) = - q_a \, q_b< /math> up to the sign, during the vector part corresponds to the dot product of the two vector parts [itex] V (q) = q_a \ times q_b \,< /math>,the cross product of the vector parts of [itex] q_a< /math> and [itex] q_b< /math> is.

The individual vectors [itex] (x, y, z)< /math> become here in the form [itex] (ix + jy + kz)< /math> expressed. From using these vectors one receives the rules for the multiplication of the quaternions, explained above.

Dissolved arises therefore for the multiplication:

[itex]

(a_1 + i \, b_1 + j \, c_1 + k \, d_1) \, (a_2 + i \, b_2 + j \, c_2 + k \, d_2) = {} [/itex]

[itex] \ left (a_1 \ cdot a_2 - b_1 \ cdot b_2 -c_1 \ cdot c_2 - d_1 \ cdot d_2 \ right) + {} \,< /math>
[itex] i \, \ left (a_1 \ cdot b_2 + b_1 \ cdot a_2 + c_1 \ cdot d_2 - d_1 \ cdot c_2 \ right) + {} \,< /math>
[itex] j \, \ left (a_1 \ cdot c_2 - b_1 \ cdotd_2 + c_1 \ cdot a_2 + d_1 \ cdot b_2 \ right) + {} \,< /math>
[itex] k \, \ left (a_1 \ cdot d_2 + b_1 \ cdot c_2 - c_1 \ cdot b_2 + d_1 \ cdot a_2 \ right)< /math>

In the special case that a quaternion [itex] q_ {\ delta t}< /math>, consisting ofthe derivative of the time

[itex] \ frac {\ delta} {\ delta t}< /math>

and the Del

[itex] \ nabla = i \ frac {\ delta} {\ delta x} + j \ frac {\ delta} {\ delta y} + k \ frac {\ delta} {\ delta z}< /math>,

with another quaternion [itex] q_x< /math> , contains one is multiplied the time-based derivative of the scalar, as well as 3-Vektorfunktionen which thoseDeviation from the origin (offset), upward gradient and bend of a movement contain.

[itex] q_ {\ delta t} \, q_x = \ left (\ frac {\ delta} {\ delta t}, \ nabla \ right) \, \ left (C, \ vec v \ right) = \ left (\ frac {\ delta C} {\ delta t} - {\ vec \ nabla} \, {\ vec v}, \ frac {\ delta {\ vecv}} {\ delta t} + {\ vec \ nabla} \, C + {\ vec \ nabla} \ times {\ vec v} \ right)< /math>

This is to be represented a very compact representation around for instance a ballistic flight path.

#### straight grass one product

the straight grass one product of the quaternions is used rarely. This product is commutative, i.e. it applies [itex] \ operator name {for Even} (q_1, q_2) = \ operator name {Even} (q_2, q_1)< /math>.

[itex] \ operator name {Even} (q_1, q_2) = \ frac {q_1 \, q_2 + q_2 \, q_1} {2} = (a_1 \, a_2 - \ vec u \, \ vec v, a_1 \, \ vec v + \ vec u \, a_2)< /math>
[itex] \ operator name {Even} (q_1, q_2) =

(a_1 \, a_2 - b_1 \, b_2 - c_1 \, c_2- d_1 \, d_2) + i \, (a_1 \, b_2 + b_1 \, a_2) + j \, (a_1 \, c_2 + c_1 \, a_2) + k \, (a_1 \, d_2 + d_1 \, a_2)< /math>

#### odd grass one product

the cross product or also odd grass one product of two quaternions is the equivalent to the cross product. It corresponds to the cross product of the two vector parts of these quaternions:

[itex] q_1 \ times q_2 = \ frac {q_1 \, q_2 - q_2 \, q_1} {2} = (0, \ vec u \ times \ vec v)< /math>
[itex] q_1 \ times q_2 = i \, (c_1 d_2 - d_1 c_2) +j \, (d_1 b_2 - b_1 d_2) + k \, (b_1 c_2 - c_1 b_2)< /math>

#### Euklid product

< math> \ operator name {EuklidProd} (q_1, q_2) \ tons \ overline {q_1} q_2 = q_1 \ overline {q_2} = (a_1 a_2 + \ vec u \ vec v,

a_1 \ vec v - \ vecamong other things _2 - \ vec u \ times \ vec v)< /math>

#### straight euklidsches product

the point product, also dot product, straight euklidsches product or internal euklidsches product mentioned, corresponds to the point product of a 4-wertigen of vector.

[itex] \ langle q_1, q_2 \ rangle =a_1 \, a_2 + b_1 \, b_2 + c_1 \, c_2 + d_1 \, d_2< /math>

One knows the point product into grass man the product (dh. a multiplication) transform:

[itex] \ langle q_1, q_2 \ rangle = \ frac {\ overline {q_1} q_2 + q_2 \ overline {q_1}} {2} = (a_1 a_2 + \ vecu \ vec v, 0)< /math>

Point products are useful, if one liked to isolate an individual element of a quaternion:

[itex] \ langle q, i \ rangle = b< /math>

#### odd euklidsches product

that odd euklidsches product, also exterior euklidsches product mentioned, becomes onlyneeds rarely. It is similarly to the internal euklidschen product and as pair with this is therefore treated (see: Straight euklidsches product):

[itex] {Outer} (q_1, q_2) = \ frac {\ overline {q_1} \, q_2 - \ overline {q_1} \, q_2} {2} = (0, a_1 \ vec v - \ vec ua_2 - \ vec u \ times \ vec v)< /math>
[itex] {Outer} (q_1, q_2) =

i \, (a_1 b_2 - b_1 a_2 - c_1 d_2 + d_1 c_2) + j \, (a_1 c_2 + b_1 d_2 - c_1 a_2 - d_1 b_2) + k \, (a_1 d_2 -b_1 c_2 + c_1 b_2 - d_1 a_2) [/itex]

### division

the division of two quaternions is represented not with a fraction stroke, but using a negative exponent. The reason for it is that the multiplication of quaternions not commutativelyand one is cdot therefore <between> math q_1 \ q_2^ {- 1}< /math> and [itex] q_2^ {- 1} \ cdot q_1< /math> to differentiate must.

If the individual elements quaternion a unit of length possess and/or. the quaternion was normalized , then applies:

[itex] q^ {- 1} = \ bar {q}< /math>

Whereby [itex] \ bar {q}< /math> the conjugation of the quaternion< math> q< /math>is. Therefore applies:

[itex] q \ cdot \ bar {q} = 1< /math>

If the quaternion possesses another unit, one divides the konjungierte quaternion by scalar value, which results from the square of the amplitude of the quaternion, in order reciprocal the value to receive:

[itex] q^ {- 1} = \ frac {\ bar {q}} {\ left| q^2 \ right|} = \ frac {\ overline {q}} {q \, \ overline {q}}< /math>

Written out the following form results:

[itex] (A + i \, b + j \, C + k \, D) ^ {- 1} = \ frac {\ left (A i \, b - j \, C -k \, D \ right)} {\ left (a^2 + b^2 + c^2 + d^2 \ right)}< /math>

The proof results from the simple shaping of the division into a Multiplikaion:

[itex] q \ cdot \ bar {q} = \ left| q^2 \ right|[/itex]

### conjugation

the conjugationa quaternion has same scalar part. However are the signs of all complex parts - dh. the individual components of the vector part - negates:

[itex] \ overline {q} = q^* = (A, \ vec {- u}) = \ overline {\ left (A + i \, b + j \, C + k \, D\ right)} = {\ left (A i \, b - j \, C - k \, D \ right)}[/itex]

If one forms a quaternion with its conjugation the point product receives one a real number, from which one the amount of the quaternion to form can:

[itex] q \ cdot \ overline {q} =

{\ left (A + i \, b + j \, C + k \, D \ right)} \ cdot \ overline {\ left (A i \, b - j \, C - k \, D \ right)} = a^2+b^2+c^2+d^2 [/itex]

Itapplies besides:

[itex] \ overline {q_1 \ cdot q_2} = \ overline {q_2} \ cdot \ overline {q_1}< /math>

The conjugation of a quaternion, which represents a turn, leads to a turn in the opposite direction.

### turns

quaternions can be used for the representation by turns in the three-dimensional area.Turns are accomplished here by multiplications.

Turns of quaternions have /math by the three represented <dimensions> math (x \, y \, z<)> three degrees of freedom [itex] (\ gamma \, \ phi \, \ theta)< /math>. The individual degrees of freedom stand thereby in each case for a turn around one of the axles.

A quaternion, which onlya turn to represent is to be standardized, must , so that

< math> q cdot \ cdot \ overline {q} = \ overline {q} \ q=1< /math>

applies.

The turn with the help of such a standardized quaternion [itex] q< /math> multiplied by one point [itex] p< /math> in the area and the konjungierten quaternion [itex] \ overline {q}< /math> the new position for the point results in[itex] p'< /math>. With this kind of the turn no stencils are needed.

[itex] p' = q \ cdot p \ cdot \ overline {q}< /math>

By using the point [itex] p< /math> and the quaternion [itex] q< /math> (in vectorial way of writing) one receives:

[itex] p' =

\ begin {pmatrix} w_q \ \ x_q \ \ y_q \ \z_q \ end {pmatrix} \ cdot \ begin {pmatrix} to 0 \ \ x \ \ y \ \ z \ end {pmatrix} \ cdot \ begin {pmatrix} w_q \ \ - x_q \ \ - y_q \ \ - z_q \ end {pmatrix} <to /math> By dissolving and simplifying into a three-dimensional representation of this equation one receives from this the following matrix representation:

[itex] p' =

\ begin {pmatrix} x' \ \ y' \ \ z' \ end {pmatrix} = \ begin {pmatrix}

x_q^2 + w_q^2 - y_q^2 - z_q^2 & 2 \ cdot (x_q \ cdot y_q - w_q \ cdot z_q) & 2 \ cdot (x_q \ cdot z_q + w_q \ cdot y_q) \ \

2 \ cdot (w_q \ cdot z_q + x_q \ cdot y_q) &w_q^2 - x_q^2 + y_q^2 - z_q^2 & 2 \ cdot (y_q \ cdot z_q - cdot w_q \ x_q) \ \

2 \ cdot (x_q \ cdot z_q - w_q \ cdot y_q) & 2 \ cdot (w_q \ cdot x_q + y_q \ cdot z_q) & w_q^2 - x_q^2 y_q^2+ z_q^2

\ end {pmatrix} \ cdot \ begin {pmatrix} to x \ \y \ \ z \ end {pmatrix} <to /math>

#### axle angle representation

a quaternion, which represents a turn, is normalized and in the axle angle angle follow-estimated represented:

[itex] q_r = w_q + i \, x_q + j \, y_q + k \, z_q< /math>
[itex] q_r = \ cos\ frac {\ alpha} {2} +

i \, x \, \ sin \ frac {\ alpha} {2} + j \, y \, \ sin \ frac {\ alpha} {2} +k \, z \, \ sin \ frac {\ alpha} {2} [/itex] Here applies:

• α the angle of rotation (
• x, y, z) is is a normalized vector, which represents the axis of rotation. For example results inthe vector (1,0,0) a turn around the x axis and the vector (0,1,0) a turn around the y axis.

This kind of the representation is derived from the axle angle representation of the turns in the two-dimensional area.

The quaternion i places thus a turn of180° around the x axis, j a turn of 180° around the y axis and k a turn of 180° around the Z-axis. Thus math <i> corresponds \ cdot to i = j \ cdot j = k \ cdot k = -1< /math> a turn of360° around the respective axle.

Complex number quaternion
representation 2D-Vektor 3D-Drehung
turn around i 90° 180°
combination of
arithmetic operations

this leads to the fact that the quaternion [itex] (A + i b + j C + k D)< /math> the same turn howthe quaternion [itex] (- A - i b - j C - k D)< /math> represents. The quaternions [itex] 1< /math> and [itex] -1< /math> therefore the identity turn is (i.e. no change of the situation). A quaternion, which is turned around 360°, is inverted. A quaternion is thusalso a so-called spinor.

#### negation and conjugation

a konjungierte turn from point A to point B results in a turn from point B to point A. Here is:

q r a rotation quaternion.
q AThose, by a vector described, position A in the area.
q B those, by a vector described, position B in the area.

By the negation the rotation quaternion rotates around -360°.

Effect of negation and conjugation on the turn
quaternion turn
< math> q_r =(w + i \, x + j \, y + k \, z)< /math>[itex] q_r \ q_A \ ton cdot q_B< /math>
[itex] \ overline {q_r} = (w - i \, x - j \, y - k \, z)< /math> [itex] \ overline {q_r} \ cdot q_B \ tons q_A< /math>
[itex] - {\ overline {q_r}} =(- w + i \, x + j \, y + k \, z)< /math>[itex] - {\ overline {q_r}} \ cdot q_B \ tons q_A< /math>1
< math> - q_r = (- w - i \, x - j \, y - k \, z)< /math> [itex] - q_r \ q_A \ ton cdot q_B< /math>1
1 does not apply to fermions. These need a 720° turn over into the initial position back to come.

#### reflection

a reflection can be understood as a special form of the turn and by a negative scalar part is expressed:

[itex] q_ {FR} =-1 \,< /math>

Each turn represented by a quaternion can be expressed as a consequence of two (or more) reflections.

TODO: Explanation

### amount of the quaternion

the amount (and/or. the length) of a quaternion corresponds to the amount of a four-dimensional vector.Therefore the formula applies:

[itex] {\| q \|} = {\| A + i \, b + j \, C + k \, D \|} = \ {a^2 sqrt + b^2 + c^2 + d^2}< /math>

Further applies:

[itex] {\| q \|} = \ sqrt {q \ cdot q} = \ sqrt {\ overline {q} \, q}< /math>

### standardized quaternion

a standardized quaternion (or unit quaternion) is a quaternion with an amount of unity. It applies therefore:

[itex] \| q_n \| = 1< /math>

Whereby [itex] q_n< /math> the standardized quaternion is. The standardized quaternion gives thus only oneDirection, however no specific length on. One receives it if one the individual components of the quaternion by its amount divides:

[itex] q_n = \ frac {\ vec q} {\| q \|} = \ frac {(A \, b \, C \, D)}{\| q \|} = \ left (\ frac {A} {\| q \|} + i \, \ frac {b} {\| q \|}+ j \, \ frac {C} {\| q \|} + k \, \ frac {D} {\| q \|} \ right)< /math>

To a normalized quaternion applies:

[itex] \ frac {1} {q_n} = \ overline {q_n}< /math>

Thus divisions are substantially simplified by quaternions.

The underlying principle is thereby same as likewise with a orthogonalen matrix the which for the representation ofTurns to be used can.

### polar representation

each quaternion can be represented in the polar form. In addition one needs a scalar amplitude, the associated angle and a three-dimensional direction vector [itex] \ vec i< /math>.

[itex] q =\| q \| \, e^ {\ theta \ vec i} = \ overline {q} \, q \, \ left (\ cos \ theta + \ vec i \, \ sin \ theta \ right)< /math>

Here applies:

[itex] \ theta = \ operator name {acos} \ left (\ frac {q + \ overline {q}} {2 \, \| q \|} \ right)< /math>
[itex] \ vec i = \ frac {q- \ overline {q}} {\| q - \ overline {q} \|}< /math>

It shows up that [itex] {\ vec i} ^2 = -1< /math> applies:

[itex] \ left (0, \ vec u \ right) = q - \ overline {q}< /math>
[itex] {\ vec i} ^2 = \ frac {\ left (0, \ vec u \ right) \, \ left (0, \ vec u \ right)}{\| \ left (0, \ vec u \ right) \|\, \| \ left (0, \ vec u \ right) \|} = \ frac {\ left (- \ vec u \ cdot \ vec u, \ vec u \ times \ vec u \ right)}{{\| \ vec u \|} ^2} = -1< /math>

Thus the vector is [itex] \ vec i< /math> similar to the complex number of i.

## transformation of turn quaternions

quaternions, which represent a turn, can be converted if necessary into different representational forms.

### matrix representation

around a normalized quaternion [itex] q_ {trick}< /math>, which represents a turn, into a turning matrix< math> M_ {trick}< /math> to convert, one can do thosethe following transformation use:

[itex]

\ vec {q_ {trick}} = \ begin {pmatrix} w \ \ x \ \ y \ \ z \ end {pmatrix} \ ton to M_ {trick} = \ begin {pmatrix} 1 - 2 \, (y^2 + z^2) &2 \, (x \, y - z \, w) &2 \, (x \, z + y \, w) \ \

2 \, (x \, y + z \, w) & 1 - 2 \, (x^2 + z^2) & 2 \, (y \, z - x \, w) \ \

2 \, (x \, z - y \, w) & 2 \, (y \, z + x \, w) & 1 - 2 \, (x^2 +y^2) \ end {pmatrix} <to /math>

with [itex]|\ vec {q_ {trick}}| = \ {w^2 sqrt + x^2 + y^2 + z^2} = 1< /math>

Turned around one can convert this matrix again back into a quaternion:

[itex] M_ {trick} =

\ begin {pmatrix} m_ {0.0} & m_ {0.1} & m_ {0.2} \ \ m_ {1.0} & m_ {1.1} & m_ {1,2}\ \ m_ {2.0} & m_ {2.1} & m_ {2.2} \ end {pmatrix} \ ton \ vec {q_ {to trick}} = \ begin {pmatrix} w \ \ x \ \ y \ \ z \ end {pmatrix} = {} \ begin {pmatrix} \ frac {\ sqrt {to 1 + m_ {0.0} + m_ {1.1} + m_ {2.2}}} {2} \ \ \ frac {m_ {2.1} - m_ {1.2}} {4 \ w cdot} \ \ \ frac {m_ {0.2} - m_ {2,0}} {4 \ w cdot} \ \\ frac {m_ {1.0} - m_ {0.1}} {4 \ cdot w} \ \ \ end {pmatrix} <to /math>

for [itex] m_ {0.0} + m_ {1.1} + m_ {2.2} + 1 > 0< /math>

### axle angle representation

around a quaternion [itex] q_d< /math>, which represents a turn, into its axle angle angle [itex] q_w< /math> to convert, one knows the following Gleichungssytemverwenden:

[itex] \ vec {q_d} = \ begin {pmatrix} w \ \ x \ \ y \ \ z \ end {pmatrix} \ ton

\ vec {q_w} = \ begin {pmatrix} \ cos \ frac {\ alpha} {2} \ \x_w \, \ sin \ frac {\ alpha} {2} \ \y_w \, \ sin \ frac {\ alpha} {2} \ \z_w \, \ sin \ frac {\ alpha} {2}\ end {pmatrix} [/itex]

[itex] \ alpha = 2 \ cdot \ operator name {acos} \, w< /math>
[itex] x_w = \ frac {x} {\ sqrt {1-w^2}}< /math>
[itex] y_w = \ frac {y} {\ sqrt {1-w^2}}< /math>
[itex] z_w =\ frac {z} {\ sqrt {1-w^2}}< /math>

The reversal arises as a result of using and dissolution of the equation. However the axis of rotation and the resulting quaternion must be normalized for the reversal both:

[itex] x_w^2 + y_w^2 + z_w^2 = 1< /math>
[itex] \ cos^2 {\ frac {\ alpha} {2}} +

x_w^2 \, \ sin^2 {\ frac {\ alpha} {2}} + y_w^2 \, \ sin^2 {\ frac {\ alpha} {2}}+ z_w^2 \, \ sin^2 {\ frac {\ alpha} {2}} = 1< /math>

### Euler angle representation

around a quaternion [itex] q = w + i \ to convert x + j \, y + k \,< z> /math, which represents a turn, into the individual Euler angles one can use the following equation:

[itex]

\ begin {pmatrix} \ theta \ \ \ phi \ \ \ to psi \ end {pmatrix} = \ begin {pmatrix} \ operator name {badly} {\ left [2 \ (y \ cdot w-x \ cdot z), \, 1 cdot - 2 \ (y^2 + z^2) \ right cdot]} \ \ \ operator name {Asia} {\ left [2 \ (x \ cdot y + z \ cdot w) \ right cdot]} \ \ \ operator name {badly} {\ left [2 \ cdot (x \ cdot w-y \ cdot z), \,1 - 2 \ cdot (x^2 + z^2) \ right]} \ end {pmatrix} <to /math>

This equation however does not apply to the two poles [itex] for x \ cdot y + z \ cdot w = \ pm 0 {,} 5< /math>.

[itex] q =

\ begin {pmatrix} w \ \ x \ \ y\ \ z \ end {pmatrix} = \ begin {pmatrix} to k_1 \ cdot k_2 \ cdot k_3 - s_1 \ cdot s_2 \ cdot s_3 \ \ s_1 \ cdot s_2 \ cdot k_3 + k_1 \ cdot k_2 \ cdot s_3 \ \ s_1 \ cdot k_2 \ cdot k_3 + k_1 \ cdot s_2 \ cdot s_3 \ \ k_1 \ cdot s_2 \ cdot k_3 - s_1 \ cdot k_2 \ cdot s_3 \ end {pmatrix} = \ begin {pmatrix} \ frac {\ sqrt {to 1+ K_1 \ cdot K_2 + K_1 \ cdot K_3 - S_1 \ cdot S_2 \ cdot S_3 + K_2 \ cdot K_3}} {2} \ \ \ frac {K_2 \ cdot S_3 + K_1 \ cdot S_3 + S_1 \ cdot S_2 \ cdot K_3} {4 \ cdot w} \ \ \ frac {S_1 \ cdot K_2 + S_1\ K_3 cdot + C_1 \ cdot S_2 \ cdot S_3} {4 \ cdot w} \ \ \ frac {- S_1 \ cdot S_3 + K_1 \ cdot S_2 \ cdot K_3 + S_2} {4 \ cdot w} \ ends {pmatrix} <to /math>

 [itex] k_1 = \ cos \ frac {\ theta} {2}< /math> [itex] k_2 = \ cos \ frac {\ phi} {2}< /math> [itex] k_3 = \ cos \ frac {\ psi} {2}< /math> [itex] s_1 = \ sin \ frac {\ theta} {2}< /math> [itex] s_2 =\ sin \ frac {\ phi} {2}< /math> [itex] s_3 = \ sin \ frac {\ psi} {2}< /math> [itex] K_1 = \ cos \ theta \,< /math> [itex] K_2 = \ cos \ phi \,< /math> [itex] K_3 = \ cos \ psi \,< /math> [itex] S_1 = \ sin \ theta \,< /math> [itex] S_2 = \ sin \ phi \,< /math> [itex] S_3 = \ sin \ psi \,< /math>

## functions

in the following are listed some important functions for handling quaternions.

Work on []

### Sign

the function sgn returns the delivery the sign of a quaternion, by dividing the quaternion by its amount:

[itex] sgn (q) = \ frac {q} {\| q \|}< /math>

### one

receives scalar part the scalar part of a quaternion, by one to the quaternion the konjungierten valueadded. Thus the vector part kürtzt itself away:

[itex] \ operator name {scalar} (q) = \ frac {q + \ overline {q}} {2} =

\ frac {(a+i \, b+j \, c+k \, D) + (A-i \, b-j \, CC \, D)}{2} = A< /math>

### one

, similar to as with the function for the scalar part, receives vector part the vector part by onefrom the quaternion the kunjungierte quaternion subtracts:

[itex] \ operator name {vector} (q) = \ frac {q - \ overline {q}} {2} = \ vec {u} = \ frac {(a+i \, b+j \, c+k \, D) - (A-i \, b-j \, CC \, D)}{2} = i \, b + j \, C + k \, D< /math>

### quaternion argument

this function supplies the angle betweenthe scalar value (dh. the real level) and the vector represented by the quaternion back.

[itex] \ badly (q) = \ operator name {acos} \ left (\ frac {A} {\| q \|} \ right)< /math>

### exponents and logarithm

by the possibility quaternions to divide, one can define exponential and logarithmic functions.

• Natural exponent:
[itex] e^q = \ exp (q) = e^a \ cdot (\ cos |\ vec {v}| , \ sgn \ vec {v} \ cdot \ sin |\ vec {v}|)< /math>
• Exponent:
[itex] p^q = e^ {\ LN p \ times q} \,< /math> for [itex] p, q \ in \ mathbb {Q}< /math>
• Naperian logarithm:
[itex] \ LN q = \ LN|q| + \ sgn \ vec {v} \ cdot \ badly (q)< /math>
Work on []

#### Exponential multiplication

< math> q_1 \, q_2 = \ left (q_1, q_2 \ right) + \ left| \ (q_1, q_2 \ right) \ right left| \ cdot e^ {\ frac {\ pi} {2} \ cdot \ sgn {\ left (q_1, q_2 \ right)} }< /math>

### trigonometry

also trigonomentrische functions can be defined.

• Sine:
[itex] \ sin q = \ left (\ sin A \ cdot \ cosh |\ vec {v}| , \ cos A \ cdot \ sgn \ vec {v} \ cdot \ sinh |\ vec {v}| \ right)< /math>
• Cosine:
[itex] \ cos q = \ left (\ cos A \ cdot \ cosh { |\ vec {v}| }, - \ sin A \ cdot \ sgn \ vec {v} \ cdot\ sinh |\ vec {v}| \ right)< /math>
• Tangent:
[itex] \ tan q = \ frac {\ sin q} {\ cos q}< /math>

Like also the appropriate inverse functions.

• Arkussinus:
[itex] \ operator name {Asia} \, q = - \ sgn \ vec {v} \ cdot \ operator name {asinh} (q \ sgn \ vec {v})< /math>
• Arkuskosinus:
[itex] \ operator name {acos} \, q = - \ sgn \ vec {v} \ cdot \ operator name {acosh} \, q< /math>
• Arkustangens:
[itex] \ operator name {atan} \,q = - \ sgn \ vec {v} \ cdot \ operator name {atanh} (q \ cdot \ sgn \ vec {v})< /math>

the hyperbolic functions can hyperbola additional be defined:

• Sine Hyperbolikus:
[itex] \ sinh q = \ left (\ sinh A \ cdot \ cos |\ vec {u}| , \ cosh A \ cdot \ sgn |\ vec {u}| \ cdot \ sin |\ vec {u}|\ right)< /math>
• Cosine Hyperbolikus:
[itex] \ cosh q = \ left (\ cosh A \ cdot \ cos |\ vec {u}| , \ sinh A \ cdot \ sgn |\ vec {u}| \ cdot \ sin |\ vec {u}| \ right)< /math>
• Tangent Hyperbolikus:
[itex] \ tanh q = \ frac {\ sinh q} {\ cosh q}< /math>

In addition the respective inverse ones:

• Inverse sine Hyperbolikus:
[itex] \ operator name {asinh} \,q = \ LN \ left (q + \ left| \ {q^2 sqrt + 1} \ right| \ right)< /math>
• Inverse cosine Hyperbolikus:
[itex] \ operator name {acosh} \, q = \ LN \ left (\ frac {- q} {\ left| \ {q^2 sqrt - 1} \ right| } \ right)< /math>
• Inverse tangent Hyperbolikus:
[itex] \ operator name {atanh} \, q = \ frac {\ LN (1+q) - \ LN (1-q)}{2} = \ frac {\ LN \ frac {1+q} {1-q}} {2}< /math>

## exponential function

One can define a continuation of the exponential function for quaternions q:

[itex] \ exp (q): = \ sum_ {k=0} ^ \ infty \ frac {q^k} {k!}[/itex]

This infinite row converged for each quaternion, and leaves itself cdot in

< the form> math \ exp (a+q_0) = e^a \ \ exp (q_0)< to /math>

writes, whereby [itex] q = A + q_0< /math> a quaternion alsoa real number of A and a pure quaternion [itex] q_0< /math> is.

The exponential of a pure quaternion [itex] q_0 = ix + jy + kz< /math> can be computed in such a way:

[itex] \ exp (q_0) = \ cos|q_0| + \ frac {q_0} {|q_0|} \ cdot \ sin|q_0| [/itex]

whereby

< math> |q_0| = |ix+jy+kz| =\ {x^2+y^2+z^2 sqrt} [/itex]

is. This equation goes for [itex] y=z=0 [/itex] into the Euler identity over:

[itex] \ exp (ix) = \ cos \ left|x \ right| + \ frac {i \ cdot x} {\ left|x \ right|} \ cdot \ sin \ left|x \ right| = \ cos (x) + i \ cdot \ sin (x) [/itex]

The exponential function fulfills for quaternions with [itex] off =ba< /math> the functional equation

< math> \ exp (a+b) = \ exp (A) \ exp (b)< /math>.

Otherwise that is not guaranteed, e.g. math

< \> exp (\ pi i) \ exp (\ pi j) = (- 1) \ cdot (- 1) = 1 /math< is >

but

< math> \ exp (\ pi i + \ pi j) = \ cos (\ pi \ sqrt {2}) + \ frac {i+j} {\ {2}} \ sin (\ pi \ sqrt {2}) \ neq 1 /math< sqrt>.

## practical applications

3D-Schnitt of a quaternionischen(4D) July to tightness

Arthur Cayley discovered that with quaternions turns in the area can be described. This is used nowadays within the range of the interactive Computergrafik, in particular with computer games, as well as with the control and regulation of satellites. When using quaternionsin place of turning stencils somewhat fewer arithmetic operations are needed. In particular, if many turns become combined with one another (multiplied), speed of operation rises. The moreover one quaternions, beside the Euler angles , become the programming of robots (e.g. ABB) used.

Since quaternions four-dimensional procedures describecan, extensive application type result. One can do without by the use of the quaternions usually separate equations for the computation of time and space. This offers advantages in physics, among other things in the areas mechanics, wave equations, special relativity theory and gravitation, electromagnetism as well as quantum mechanics.

In physics the matrix algebra, which is stretched by the Pauli stencils , is isomorphic to the quaternions. In particular the unit quaternions form a nontrivial overlay of the three-dimensional orthogonalen group SO (3), i.e. the group thatUnit quaternions is isomorphic to the group spin (3).

historical is important that Maxwell likewise published his set of equations 1873 in quaternion way of writing.

## related topics

similar constructions as the quaternions become sometimes under the name “hypercomplex numbers“in summary. For example the Cayley numbers or Oktaven are a eight-dimensional analogue to the quaternions.

## literature

• John H. Conway, Derek A. Smith, on Quaternios and Octonions, A K Peter's Ltd., 2003, ISBN 1568811349 (English)
• Jack B.Kuipers, quaternion and rotation Sequences, Princeton University press, 2002, ISBN 0691102988 (English)
• W. Bolton, Complex Numbers (Mathematics for Engineers), Addison Wesley, 1996, ISBN 0582237416 (English)
• Jack B. Kuipers, J. B. Kuipers, quaternion & rotation Sequences, Princeton UniversityPress, 1999, ISBN 0691058725 (English)
• Andrew J. Hanson, Visualizing of quaternion, Morgan buyer Publishers, 2006, ISBN 0120884003 (English)