<?xml version="1.0" encoding="UTF-8"?>

<record version="3" id="1090">
 <title>quaternion product</title>
 <name>QuaternionProduct</name>
 <created>2026-08-23 18:02:26</created>
 <modified>2026-08-26 02:45:58</modified>
 <type>Definition</type>
 <creator id="1" name="bloftin"/>
 <modifier id="1" name="bloftin"/>
 <comment>updated Related associations</comment>
 <author id="1" name="bloftin"/>
 <classification>
	<category scheme="pacs" code="02.10.Hh"/>
	<category scheme="pacs" code="02.10.Ud"/>
	<category scheme="pacs" code="02.10.Xm"/>
 </classification>
 <synonyms>
	<synonym concept="quaternion product" alias="quaternion multiplication"/>
 </synonyms>
 <related>
	<object name="QuaternionDefinitionAndBasicAlgebra"/>
	<object name="NotationQuaternionsForPhysicsAndEngineeringOrientation"/>
	<object name="QuaternionConjugate"/>
	<object name="QuaternionNorm"/>
	<object name="QuaternionInverse"/>
	<object name="QuaternionSeriesOverviewAndArticleGuide"/>
	<object name="ExampleOfQuaternionDefinitionAndBasicAlgebra"/>
 </related>
 <keywords>
	<term>quaternion</term>
	<term>Hamilton product</term>
	<term>scalar vector form</term>
	<term>dot product</term>
	<term>cross product</term>
	<term>pure quaternion</term>
	<term>commutator</term>
	<term>noncommutative algebra</term>
	<term>quaternion multiplication</term>
	<term>vector analysis</term>
 </keywords>
 <preamble>% this is the default PhysicsLibrary preamble.  as your knowledge
% of TeX increases, you will probably want to edit this, but
% it should be fine as is for beginners.

% almost certainly you want these
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

% used for TeXing text within eps files
%\usepackage{psfrag}
% need this for including graphics (\includegraphics)
%\usepackage{graphicx}
% for neatly defining theorems and propositions
%\usepackage{amsthm}
% making logically defined graphics
%\usepackage{xypic}

% there are many more packages, add them here as you need them

% define commands here</preamble>
 <content>\section*{Quaternion Product in Scalar Vector Form}

The component formula for multiplying two quaternions is correct but can look
like a collection of unrelated signs.  A more revealing form separates each
quaternion into a scalar part and a three dimensional vector part.  In that
notation the Hamilton product becomes a compact combination of the ordinary
dot product and cross product.

Let

\[
p=p_w+\mathbf p,
\qquad
q=q_w+\mathbf q,
\]

where $p_w$ and $q_w$ are real scalars and $\mathbf p$ and $\mathbf q$ are
pure quaternions identified with ordinary three dimensional vectors.  The
Hamilton product is

\begin{equation}
pq
=
\left(
p_wq_w-\mathbf p\cdot\mathbf q
\right)
+
\left(
p_w\mathbf q
+q_w\mathbf p
+\mathbf p\times\mathbf q
\right).
\end{equation}

Equivalently, writing a quaternion as the ordered pair
$(q_w,\mathbf q)$,

\begin{equation}
(p_w,\mathbf p)(q_w,\mathbf q)
=
\left(
p_wq_w-\mathbf p\cdot\mathbf q,\;
p_w\mathbf q+q_w\mathbf p+\mathbf p\times\mathbf q
\right).
\end{equation}

Equation (2) is one of the most useful quaternion formulas in physics and
engineering.  It exposes the geometric content of Hamilton multiplication and
makes the sign convention immediately visible: the PhysicsLibrary Hamilton
product contains the term $+\mathbf p\times\mathbf q$.

The later PhysicsLibrary attitude articles use passive coordinate
transformations.  That application convention does not change equation (2).
Hamilton algebra and active or passive attitude interpretation are separate
choices.

\section{Convention declaration}

PhysicsLibrary uses Hamilton multiplication,

\[
\mathbf i\mathbf j=\mathbf k,
\qquad
\mathbf j\mathbf k=\mathbf i,
\qquad
\mathbf k\mathbf i=\mathbf j,
\]

