Physics Library
 An open source physics library
Encyclopedia | Forums | Docs | Random | Template Test |  
Login
create new user
Username:
Password:
forget your password?
Main Menu
Sections

Meta

Talkback

Downloads

Information
[parent] example of quaternion norm (Example)

Quaternion Norm: Examples, Exercises, and Solutions

This entry is the self study companion to quaternion norm.

The quaternion norm is the Euclidean length of the four real quaternion components. It is also the square root of the real quaternion product $q q^*$. The norm is positive, multiplicative, and central to normalization and to the use of unit quaternions for three dimensional orientation.

All exercises are stated first. Complete worked solutions follow afterward.

Formula summary

For

$\displaystyle q = q_w + q_x\mathbf i + q_y\mathbf j + q_z\mathbf k,$ (1)

the conjugate is

$\displaystyle q^* = q_w - q_x\mathbf i - q_y\mathbf j - q_z\mathbf k. $

The squared norm is

$\displaystyle \lVert q\rVert^2 = q q^* = q^*q = q_w^2+q_x^2+q_y^2+q_z^2.$ (2)

Therefore

$\displaystyle \lVert q\rVert = \sqrt{ q_w^2+q_x^2+q_y^2+q_z^2 }.$ (3)

A unit quaternion satisfies

$\displaystyle \lVert q\rVert=1.$ (4)

For nonzero $q$, its normalized quaternion is

$\displaystyle \widehat q = \frac{q}{\lVert q\rVert}.$ (5)

The quaternion norm is multiplicative:

$\displaystyle \lVert pq\rVert = \lVert p\rVert \lVert q\rVert.$ (6)

For a real scalar $\lambda$,

$\displaystyle \lVert\lambda q\rVert = \vert\lambda\vert \lVert q\rVert.$ (7)

The set of unit quaternions is the unit three sphere

$\displaystyle S^3 = \left\{ q\in\mathbb{H}: \lVert q\rVert=1 \right\}.$ (8)

