|
|
|||||||
Take the fixed physical vector with frame A coordinates
The passive Rodrigues formula gives
![]() and
![]() Therefore
Thus
![]() Nothing physical has rotated. The coordinates changed because the frame axes rotated positively.
8 Direct quaternion multiplication for the same checkLet
![]() Then
![]() First,
![]() Then
![]() The direct Hamilton multiplication agrees with the passive Rodrigues formula.
9 The corresponding active vector rotationNow hold the coordinate frame fixed and physically rotate the vector through the same positive angle 𝜃 about the same axis. The active rotor is the conjugate of the passive frame quaternion:
The active vector rotation is
Repeating the derivation with the positive vector part gives the familiar active Rodrigues formula,
Thus the passive and active formulas differ only in the sign of the sine term when the same positive geometric angle and axis are used. For a positive 90∘ active rotation about +z,
![]() while for the corresponding positive 90∘ frame rotation,
![]() These statements are not contradictory. One rotates the physical vector; the other rotates the coordinate frame.
10 Inverse transformationStarting from the passive map
multiply on the left by (Bq A)∗ and on the right by Bq A. Since the frame quaternion is unit,
![]() Therefore
Using
![]() this becomes
The same sandwich structure is retained; only the frame quaternion is inverted.
11 Quaternion sign ambiguityA unit quaternion and its negative represent the same coordinate transformation. Because
![]() we have
![]() Therefore
produce exactly the same vector transformation. This double representation matters in numerical attitude estimation and interpolation because a sign change in the quaternion array does not imply a physical attitude jump.
12 Vector only implementationThe sandwich product can be evaluated without explicitly constructing two full quaternion products. Let
![]() be any unit Hamilton quaternion used in
![]() Expanding the sandwich product gives
Define
Then
This form is useful in software because it uses only vector additions, scalar multiplications, and cross products. For the canonical passive frame quaternion,
![]() so the same implementation automatically produces the passive sign. No special passive version of Hamilton multiplication is required.
13 Matrix formDefine the cross product matrix of a vector a by
so that
![]() For a unit quaternion
![]() the sandwich product corresponds to the matrix
Thus
For the passive frame quaternion
![]() equation (37) reduces to
Therefore
is exactly equivalent to the quaternion sandwich in equation (2). The inverse matrix relation is
14 A vector parallel to the rotation axisIf
![]() then
![]() and
![]() The passive Rodrigues formula becomes
![]() Therefore
The rotation axis is an eigenvector of the coordinate transformation with eigenvalue one.
15 A vector perpendicular to the rotation axisIf
![]() then the passive Rodrigues formula reduces to
The transformed coordinates remain in the plane perpendicular to the rotation axis. For the corresponding active rotation,
The opposite signs again reflect inverse geometric operations.
16 Why unit norm is requiredSuppose one attempts to use
![]() with q unit and real α≠1. Then
![]() and
![]() Therefore
The conjugate sandwich represents a pure orthogonal transformation only for a unit quaternion. For a general nonzero quaternion, a similarity transformation can instead be written
Since
![]() the scale factor then cancels. Orientation calculations normally avoid this extra division by maintaining the attitude quaternion at unit norm.
17 Implementation checksA quaternion vector transformation routine should pass several simple tests.
These checks detect sign, multiplication order, normalization, and active versus passive mistakes quickly.
18 Common pitfalls
19 Relationship to adjacent PhysicsLibrary entriesThe preceding article, Axis Angle Representation and Unit Quaternion, constructs the passive frame quaternion
![]() The present article shows how that quaternion acts on vector coordinates and derives its Rodrigues and matrix forms. A separate companion entry, Rotating Vectors with Quaternions: Examples, Exercises, and Solutions, provides the self study problem bank using the same passive convention. The next main article, composition of rotations and quaternion order, uses the sandwich action developed here to derive composition order, frame chains, intrinsic sequences, and the noncommutativity of finite rotations.
20 Sources and convention notesThe quaternion sandwich transformation is classical. Hamilton, Joly, and Hathaway develop quaternion rotation through conjugation by a unit quaternion or versor. Modern engineering sources often state the same algebra using active vector rotations. PhysicsLibrary retains Hamilton multiplication but takes the passive frame coordinate map as the canonical attitude object. Sommer and coauthors provide a useful modern discussion of Hamilton versus flipped quaternion multiplication and the interaction between multiplication convention and passive attitude mappings. The derivations in this entry are written specifically for the PhysicsLibrary passive convention.
References
[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 scan [3] A. S. Hathaway, A Primer of Quaternions, 1896. Public domain historical source. Project Gutenberg edition [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
LicenseUnless otherwise noted, this PhysicsLibrary entry is intended for release under the Creative Commons Attribution ShareAlike 4.0 International license. "rotating vectors with quaternions" is owned by bloftin.
Cross-references: composition, composition of rotations and quaternion order, Axis Angle Representation and Unit Quaternion, detect, identity, norm, operations, relation, matrix, vector additions, representation, conjugation, magnitude, quaternion norm, cross product, formula, scalar, quaternion product, vector, quaternions, unit There are 4 references to this object. This is version 5 of rotating vectors with quaternions, born on 2026-08-23, modified 2026-08-27. Object id is 1097, canonical name is RotatingVectorsWithQuaternions. Accessed 326 times total. Classification:
|
|
|
|
Pending Errata and AddendaNone.
|
DiscussionNo messages.
|
Interact |