with reversed products changing sign.  Quaternions are displayed scalar first:

\begin{equation}
q
=
q_w+\mathbf q
\quad\longleftrightarrow\quad
\begin{bmatrix}
q_w\\
q_x\\
q_y\\
q_z
\end{bmatrix},
\end{equation}

where

\[
\mathbf q=q_x\mathbf i+q_y\mathbf j+q_z\mathbf k.
\]

The product convention is determined by the algebra, not by whether software
stores the scalar component first or last.

For comparison, a flipped multiplication used in some engineering literature
reverses the Hamilton factors.  Its scalar vector formula contains
$-\mathbf p\times\mathbf q$ instead of the plus sign in equation (2).
PhysicsLibrary does not use that multiplication unless an article explicitly
states otherwise.

\section{Product of two pure quaternions}

The key result behind equation (2) is the product of two pure quaternions.

Let

\[
\mathbf a
=
a_x\mathbf i+a_y\mathbf j+a_z\mathbf k
\]

and

\[
\mathbf b
=
b_x\mathbf i+b_y\mathbf j+b_z\mathbf k.
\]

Expand without changing the factor order:

\[
\begin{aligned}
\mathbf a\mathbf b
={}&amp;
a_xb_x\mathbf i^2
+a_xb_y\mathbf i\mathbf j
+a_xb_z\mathbf i\mathbf k\\
&amp;+a_yb_x\mathbf j\mathbf i
+a_yb_y\mathbf j^2
+a_yb_z\mathbf j\mathbf k\\
&amp;+a_zb_x\mathbf k\mathbf i
+a_zb_y\mathbf k\mathbf j
+a_zb_z\mathbf k^2.
\end{aligned}
\]

Using the Hamilton basis products gives the scalar part

\[
-\left(
a_xb_x+a_yb_y+a_zb_z
\right)
=
-\mathbf a\cdot\mathbf b,
\]

and the vector part

\[
\begin{aligned}
&amp;(a_yb_z-a_zb_y)\mathbf i\\
&amp;+(a_zb_x-a_xb_z)\mathbf j\\
&amp;+(a_xb_y-a_yb_x)\mathbf k,
\end{aligned}
\]

which is exactly $\mathbf a\times\mathbf b$.

Therefore

\begin{equation}
\mathbf a\mathbf b
=
-\mathbf a\cdot\mathbf b
+
\mathbf a\times\mathbf b.
\end{equation}

Equation (4) is the central bridge between Hamilton quaternion multiplication
and ordinary vector analysis.

\section{Deriving the general scalar vector product}

Write

\[
p=p_w+\mathbf p,
\qquad
q=q_w+\mathbf q.
\]

Distributivity gives

\[
pq
=
p_wq_w
+p_w\mathbf q
+\mathbf p q_w
+\mathbf p\mathbf q.
\]

Real scalars commute with quaternion factors, so

\[
\mathbf p q_w=q_w\mathbf p.
\]

Using equation (4),

\[
\mathbf p\mathbf q
=
-\mathbf p\cdot\mathbf q
+\mathbf p\times\mathbf q.
\]

Therefore

\[
\begin{aligned}
pq
={}&amp;
p_wq_w
-\mathbf p\cdot\mathbf q\\
&amp;+
p_w\mathbf q
+q_w\mathbf p
+\mathbf p\times\mathbf q.
\end{aligned}
\]

Separating scalar and vector parts gives

\begin{equation}
\operatorname{Sc}(pq)
=
p_wq_w-\mathbf p\cdot\mathbf q,
\end{equation}

and

\begin{equation}
\operatorname{Vec}(pq)
=
p_w\mathbf q
+q_w\mathbf p
+\mathbf p\times\mathbf q.
\end{equation}

Together, equations (5) and (6) reproduce equation (2).

\section{Connection to the component formula}

Let

\[
\mathbf p=
\begin{bmatrix}
p_x\\p_y\\p_z
\end{bmatrix},
\qquad
\mathbf q=
\begin{bmatrix}
q_x\\q_y\\q_z
\end{bmatrix}.
\]

The dot product is