Exercises

  1. Direct norm calculation.

    For

    $\displaystyle q = 2 - \mathbf i + 2\mathbf j + 2\mathbf k, $

    compute

    $\displaystyle \lVert q\rVert^2 $

    and

    $\displaystyle \lVert q\rVert. $
  2. Norm from $q q^*$.

    Using the same quaternion as Exercise 1, compute $q^*$ and evaluate $q q^*$ directly.

    Verify that the result equals $\lVert q\rVert^2$.

  3. Real and pure quaternion norms.

    Compute the norms of

    $\displaystyle r=-7 $

    and

    $\displaystyle v = 3\mathbf i - 4\mathbf j + 12\mathbf k. $

    Relate the pure quaternion norm to the ordinary three dimensional Euclidean vector magnitude.

  4. Positive definiteness.

    Prove that

    $\displaystyle \lVert q\rVert\geq0$ (9)

    for every quaternion and that

    $\displaystyle \lVert q\rVert=0$ (10)

    if and only if

    $\displaystyle q=0. $
  5. Scaling law.

    For real $\lambda$, prove

    $\displaystyle \lVert\lambda q\rVert = \vert\lambda\vert \lVert q\rVert. $

    Then use

    $\displaystyle q = 1-2\mathbf i+2\mathbf j $

    and

    $\displaystyle \lambda=-3 $

    as a numerical check.

  6. Normalize a quaternion.

    Normalize

    $\displaystyle q = \begin{bmatrix} 2\ -1\ 2\ 2 \end{bmatrix}. $

    Verify explicitly that the normalized quaternion has unit norm.

  7. Normalization removes positive scale.

    Let

    $\displaystyle p=5q $

    for a nonzero quaternion $q$.

    Prove that

    $\displaystyle \frac{p}{\lVert p\rVert} = \frac{q}{\lVert q\rVert}. $

    What changes if

    $\displaystyle p=-5q? $
  8. $q$ and $-q$ have the same norm.

    Prove

    $\displaystyle \lVert-q\rVert = \lVert q\rVert. $

    For unit attitude quaternions, explain why this fact is compatible with the usual double representation of physical orientation.

  9. Unit axis angle quaternion.

    Let

    $\displaystyle q = \cos\frac{\theta}{2} - \widehat{\mathbf u} \sin\frac{\theta}{2}, $

    where $\widehat{\mathbf u}$ is a unit pure quaternion.

    Prove that

    $\displaystyle \lVert q\rVert=1 $

    for every real $\theta$.

  10. A nonunit axis angle lookalike.

    Suppose

    $\displaystyle q = \cos30^\circ - 2\mathbf k\sin30^\circ. $

    Compute $\lVert q\rVert$.

    Explain why merely resembling an axis angle formula does not guarantee unit norm.

  11. Prove multiplicativity.

    Using

    $\displaystyle \lVert q\rVert^2=q q^* $

    and

    $\displaystyle (pq)^*=q^*p^*, $

    prove

    $\displaystyle \lVert pq\rVert^2 = \lVert p\rVert^2 \lVert q\rVert^2.$ (11)

    Then conclude

    $\displaystyle \lVert pq\rVert = \lVert p\rVert \lVert q\rVert. $
  12. Numerical multiplicativity check.

    Let

    $\displaystyle p = 1+\mathbf i+\mathbf j+\mathbf k $

    and

    $\displaystyle q = 2-\mathbf i+2\mathbf j. $

    Compute $\lVert p\rVert$, $\lVert q\rVert$, $pq$, and $\lVert pq\rVert$.

    Verify multiplicativity numerically.

  13. Norm of a power.

    Using multiplicativity, prove that for every positive integer $n$,

    $\displaystyle \lVert q^n\rVert = \lVert q\rVert^n.$ (12)

    What follows when $q$ is unit?

  14. Unit quaternions are closed under multiplication.

    Let $p$ and $q$ both satisfy

    $\displaystyle \lVert p\rVert = \lVert q\rVert = 1. $

    Prove that

    $\displaystyle \lVert pq\rVert=1. $

    Explain why this closure property is important for composing orientation quaternions.

  15. Normalization and numerical drift.

    A computed quaternion state is

    $\displaystyle q = \begin{bmatrix} 0.9997\ 0.0100\ -0.0050\ 0.0200 \end{bmatrix}. $

    Compute its norm to at least six significant digits and normalize it.

    How large is the norm correction?

  16. Norm, storage order, and attitude convention.

    Package A stores a quaternion scalar first,

    $\displaystyle [q_w,q_x,q_y,q_z], $

    while Package B stores the same semantic quaternion scalar last,

    $\displaystyle [q_x,q_y,q_z,q_w]. $

    Show that both packages must compute the same Euclidean norm.

    Then explain why changing from an active attitude convention to the PhysicsLibrary passive convention does not change the definition of quaternion norm.

Solutions

Solution 1: direct norm calculation

For

$\displaystyle q = 2-\mathbf i+2\mathbf j+2\mathbf k, $

the squared norm is

\begin{equation*} \begin{aligned} \lVert q\rVert^2 &= 2^2+(-1)^2+2^2+2^2\ &= 4+1+4+4\ &= 13. \end{aligned}\end{equation*}

Therefore

$\displaystyle \lVert q\rVert^2=13$ (13)

and

$\displaystyle \lVert q\rVert=\sqrt{13}.$ (14)

Solution 2: norm from $q q^*$

The conjugate is

$\displaystyle q^* = 2+\mathbf i-2\mathbf j-2\mathbf k. $

The product is

$\displaystyle q q^* = (2-\mathbf i+2\mathbf j+2\mathbf k) (2+\mathbf i-2\mathbf j-2\mathbf k). $

The vector terms cancel, leaving

$\displaystyle q q^* = 2^2+(-1)^2+2^2+2^2. $

Hence

$\displaystyle q q^*=13.$ (15)

This agrees with

$\displaystyle \lVert q\rVert^2=13. $

Solution 3: real and pure quaternion norms

For

$\displaystyle r=-7, $