\[
\mathbf p\cdot\mathbf q
=
p_xq_x+p_yq_y+p_zq_z,
\]

and the cross product is

\[
\mathbf p\times\mathbf q
=
\begin{bmatrix}
p_yq_z-p_zq_y\\
p_zq_x-p_xq_z\\
p_xq_y-p_yq_x
\end{bmatrix}.
\]

Substitution into equations (5) and (6) gives

\begin{equation}
[pq]_{\mathrm{PL}}
=
\begin{bmatrix}
p_wq_w-p_xq_x-p_yq_y-p_zq_z\\
p_wq_x+p_xq_w+p_yq_z-p_zq_y\\
p_wq_y-p_xq_z+p_yq_w+p_zq_x\\
p_wq_z+p_xq_y-p_yq_x+p_zq_w
\end{bmatrix}.
\end{equation}

Thus the compact scalar vector formula and the four component formula are
exactly equivalent.

\section{Geometric meaning of the pure quaternion product}

Equation (4),

\[
\mathbf a\mathbf b
=
-\mathbf a\cdot\mathbf b
+\mathbf a\times\mathbf b,
\]

contains both the metric and oriented geometry of three dimensional Euclidean
space.

If $\gamma$ is the angle from $\mathbf a$ to $\mathbf b$, then

\[
\mathbf a\cdot\mathbf b
=
\lVert\mathbf a\rVert
\lVert\mathbf b\rVert
\cos\gamma
\]

and

\[
\lVert\mathbf a\times\mathbf b\rVert
=
\lVert\mathbf a\rVert
\lVert\mathbf b\rVert
\sin\gamma.
\]

Therefore the scalar part of $\mathbf a\mathbf b$ contains the negative cosine
information, while the vector part contains the oriented sine information.

This is why quaternion multiplication is naturally sensitive to order:
the dot product is symmetric,

\[
\mathbf a\cdot\mathbf b
=
\mathbf b\cdot\mathbf a,
\]

but the cross product is antisymmetric,

\[
\mathbf b\times\mathbf a
=
-\mathbf a\times\mathbf b.
\]

\section{Reversing the product}

From equation (2),

\[
pq
=
\left(
p_wq_w-\mathbf p\cdot\mathbf q,\;
p_w\mathbf q+q_w\mathbf p+\mathbf p\times\mathbf q
\right).
\]

Reversing the order gives

\begin{equation}
qp
=
\left(
p_wq_w-\mathbf p\cdot\mathbf q,\;
p_w\mathbf q+q_w\mathbf p-\mathbf p\times\mathbf q
\right).
\end{equation}

The scalar parts are identical.  The difference lies entirely in the sign of
the cross product.

Subtracting gives the commutator

\begin{equation}
[p,q]
=
pq-qp
=
2\mathbf p\times\mathbf q.
\end{equation}

The commutator is therefore always a pure quaternion.

Adding the two products gives

\begin{equation}
pq+qp
=
2\left(
p_wq_w-\mathbf p\cdot\mathbf q
\right)
+
2\left(
p_w\mathbf q+q_w\mathbf p
\right).
\end{equation}

The cross product cancels from the symmetric combination.

\section{When do two quaternions commute?}

Equation (9) gives an immediate condition:

\[
pq=qp
\quad\Longleftrightarrow\quad
\mathbf p\times\mathbf q=0.
\]

Thus two quaternions commute exactly when their vector parts are parallel,
antiparallel, or one vector part is zero.

For example, every pair of quaternions of the form

\[
a+b\mathbf u,
\qquad
c+d\mathbf u,
\]

with the same fixed unit pure quaternion $\mathbf u$, commute with each other.
They form a two dimensional subalgebra isomorphic to the complex numbers.

\section{Important special cases}

\subsection*{Real scalar times a quaternion}

If $p=(a,\mathbf 0)$, then

\begin{equation}
pq
=
(aq_w,\;a\mathbf q).
\end{equation}

This is ordinary real scalar multiplication.

\subsection*{Two pure quaternions}

If $p=(0,\mathbf p)$ and $q=(0,\mathbf q)$, then

\begin{equation}
pq
=
\left(
-\mathbf p\cdot\mathbf q,\;
\mathbf p\times\mathbf q
\right).
\end{equation}

\subsection*{A pure quaternion squared}

Set $\mathbf q=\mathbf p$.  Because

\[
\mathbf p\times\mathbf p=\mathbf 0,
\]

equation (12) gives

\begin{equation}
\mathbf p^2
=
-\lVert\mathbf p\rVert^2.
\end{equation}

Therefore every unit pure quaternion satisfies

\[
\mathbf u^2=-1.
\]

This result is fundamental to the later axis angle exponential.

\subsection*{Parallel pure quaternions}

If $\mathbf b=\lambda\mathbf a$, then

\[
\mathbf a\times\mathbf b=\mathbf 0.
\]

Hence

\begin{equation}
\mathbf a\mathbf b
=
-\mathbf a\cdot\mathbf b,
\end{equation}

which is purely real.

\subsection*{Perpendicular pure quaternions}

If

\[
\mathbf a\cdot\mathbf b=0,
\]

then

\begin{equation}
\mathbf a\mathbf b
=
\mathbf a\times\mathbf b,
\end{equation}

which is pure.

For example,

\[
\mathbf i\mathbf j
=
\mathbf i\times\mathbf j
=
\mathbf k.
\]

Reversing the factors gives

\[
\mathbf j\mathbf i=-\mathbf k.
\]

\section{Hamilton and flipped multiplication}

The sign of the cross product is a direct convention diagnostic.

PhysicsLibrary Hamilton multiplication uses

\begin{equation}
(p_w,\mathbf p)(q_w,\mathbf q)
=
\left(
p_wq_w-\mathbf p\cdot\mathbf q,\;
p_w\mathbf q+q_w\mathbf p+\mathbf p\times\mathbf q
\right).
\end{equation}

If another source defines a flipped product by reversing Hamilton factors,

\[
p\otimes q\equiv qp,
\]

then its scalar vector form is

\begin{equation}
(p_w,\mathbf p)\otimes(q_w,\mathbf q)
=
\left(
p_wq_w-\mathbf p\cdot\mathbf q,\;
p_w\mathbf q+q_w\mathbf p-\mathbf p\times\mathbf q
\right).
\end{equation}

Therefore

\[
+\mathbf p\times\mathbf q
\]

identifies Hamilton multiplication and

\[
-\mathbf p\times\mathbf q
\]

identifies the reversed product when all other definitions are held fixed.

This algebraic distinction must not be confused with the later choice between
active and passive attitude interpretation.  PhysicsLibrary retains equation
(16) while using passive coordinate transformations for attitude.

\section{Worked example 1: product from scalar and vector parts}

Let

\[
p=2+\mathbf i-2\mathbf j+\mathbf k,
\qquad
q=-1+3\mathbf i+2\mathbf k.
\]

Then

\[
p_w=2,
\qquad
\mathbf p=
\begin{bmatrix}
1\\-2\\1
\end{bmatrix},
\]

and

\[
q_w=-1,
\qquad
\mathbf q=
\begin{bmatrix}
3\\0\\2
\end{bmatrix}.
\]

The dot product is

\[
\mathbf p\cdot\mathbf q
=
1(3)+(-2)(0)+1(2)
=
5.
\]

The cross product is

\[
\mathbf p\times\mathbf q
=
\begin{bmatrix}
-4\\
1\\
6
\end{bmatrix}.
\]

The scalar part is

\[
p_wq_w-\mathbf p\cdot\mathbf q
=
2(-1)-5
=
-7.
\]

The vector part is

\[
\begin{aligned}
p_w\mathbf q+q_w\mathbf p+\mathbf p\times\mathbf q
&amp;=
2
\begin{bmatrix}
3\\0\\2
\end{bmatrix}
-
\begin{bmatrix}
1\\-2\\1
\end{bmatrix}
+
\begin{bmatrix}
-4\\1\\6
\end{bmatrix}\\
&amp;=
\begin{bmatrix}
1\\3\\9
\end{bmatrix}.
\end{aligned}
\]

Therefore