the norm is

$\displaystyle \lVert r\rVert = \vert-7\vert = 7.$ (16)

For

$\displaystyle v = 3\mathbf i-4\mathbf j+12\mathbf k, $

we have

\begin{equation*} \begin{aligned} \lVert v\rVert &= \sqrt{ 3^2+(-4)^2+12^2 }\ &= \sqrt{ 9+16+144 }\ &= \sqrt{169}\ &= 13. \end{aligned}\end{equation*}

Therefore

$\displaystyle \lVert v\rVert=13.$ (17)

A pure quaternion has zero scalar component, so its quaternion norm is exactly the ordinary Euclidean magnitude of its three vector components.

Solution 4: positive definiteness

The squared norm is

$\displaystyle \lVert q\rVert^2 = q_w^2+q_x^2+q_y^2+q_z^2. $

Every squared real number is nonnegative, so

$\displaystyle \lVert q\rVert^2\geq0. $

Taking the principal square root gives

$\displaystyle \lVert q\rVert\geq0.$ (18)

If

$\displaystyle q=0, $

then every component vanishes, so clearly

$\displaystyle \lVert q\rVert=0. $

Conversely, if

$\displaystyle \lVert q\rVert=0, $

then

$\displaystyle q_w^2+q_x^2+q_y^2+q_z^2=0. $

A sum of nonnegative real numbers can equal zero only when every term is zero. Thus

$\displaystyle q_w=q_x=q_y=q_z=0. $

Hence

$\displaystyle \lVert q\rVert=0 \quad\Longleftrightarrow\quad q=0.$ (19)

Solution 5: scaling law

Let

$\displaystyle q = q_w+q_x\mathbf i+q_y\mathbf j+q_z\mathbf k. $

Then

$\displaystyle \lambda q = \lambda q_w + \lambda q_x\mathbf i + \lambda q_y\mathbf j + \lambda q_z\mathbf k. $

Therefore

\begin{equation*} \begin{aligned} \lVert\lambda q\rVert &= \sqrt{ \lambda^2 (q_w... ...^2+q_z^2) }\ &= \vert\lambda\vert \lVert q\rVert. \end{aligned}\end{equation*}

Thus

$\displaystyle \lVert\lambda q\rVert = \vert\lambda\vert \lVert q\rVert.$ (20)

For

$\displaystyle q=1-2\mathbf i+2\mathbf j, $

$\displaystyle \lVert q\rVert = \sqrt{1+4+4} = 3. $

With $\lambda=-3$,

$\displaystyle \lVert-3q\rVert = 3(3) = 9. $

Directly,

$\displaystyle -3q = -3+6\mathbf i-6\mathbf j, $

whose norm is

$\displaystyle \sqrt{9+36+36} = 9. $

Solution 6: normalize a quaternion

For

$\displaystyle q = \begin{bmatrix} 2\ -1\ 2\ 2 \end{bmatrix}, $

the norm is

$\displaystyle \lVert q\rVert = \sqrt{13}. $

Therefore

$\displaystyle \widehat q = \frac{1}{\sqrt{13}} \begin{bmatrix} 2\ -1\ 2\ 2 \end{bmatrix}.$ (21)

Its squared norm is

\begin{equation*} \begin{aligned} \lVert\widehat q\rVert^2 &= \frac{1}{13} (4+1+4+4)\ &= 1. \end{aligned}\end{equation*}

Thus

$\displaystyle \lVert\widehat q\rVert=1.$ (22)

Solution 7: normalization removes positive scale

Let

$\displaystyle p=5q. $

By the scaling law,

$\displaystyle \lVert p\rVert = 5\lVert q\rVert. $

Therefore

$\displaystyle \frac{p}{\lVert p\rVert} = \frac{5q}{5\lVert q\rVert} = \frac{q}{\lVert q\rVert}. $

Hence

$\displaystyle \frac{p}{\lVert p\rVert} = \frac{q}{\lVert q\rVert}.$ (23)

If

$\displaystyle p=-5q, $

then