\begin{equation}
pq=-7+\mathbf i+3\mathbf j+9\mathbf k.
\end{equation}

This agrees with the component calculation in the preceding PhysicsLibrary
article, \emph{Quaternion Definition and Basic Algebra}.

\section{Worked example 2: pure quaternion product}

Let

\[
\mathbf a=
\begin{bmatrix}
1\\2\\0
\end{bmatrix},
\qquad
\mathbf b=
\begin{bmatrix}
0\\1\\3
\end{bmatrix}.
\]

Their dot product is

\[
\mathbf a\cdot\mathbf b=2,
\]

and their cross product is

\[
\mathbf a\times\mathbf b
=
\begin{bmatrix}
6\\-3\\1
\end{bmatrix}.
\]

Therefore

\begin{equation}
\mathbf a\mathbf b
=
-2+6\mathbf i-3\mathbf j+\mathbf k.
\end{equation}

Reversing the factors keeps the scalar part and reverses the vector part:

\begin{equation}
\mathbf b\mathbf a
=
-2-6\mathbf i+3\mathbf j-\mathbf k.
\end{equation}

\section{Worked example 3: recovering the basis rule}

Take

\[
\mathbf a=\mathbf i,
\qquad
\mathbf b=\mathbf j.
\]

Because the two unit vectors are perpendicular,

\[
\mathbf i\cdot\mathbf j=0,
\]

and

\[
\mathbf i\times\mathbf j=\mathbf k.
\]

Equation (4) gives

\begin{equation}
\mathbf i\mathbf j=\mathbf k.
\end{equation}

Thus the familiar Hamilton basis rule is contained directly in the scalar
vector product.

\section{Common pitfalls}

\begin{enumerate}

\item \textbf{Using the wrong sign on the cross product.}
PhysicsLibrary uses Hamilton multiplication, so the vector part contains
$+\mathbf p\times\mathbf q$.

\item \textbf{Forgetting the minus sign on the dot product.}
For pure quaternions,
$\mathbf a\mathbf b=-\mathbf a\cdot\mathbf b+\mathbf a\times\mathbf b$.

\item \textbf{Treating quaternion multiplication as componentwise
multiplication.}
The dot and cross products couple all three vector components.

\item \textbf{Assuming the product of two pure quaternions is pure.}
Its scalar part is generally $-\mathbf a\cdot\mathbf b$.

\item \textbf{Assuming the product of two pure quaternions is real.}
Its vector part is generally $\mathbf a\times\mathbf b$.

\item \textbf{Interchanging factors.}
Reversing the factors reverses the cross product and therefore generally changes
the quaternion.

\item \textbf{Confusing storage order with multiplication convention.}
A scalar last array can still use Hamilton multiplication.

\item \textbf{Changing the cross product sign because the attitude convention
is passive.}
The passive PhysicsLibrary attitude convention does not alter Hamilton
multiplication.

\end{enumerate}

\section{Exercises}

The exercises are stated first so the article can be used for self study.
Complete solutions follow afterward.

\begin{enumerate}

\item \textbf{Derive the pure product.}
Starting from the Hamilton basis products, derive
\[
\mathbf a\mathbf b
=
-\mathbf a\cdot\mathbf b
+\mathbf a\times\mathbf b.
\]

\item \textbf{Scalar vector product.}
Let
\[
p=(2,[1,-2,1]^T),
\qquad
q=(-1,[3,0,2]^T).
\]
Compute $pq$ using equation (2).

\item \textbf{Reverse the order.}
For the quaternions in Exercise 2, compute $qp$ without repeating the complete
calculation.  Use the symmetry of the dot product and antisymmetry of the cross
product.

\item \textbf{Pure quaternion square.}
Prove from equation (4) that
\[
\mathbf a^2=-\lVert\mathbf a\rVert^2.
\]

\item \textbf{Unit pure quaternion.}
If $\lVert\mathbf u\rVert=1$, prove that $\mathbf u^2=-1$.

\item \textbf{Perpendicular vectors.}
Let $\mathbf a\cdot\mathbf b=0$.  Show that
\[
\mathbf a\mathbf b=\mathbf a\times\mathbf b
\]
and
\[
\mathbf b\mathbf a=-\mathbf a\times\mathbf b.
\]

\item \textbf{Parallel vectors.}
If $\mathbf b=\lambda\mathbf a$, show that $\mathbf a\mathbf b$ is purely real.

\item \textbf{Commutator.}
Derive
\[
[p,q]=2\mathbf p\times\mathbf q.
\]

\item \textbf{Commuting quaternions.}
Use Exercise 8 to prove that $p$ and $q$ commute if and only if their vector
parts are parallel, antiparallel, or one is zero.

\item \textbf{Convention diagnostic.}
A source states
\[
(p_w,\mathbf p)\star(q_w,\mathbf q)
=
\left(
p_wq_w-\mathbf p\cdot\mathbf q,\;
p_w\mathbf q+q_w\mathbf p-\mathbf p\times\mathbf q
\right).
\]
Does $\star$ agree with PhysicsLibrary Hamilton multiplication?  Explain.

\end{enumerate}

\section{Solutions}

\subsection*{1. Derive the pure product}

Expand

\[
\mathbf a
=
a_x\mathbf i+a_y\mathbf j+a_z\mathbf k
\]

and

\[
\mathbf b
=
b_x\mathbf i+b_y\mathbf j+b_z\mathbf k.
\]

The square terms contribute

\[
-a_xb_x-a_yb_y-a_zb_z
=
-\mathbf a\cdot\mathbf b.
\]

The mixed basis terms contribute

\[
(a_yb_z-a_zb_y)\mathbf i
+
(a_zb_x-a_xb_z)\mathbf j
+
(a_xb_y-a_yb_x)\mathbf k,
\]

which is $\mathbf a\times\mathbf b$.  Therefore

\[
\mathbf a\mathbf b
=
-\mathbf a\cdot\mathbf b
+
\mathbf a\times\mathbf b.
\]

\subsection*{2. Scalar vector product}

For

\[
p_w=2,
\qquad
\mathbf p=
\begin{bmatrix}
1\\-2\\1
\end{bmatrix},
\]

and

\[
q_w=-1,
\qquad
\mathbf q=
\begin{bmatrix}
3\\0\\2
\end{bmatrix},
\]

we have

\[
\mathbf p\cdot\mathbf q=5
\]

and

\[
\mathbf p\times\mathbf q=
\begin{bmatrix}
-4\\1\\6
\end{bmatrix}.
\]

Thus the scalar part is $-7$, and the vector part is

\[
2\mathbf q-\mathbf p+\mathbf p\times\mathbf q
=
\begin{bmatrix}
1\\3\\9
\end{bmatrix}.
\]

Therefore

\[
pq=-7+\mathbf i+3\mathbf j+9\mathbf k.
\]

\subsection*{3. Reverse the order}

The scalar part remains $-7$.  Reversing the factors changes

\[
\mathbf p\times\mathbf q
\]

to

\[
-\mathbf p\times\mathbf q.
\]

Therefore

\[
qp=-7+9\mathbf i+\mathbf j-3\mathbf k.
\]

\subsection*{4. Pure quaternion square}

Set $\mathbf b=\mathbf a$ in equation (4):

\[
\mathbf a^2
=
-\mathbf a\cdot\mathbf a
+
\mathbf a\times\mathbf a.
\]

Since

\[
\mathbf a\cdot\mathbf a=\lVert\mathbf a\rVert^2
\]

and

\[
\mathbf a\times\mathbf a=\mathbf 0,
\]

we obtain

\[
\mathbf a^2=-\lVert\mathbf a\rVert^2.
\]

\subsection*{5. Unit pure quaternion}

If $\lVert\mathbf u\rVert=1$, Exercise 4 gives immediately

\[
\mathbf u^2=-1.
\]

\subsection*{6. Perpendicular vectors}

If

\[
\mathbf a\cdot\mathbf b=0,
\]

then

\[
\mathbf a\mathbf b=\mathbf a\times\mathbf b.
\]

Reversing the factors gives

\[
\mathbf b\mathbf a
=
\mathbf b\times\mathbf a
=
-\mathbf a\times\mathbf b.
\]