$\displaystyle \lVert p\rVert = 5\lVert q\rVert, $

so

$\displaystyle \frac{p}{\lVert p\rVert} = -\frac{q}{\lVert q\rVert}. $

Thus a negative real scale produces the negative normalized quaternion.

For unit attitude quaternions, that negative quaternion represents the same physical orientation, although it is a different point on $S^3$.

Solution 8: $q$ and $-q$ have the same norm

Use the scaling law with $\lambda=-1$:

$\displaystyle \lVert-q\rVert = \vert-1\vert \lVert q\rVert. $

Therefore

$\displaystyle \lVert-q\rVert = \lVert q\rVert.$ (24)

For unit attitude quaternions,

$\displaystyle \lVert q\rVert = \lVert-q\rVert = 1. $

The two antipodal points $q$ and $-q$ on $S^3$ represent the same physical orientation.

Thus equal norm is consistent with the usual double representation of the rotation group.

Solution 9: unit axis angle quaternion

Let

$\displaystyle q = \cos\frac{\theta}{2} - \widehat{\mathbf u} \sin\frac{\theta}{2}, $

where

$\displaystyle \lVert\widehat{\mathbf u}\rVert=1. $

The squared norm is

\begin{equation*} \begin{aligned} \lVert q\rVert^2 &= \cos^2\frac{\theta}{2} + \... ...2\frac{\theta}{2} + \sin^2\frac{\theta}{2}\ &= 1. \end{aligned}\end{equation*}

Therefore

$\displaystyle \lVert q\rVert=1.$ (25)

The negative vector sign required by the passive convention has no effect on the norm because the vector components are squared.

Solution 10: a nonunit axis angle lookalike

We have

$\displaystyle q = \cos30^\circ - 2\mathbf k\sin30^\circ. $

Since

$\displaystyle \cos30^\circ=\frac{\sqrt3}{2} $

and

$\displaystyle 2\sin30^\circ=1, $

the quaternion is

$\displaystyle q = \frac{\sqrt3}{2} - \mathbf k. $

Thus

\begin{equation*} \begin{aligned} \lVert q\rVert^2 &= \frac34+1\ &= \frac74. \end{aligned}\end{equation*}

Therefore

$\displaystyle \lVert q\rVert = \frac{\sqrt7}{2}.$ (26)

The axis coefficient has magnitude $2$ rather than $1$, so the pure direction being used is not a unit axis. The trigonometric appearance alone does not guarantee unit norm.

Solution 11: prove multiplicativity

Start with

$\displaystyle \lVert pq\rVert^2 = (pq)(pq)^*. $

Use product reversal under conjugation:

$\displaystyle (pq)^* = q^*p^*. $

Then

\begin{equation*} \begin{aligned} \lVert pq\rVert^2 &= (pq)(q^*p^*)\ &= p(qq^*)p^*. \end{aligned}\end{equation*}

The quantity $qq^*$ is real:

$\displaystyle qq^* = \lVert q\rVert^2. $

Real scalars commute with every quaternion, so

\begin{equation*} \begin{aligned} \lVert pq\rVert^2 &= \lVert q\rVert^2 pp^*\ &= \lVert q\rVert^2 \lVert p\rVert^2. \end{aligned}\end{equation*}

Therefore

$\displaystyle \lVert pq\rVert^2 = \lVert p\rVert^2 \lVert q\rVert^2.$ (27)

All norms are nonnegative, so taking square roots yields

$\displaystyle \lVert pq\rVert = \lVert p\rVert \lVert q\rVert.$ (28)

Solution 12: numerical multiplicativity check

For

$\displaystyle p = 1+\mathbf i+\mathbf j+\mathbf k, $

$\displaystyle \lVert p\rVert = \sqrt{1+1+1+1} = 2. $

For

$\displaystyle q = 2-\mathbf i+2\mathbf j, $

$\displaystyle \lVert q\rVert = \sqrt{4+1+4} = 3. $

Now compute the Hamilton product.

Write

$\displaystyle p=(1,[1,1,1]) $