\subsection*{7. Parallel vectors}

If

\[
\mathbf b=\lambda\mathbf a,
\]

then

\[
\mathbf a\times\mathbf b
=
\lambda\mathbf a\times\mathbf a
=
\mathbf 0.
\]

Therefore

\[
\mathbf a\mathbf b
=
-\mathbf a\cdot\mathbf b,
\]

which is purely real.

\subsection*{8. Commutator}

Use equations (2) and (8).  The scalar parts cancel, as do the terms
$p_w\mathbf q+q_w\mathbf p$.  The cross terms give

\[
\mathbf p\times\mathbf q
-
(-\mathbf p\times\mathbf q)
=
2\mathbf p\times\mathbf q.
\]

Hence

\[
[p,q]
=
2\mathbf p\times\mathbf q.
\]

\subsection*{9. Commuting quaternions}

The quaternions commute exactly when

\[
[p,q]=0.
\]

By Exercise 8 this is equivalent to

\[
\mathbf p\times\mathbf q=0.
\]

A cross product vanishes exactly when the two vectors are parallel,
antiparallel, or one is zero.

\subsection*{10. Convention diagnostic}

The operation $\star$ does not agree with PhysicsLibrary Hamilton
multiplication because its vector part contains

\[
-\mathbf p\times\mathbf q.
\]

PhysicsLibrary Hamilton multiplication contains

\[
+\mathbf p\times\mathbf q.
\]

The sign difference identifies a reversed or flipped multiplication when the
remaining definitions are held fixed.  It is not caused by scalar first or
scalar last storage, and it is not caused by the later passive attitude
interpretation.

\section{What comes next}

The scalar vector form makes several later quaternion identities almost
automatic.

For the conjugate,

\[
q^*=q_w-\mathbf q,
\]

equation (2) immediately shows why

\[
qq^*=q^*q
\]

is purely real: the cross product of $\mathbf q$ with itself vanishes.  That
result leads directly to the quaternion norm and inverse.

The later orientation articles use the same Hamilton product to construct
passive frame transformations.  No algebraic sign in equation (2) is changed
when the application changes from general quaternion algebra to passive
attitude representation.

\section{Sources and historical notes}

Hamilton's quaternion algebra contains both scalar and vector parts of products.
Later quaternion and vector analysis texts made the relationship to dot and
cross products increasingly explicit.  Joly's \emph{A Manual of Quaternions}
and Macfarlane's \emph{Vector Analysis and Quaternions} are useful public
domain historical references for this decomposition.

The modern PhysicsLibrary notation uses ordinary dot and cross product symbols
and scalar first quaternion components.  The exposition and worked examples in
this entry are newly organized for physics and engineering use.

\begin{thebibliography}{9}

\bibitem{Hamilton1899}
W. R. Hamilton,
\emph{Elements of Quaternions}, 2nd ed.,
edited by C. J. Joly,
Longmans, Green, and Co., 1899.
Public domain historical source.
\PMlinkexternal{Internet Archive scan}
{https://archive.org/details/elementsofquater01hamiuoft}

\bibitem{Joly1905}
C. J. Joly,
\emph{A Manual of Quaternions},
Macmillan and Co., London, 1905.
Public domain historical source.
\PMlinkexternal{Internet Archive scan}
{https://archive.org/details/manualofquaterni00jolyrich}

\bibitem{Macfarlane1906}
A. Macfarlane,
\emph{Vector Analysis and Quaternions},
John Wiley and Sons, New York, 1906.
Public domain historical source.
\PMlinkexternal{Project Gutenberg edition}
{https://www.gutenberg.org/ebooks/13609}

\bibitem{Sommer2018}
H. Sommer, I. Gilitschenski, M. Bloesch, S. Weiss, R. Siegwart, and J. Nieto,
``Why and How to Avoid the Flipped Quaternion Multiplication,''
\emph{Aerospace}, vol. 5, no. 3, article 72, 2018.
Published under CC BY 4.0.
\PMlinkexternal{Publisher article}
{https://www.mdpi.com/2226-4310/5/3/72}

\end{thebibliography}

\section*{License}

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