and

$\displaystyle q=(2,[-1,2,0]). $

The scalar part is

$\displaystyle 1(2)-[1,1,1]\cdot[-1,2,0] = 2-1 = 1. $

The cross product is

$\displaystyle [1,1,1]\times[-1,2,0] = [-2,-1,3]. $

The vector part is

$\displaystyle [-1,2,0] + 2[1,1,1] + [-2,-1,3] = [-1,3,5]. $

Thus

$\displaystyle pq = 1-\mathbf i+3\mathbf j+5\mathbf k.$ (29)

Its norm is

\begin{equation*} \begin{aligned} \lVert pq\rVert &= \sqrt{ 1+1+9+25 }\ &= \sqrt{36}\ &= 6. \end{aligned}\end{equation*}

Meanwhile,

$\displaystyle \lVert p\rVert \lVert q\rVert = 2(3) = 6. $

Therefore

$\displaystyle \lVert pq\rVert = \lVert p\rVert \lVert q\rVert.$ (30)

Solution 13: norm of a power

For $n=1$,

$\displaystyle \lVert q^1\rVert = \lVert q\rVert. $

Assume

$\displaystyle \lVert q^n\rVert = \lVert q\rVert^n. $

Then by multiplicativity,

\begin{equation*} \begin{aligned} \lVert q^{n+1}\rVert &= \lVert q^n q\rVert\ ... ...\rVert^n \lVert q\rVert\ &= \lVert q\rVert^{n+1}. \end{aligned}\end{equation*}

Therefore by induction,

$\displaystyle \lVert q^n\rVert = \lVert q\rVert^n.$ (31)

If $q$ is unit,

$\displaystyle \lVert q\rVert=1, $

so

$\displaystyle \lVert q^n\rVert=1$ (32)

for every positive integer $n$.

Solution 14: unit quaternions are closed under multiplication

If

$\displaystyle \lVert p\rVert = \lVert q\rVert = 1, $

then multiplicativity gives

$\displaystyle \lVert pq\rVert = \lVert p\rVert \lVert q\rVert = 1. $

Therefore

$\displaystyle \lVert pq\rVert=1.$ (33)

Thus the product of unit quaternions is again a unit quaternion.

This is essential for orientation composition: multiplying two exact unit attitude quaternions produces another exact unit attitude quaternion without leaving $S^3$.

Solution 15: normalization and numerical drift

For

$\displaystyle q = \begin{bmatrix} 0.9997\ 0.0100\ -0.0050\ 0.0200 \end{bmatrix}, $

the squared norm is

\begin{equation*} \begin{aligned} \lVert q\rVert^2 &= 0.9997^2 + 0.0100^2 + (-0.0050)^2 + 0.0200^2\ &= 0.99992509. \end{aligned}\end{equation*}

Thus

$\displaystyle \lVert q\rVert \approx 0.999962544.$ (34)

The normalization scale factor is approximately

$\displaystyle \frac{1}{\lVert q\rVert} \approx 1.000037457. $

Therefore

$\displaystyle \widehat q \approx \begin{bmatrix} 0.999737446\ 0.010000375\ -0.005000187\ 0.020000749 \end{bmatrix}.$ (35)

The norm correction magnitude is

$\displaystyle 1-\lVert q\rVert \approx 3.7456\times10^{-5}. $

Thus the state was already close to unit, but normalization removes the small radial error.

Solution 16: norm, storage order, and attitude convention

Package A computes

$\displaystyle \lVert q\rVert = \sqrt{ q_w^2+q_x^2+q_y^2+q_z^2 }. $

Package B stores the same four numbers in a different order but computes

$\displaystyle \sqrt{ q_x^2+q_y^2+q_z^2+q_w^2 }. $

Real addition is commutative, so these are exactly equal.

Thus storage order does not alter quaternion norm.

Likewise, active and passive attitude conventions change how a unit quaternion is interpreted geometrically. They do not change the underlying four real components as an element of $\mathbb{H}$ or the Euclidean formula

$\displaystyle \lVert q\rVert = \sqrt{ q_w^2+q_x^2+q_y^2+q_z^2 }. $

Therefore the definition of quaternion norm is independent of active versus passive attitude semantics.

Compact review

The central norm identities reinforced by this companion are

$\displaystyle \lVert q\rVert^2 = q q^* = q^*q,$ (36)
$\displaystyle \lVert q\rVert = \sqrt{ q_w^2+q_x^2+q_y^2+q_z^2 },$ (37)
$\displaystyle \lVert\lambda q\rVert = \vert\lambda\vert \lVert q\rVert,$ (38)
$\displaystyle \lVert pq\rVert = \lVert p\rVert \lVert q\rVert,$ (39)

and

$\displaystyle \widehat q = \frac{q}{\lVert q\rVert} \qquad (q\neq0).$ (40)

Unit quaternions form $S^3$, and multiplicativity guarantees that products of unit quaternions remain on $S^3$.

Sources and exercise provenance

The exercises and solutions in this companion are newly written or expanded for PhysicsLibrary from the algebra developed in Quaternion Norm.

Hamilton is the foundational source for quaternion norm related quantities. Joly and Kelland–Tait provide classical systematic treatments. Sommer and coauthors provide a modern engineering discussion of unit quaternions and convention management.

Bibliography

1
W. R. Hamilton, Elements of Quaternions, 2nd ed., edited by C. J. Joly, Longmans, Green, and Co., 1899. Public domain historical source. Internet Archive scan
2
C. J. Joly, A Manual of Quaternions, Macmillan and Co., London, 1905. Public domain historical source. Internet Archive search
3
P. Kelland and P. G. Tait, Introduction to Quaternions, with Numerous Examples, 2nd ed., Macmillan and Co., London, 1882. Public domain historical source. Internet Archive search
4
H. Sommer, I. Gilitschenski, M. Bloesch, S. Weiss, R. Siegwart, and J. Nieto, “Why and How to Avoid the Flipped Quaternion Multiplication,” Aerospace, vol. 5, no. 3, article 72, 2018. Published under CC BY 4.0. Publisher article

License

Unless otherwise noted, this PhysicsLibrary entry is intended for release under the Creative Commons Attribution ShareAlike 4.0 International license.





"example of quaternion norm" is owned by bloftin.
(view preamble)
View style:
See Also: quaternion series overview and article guide, Notation Quaternions for Physics and Engineering: Orientation, quaternion definition and basic algebra, example of quaternion definition and basic algebra, quaternion product, example of quaternion product, quaternion conjugate, example of quaternion conjugate, quaternion norm, quaternion inverse, example of quaternion inverse, Axis Angle Representation and Unit Quaternion, example of Axis Angle Representation and Unit Quaternion, rotating vectors with quaternions, example of rotating vectors with quaternions, composition of rotations and quaternion order, example of composition of rotations and quaternion order, quaternions and direction cosine matrices, example of quaternions and direction cosine matrices, quaternions and Euler angles, example of quaternions and Euler angles, quaternion kinematics and angular velocity, example of quaternion kinematics and angular velocity, relative attitude and error quaternions, example of relative attitude and error quaternions, numerical quaternion propagation and IMU attitude state integration, example of numerical quaternion propagation and IMU attitude state integration, quaternion exercises for physics and engineering

Keywords:  quaternion, norm, magnitude, tensor, unit quaternion, exercises, worked solutions

This object's parent.

Cross-references: identities, composition, cross product, commute, conjugation, power, formula, representation, magnitude, vector, scalar, norm, quaternion product, square, quaternion, quaternion norm
There is 1 reference to this object.

This is version 2 of example of quaternion norm, born on 2026-08-28, modified 2026-08-28.
Object id is 1117, canonical name is ExampleOfQuaternionNorm.
Accessed 18 times total.

Classification:
Physics Classification02.10.Hh (Rings and algebras)
 02.10.Ud (Linear algebra)
Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:

No messages.

Interact
rate | post | correct | update request | add example | add (any)