Why and How to Avoid the Flipped Quaternion Multiplication

Over the last decades quaternions have become a crucial and very successful tool for attitude representation in robotics and aerospace. However, there is a major problem that is continuously causing trouble in practice when it comes to exchanging formulas or implementations: there are two quaternion multiplications in common use, Hamilton's original multiplication and its flipped version, which is often associated with NASA's Jet Propulsion Laboratory. We believe that this particular issue is completely avoidable and only exists today due to a lack of understanding. This paper explains the underlying problem for the popular passive world to body usage of rotation quaternions, and derives an alternative solution compatible with Hamilton's multiplication. Furthermore, it argues for entirely discontinuing the flipped multiplication. Additionally, it provides recipes for efficiently detecting relevant conventions and migrating formulas or algorithms between them.


VII Conclusion 11
Appendix vectors and matrices in upper case bold letters.
If not specified otherwise matrices are always assumed to be in 4 , +, ⊙), quaternions, (1, i, j, k) ∶= (e i ) 4 i=1 U ∶= {q ∈ H q = 1}, unit length quaternions pq, ⋅, ⊙1 Hamilton's multiplication, i.e. ij = i ⋅ j = i ⊙ j = k ⊗ flipped mult.[1]: ∀p, q ∈ H ∶ q ⊗ p = p ⊙ q → q, I(q) ∶ H → R 3 , q = (q 1 , q 2 , q 3 , q 4 ) ↦ (q 2 , q 3 , q 4 ) I * (x) ∶ R 3 → H, x ↦ x 1 i + x 2 j + x 3 k ⇒ I ○ I * = id R 3 q ⊙ x, q ⊗ x both quaternion mult.are assumed overloaded for the pairs in R 3 × R 4 or R 4 × R 3 , such that the R 3 element is treated as purely imaginary quaternion: e.g.∀q ∈ R 4 , x ∈ R 3 ∶ x ⊗ q ∶= q ⊙ x ∶= q ⊙ I * (x) q quaternion conjugation, q ∶= (q 1 , −q 2 , −q 3 , −q 4 ) SO (3) [1] is one of the most important representations of the attitude in spacecraft attitude estimation and control."With these words Malcolm D. Shuster opened his introduction of [2], "The nature of the quaternion" (in 2008).It details on a conventional shift from Hamilton's original quaternion multiplication, ⊙, to its flipped version, ⊗, he had successfully advocated for in the 1990s -in particular with the very influential [1].There, the flipped multiplication was called natural2 and the original was called traditional.Because we consider "natural" too tendentious and because both labels are generally rather unknown we will refer to the former with Shuster's multiplication and to the latter with Hamilton's multiplication.Back then 3 , the goal of the introduction was to prevent confusion and mistakes when dealing with chains of rotations (compositions) motivated by the application of spacecraft attitude estimation and control [2].However, the introduced conventional split with other fields (e.g.mathematics, physics, or computer graphics / visualization) caused a lot of confusion and was a source for potential mistakes in practice at least in other fields, such as robotics.Therefore, in this paper, we advocate to undo this split by only using Hamilton's original multiplication.At the same time we show how an alternative solution can be used to solve the original problem addressed in [1].

A. Original problem and Shuster's solution
The historical problem with Hamilton's multiplication appeared only together with an arguably arbitrary, specific convention on how to assign direction cosine matrices (DCM) 4 , C S ∶ U → SO(3) to unit length quaternions.When using this assignment, as in [1], the product of two quaternions, p ⊙ q, would correspond to the product of the two corresponding DCMs, but with reversed order: ∀p, q ∈ U ∶ C S (p ⊙ q) = C S (q) ⋅ C S (p). ( I.e. the mapping, C S , was not a homomorphism (U, ⊙) → (SO(3), ⋅) but an antihomomorphism, which is generally more surprising and therefore more error-prone and less convenient.
Introducing the flipped ⊗ is Shuster's solution to this problem [1]: B. The problem today with Shuster's solution Since its introduction, a great fraction of spacecraft literature switched to ⊗ [2].On the other hand virtually the entire rest of the scientific community dealing with quaternions is apparently not following, and partially not even aware of this transition in the spacecraft estimation and control community as we will show in III.Having two different quaternion multiplications in use comes at a significant and continuous cost: formulas and implementations from the two different conventions need translation or adaptation let alone one first must identify which multiplication is used in a given formula or algorithm.The latter can be particularly tedious if the authors are not aware of the two possibilities and hence do not mention which one they use 5 .If a reader is unaware of the split, the discovery that two different quaternion multiplications are in use, and that in fact "the other" was employed, might be made only after several failures, during which the confusion may even have spread to third parties.This was already well observed in [3].
The troubles may be little per subject but they affected and will affect a significant number of scientist and engineers causing delays in the best case.This accumulated cost is particularly large for interdisciplinary domains such as robotics that lean on publications from both conventional worlds, for instance aerospace and computer vision.In fact, in robotics there are several recent publications for each of the two multiplications (see III).It is also a pressing matter because the effort to correct becomes larger with every new implementation or publication using a convention different from what the community agrees on eventually.

C. Contribution
Given this current situation, it is an interesting question whether the proposed switch was necessary or at least the best of all available options.Or phrased differently, whether some benefit is actually worth this conventional split or whether there is an economical alternative even when considering the effort already invested in the partial transition.Addressing these questions this work provides the following contributions: • identify the problem of two quaternion multiplications to improve awareness • investigate the necessity of the flip (2) to solve (1) • advertise and explain one alternative solution • demonstrate that this alternative yields more formal similarity to corresponding formulas using matrices • advocate to discontinue Shuster's multiplication in favour of Hamilton's original definition • provide recipes to detect and migrate between quaternion multiplication conventions To the best of our knowledge, this is the first work explicitly addressing the ambiguity of quaternion multiplication as a problem and proposing a potential solution.Our work allows for reducing the overall cost associated with having too many competing conventions about the same thing.

D. Outline
We start with important background information in II.In III, we summarize relevant contributions on quaternion multiplication related conventions, and tabulate their popularity in recent or influential 6 publications.Next, we propose an alternative solution in IV.Then we argue for discontinuing Shuster's multiplication in V. Lastly, we provide recipes for detecting and migrating rotation quaternion related conventions in VI.Further supplemental information is provided in the appendix.

REPRESENTATIONS
Physical rotations are conceptually rather unambiguous 7 .However, when it comes to describing them, there are two popular ways to do so.The active way is to describe what happens to the rotated body's points from a fixed world frame's perspective.The passive way is to describe how coordinates of fixed world points change from the perspective of the rotated body frame8 .It comes in two flavours, world-tobody (PWTB) and body-to-world (PBTW).The first describes the change from before rotation to after and the second from after to before 9 .We call these options the usage10 of the mathematical model to describe the physical rotation.Mathematically, the described actions on the observed points have identical properties in all three cases matching precisely the actions of the special orthogonal group (SO 11 ) on the underlying Euclidean space.But because given the same physical rotation, PWTB describes the inverse compared to PBTW, they yield mutually inverse group elements.Despite of being conceptually very different, the active usage yields always the same group element as PBTW.Consequentially we will often not distinguish these two.See App.C for an in-depth discussion of the various ways to use matrices to represent physical rotations.
The crucial consequence is that while every parametrization of the SO can be employed for all usages, switching usage from or to PWTB corresponds to an inversion.We believe that a lack of awareness for this fact ultimately led to the "problem" (1) (see V-E.4).The main target audience of this paper are those who favour the PWTB usage because the problem (1) is exclusive for the PWTB usage.

III. LITERATURE REVIEW
Not many publications discuss the multitude of possible conventions or argue for a specific choice, instead the common way seems to either just assume a convention or define one more or less completely before using it.
A. Literature on or introducing relevant conventions 1) Aerospace: According to [4] Shuster's multiplication, ⊗, was introduced in [5].It was later proposed as a standard in [6] according to [7].Unfortunately, the exact details are impossible for us to reconstruct as NASA is not publishing [6].In [8] the authors derive a homomorphic composition rule for Euler (symmetric) parameter (ESP) 12 (effectively ⊗) and infer a required conjugation from ESP to Hamilton's quaternions.In IV we are proposing the same quaternion values as alternative solution but with different derivation.According to [1, p.473] (7 years later), the authors of [8] in fact preferred Shuster's multiplication over Hamilton's.This indicates that they considered Euler parameter together with Shuster's multiplication a separate representation distinguished from Hamilton's quaternions by a conjugation.
In [2] the author describes the transition from Hamilton's ⊙ to Shuster's ⊗ for "spacecraft attitude estimation and control" literature : "Hamilton's approach to quaternions . . ., seemingly in universal use until the publication of reference [9] and still in almost universal use until the publication of reference [1], which, probably, more than any other work, has been responsible for the change to the natural order of quaternion multiplication in spacecraft attitude estimation and control.This was, in fact, an avowed purpose of the author of reference [1].But although nearly every writer on spacecraft attitude is aware now of reference [1], which is cited frequently, he or she may not be aware of the inconsistency of reference [1] with many other works on quaternions."In[1] ⊗ is indeed derived as necessity given some requirements, of which one was the correspondence C S .In order to demonstrate a clear trend towards generally adopting the new multiplication order [2] cites recent publications dealing with rotation quaternions: four using Shuster's multiplication and one using Hamilton's multiplication.The fact that the first were all aerospace paper and the last a book on applied mathematics might be related to Shuster's observation in [1], when explaining why mathematicians might not have changed the quaternion multiplication order: "The concern of pure mathematics is not in representing physical reality efficiently but in exploring mathematical structures . . .As engineers, our interest is in "im-pure" mathematics, contaminated by the needs of practical application."A major struggle with the quaternion conventions within NASA is reported in [10], including the discussion of a major conventional switch from the official Space Shuttle program to the (American) International Space Station software standard.The author compares these two conventions with a third convention that he calls Robotics.Neither [1] nor [2] are mentioned in [10] despite their apparent relevance.The only easily accessible reference in [10] for quaternions, [11], uses Hamilton's multiplication and also does not mention Shuster's work.
The Navigation and Ancillary Information Facility (NAIF), a sub organization of NASA's Jet Propulsion Laboratory (JPL), uses Hamilton's multiplication everywhere in their primary software suite called SPICE [12].In that document, the authors introduce two conventions: SPICE Quaternions, using Hamilton's multiplication, and Alternate Style Quaternions, using Shuster's multiplication.They present important formulas in both "styles" and stress intensively how important it is to pay attention to the small difference in the details.The authors use the short terms SPICE quaternions and Engineering quaternions and describe the first with "Invented by Sir William Rowan Hamilton; Frequently used in mathematics and physics textbooks" and the second with "Widely used in aerospace engineering applications" (e.g.cspice/qxq c).

B. Popularity in influential and recent literature
In Table I we group publications, which are recently dealing with rotation quaternions, by which quaternion multiplication is used, by the type of publication, and the scientific community for books and papers.Of course, this is merely a small selection of corresponding publications in the respective fields.Within these constraints the table shows: All relevant online general purpose or mathematical encyclopedias, which we could find, use Hamilton's multiplication (without mentioning any alternatives).And so do all major software packages.Most of them also use precisely the quaternion to matrix mapping we suggest as part of an alternative solution to (1) in IV.The only scientific communities we could find using Shuster's multiplication are aerospace and robotics.Both seem to be still divided.Even NASA itself and it's substructure JPL seem to be divided to this day.

IV. PROPOSED ALTERNATIVE SOLUTION
The alternative solution we suggest for the original problem (1) is to use a different correspondence rule, C H ∶ U ∋ q ↦ C S (q).Assuming we keep fixed how rotation matrices 14 The references are roughly in chronological order. 15Parentheses decorate differences from a default (article, passive worldto-body usage): (B) book, (-) no rotations used, (a) active usage, (w) passive body-to-world usage, (aw) ≃ (a) or (w), (!) antihomomorphic QM-convention (i.e. using C S in the Hamilton column). 16This is an unclear case since the documentation of the multiplication function states: "Returns the product of two quaternions as Q2*Q1", where the multiplication function arguments are in the order Q1, Q2.I.e.Shuster's multiplication is implemented while the documentation uses Hamilton's multiplication (implicitly).
q,⊗ Fig. 1.Active (or passive body-to-world; outer ring) and passive (worldto-body; inner ring) representatives of a single physical rotation and their mutual conversions: black lines convert only between active and passive, green convert between different parametrizations, and red additionally invert.
The bold lines on the left (Hamilton multiplication only) constitute the homomorphic convention suggested in this paper.It is suitable for everybody preferring passive world-to-body for q and C. The rare users of passive rotation vectors would entirely remain in the inner circle.Clinging to the green conversion from the common active φ to q even if the quaternion is intended to be employed passively, as done in [1] leads to the situation on the right (using Shuster's multiplication when employing quaternions passively).This neglects the option of the highlighted passive q (on the left) and thus requires the flipped multiplication, ⊗, and inevitably breaks the symmetry between C and q on the right compared to the left.
represent rotations, this new correspondence inverts the corresponding quaternion.It also yields the desired homomorphy from quaternions to rotation matrices together with ⊙ and the usual matrix multiplication: This suggestion might give the wrong negative impression of an "additional" inversion.But it could equally well be that for C S the "wrong" (inverted) quaternions were chosen.In fact our observations in V-E.4 support this interpretation and allow it to be explained as follows: the mistake to use active quaternions in a passive usage scenario led to C S , which in turn led to flipping the multiplication, while choosing appropriate passive quaternions would have lead to C H and no need to flip the multiplication.Please note that both solutions yield the usual way to apply the rotation represented by a quaternion 17 (see VI-B.2.e): We are going to refer to the C H rotation quaternions with Hamilton's rotation quaternions because they yield homomorphy together with Hamilton's quaternion multiplication (see V-C).

A. Overview
First of all, it is important to emphasize that the question which quaternion multiplication to use commonly, should be considered as a pragmatic question.Conceptually there is no problem with any of the two multiplications or with having two multiplications commonly used.Having said that, our main argument is as follows: 1) Both multiplications are equally capable and interchangeable for every application: As we explain in V-B one multiplication is as good as the other in terms of applicability.For example to represent rotations.There is a difference for those rare people who use the components of a rotation quaternion intuitively.However, for these we suggest a better alternative in V-G.Having both "available" at the same time does not add extra expressiveness because one can always be substituted by the other with flipped arguments.
2) One of the two multiplications should be discontinued: Having two quaternion multiplications in formulas and software comes at a significant and ongoing cost (see I-B, III), but does not provide benefits (see V-A.1).
3) Hamilton's multiplication is preferable: Hamilton's multiplication is predominant over all existing publications.This is because i) it is about 150 years older, and ii) Shuster's multiplication did not spread to mathematics or theoretical physics and probably will never do.The latter arises from the fact that both disciplines have very different needs that typically do not even lead to the original problem (1) as already observed in [1].To the best of our knowledge it only spread from aerospace to parts of robotics, which has similar needs and is strongly influenced (among others) by aerospace literature.Also, Hamilton's multiplication is used by the vast majority of current software (libraries) (see Table I).Interestingly this includes the SPICE package developed at NAIF for and as part of the very same JPL at which Shuster's multiplication was proposed as a standard [6].These observations make it extremely difficult to discontinue Hamilton's multiplication instead.Even more so, pure mathematics should be almost impossible to influence in that respect because it is against the very nature of mathematics to change such a definition without an inner-mathematical reason.
Additionally, as we show in V-E.3, Hamilton's multiplication has its benefits over Shuster's from a formal point of view.These benefits make it less error prone if combined with the alternative quaternion to rotation matrix mapping, C H , which is at least as old and well-known 18 as C S .It is typically used whenever rotations are represented actively or PBTW (see II).Because of that, C H is also already predominant among existing software implementations (see Table I).
Employing C H also for the very popular PWTB usage, as we suggest, has a consequence that one could consider its biggest drawback: It introduces the comparatively rarely seen passive quaternion (see Table II, Fig. 1), and thus induces an unusual conversion from an active rotation vector, φ: q(φ) = exp(−0.5φ).Eventually, the original problem (1) leaves two options: i) introducing an unusual quaternion multiplication (Shuster's solution) or ii) introducing an unusual conversion from the active rotation vector to the (passive) rotation quaternion (used e.g. in [8]).Having only these two options is probably the very difficulty behind the overall struggle and what prevented a standardization so far (see III).Also, general purpose text books do not help resolving this issue as they typically do consider neither i) nor ii) by either accepting antihomomorphy or only consider active / PBTW usage (see III-B).
Our position, in favour of ii), emerges from rephrasing the question equivalently: What should be specific for the passive usage of quaternions when compared to the active usage, their multiplication or the conversion to the active 19rotation vector?It reveals an immediate argument for ii): the conversion from active rotation vector to passive quaternion should even be expected to be different from its conversion to an active quaternion (compare also II).An argument against i) is that the multiplication is used much more often, because conversions are merely interface operations and usually do not appear where the heavy lifting is done.Also, if we have to chose the multiplication depending on the usage of quaternions to represent rotations, which multiplication is right for other applications?Furthermore, it is very unusual and therefore unexpected that a fundamental algebraic operation such as a multiplication is a matter of dispute and convention, while it is quite common for representations.Finally, the very same question for rotation matrices was answered historically: there is no flipped matrix multiplication in regular use.Instead it is fully accepted that there is an active and a passive rotation matrix mutually inverse and related differently to an active rotation vector.Why not accept the exact same for rotation quaternions while employing them for exactly the same purpose?

B. Equal capability argument
In this section we explain why both multiplications are equally capable to support V-A.1).The migration recipes in VI-B show that any algorithm or formula can be migrated between the two multiplications with very simple steps: just introduce quaternion conjugation at some places and exchange all multiplications.This already shows that both multiplications can provide the same service to the user (writer, reader, programmer), as the migration concepts work in both directions.
The question remains whether one implementation could be computationally more efficient than the other.However, one should easily be convinced that the extra cost for some additional conjugations is negligible for most use cases since it only involves scalar negations.Furthermore, for very performance critical parts of an implementation, the negations can almost always be statically merged into other operations or simplified away mathematically (compare also V-F).

C. Formal differences
One major problem when writing about representations for rotations is that there are many different representations and for most of them there are multiple conventions concerning their details and mutual relation (see e.g.[1], [3] or App.C).In fact there is not even a reliable agreement on what precisely proper rotations are (e.g.active vs. passive rotations) ormore generally -how to distinguish the different things to represent.
For this section we choose a different approach: we restrict ourselves to the relation between unit quaternions and special orthogonal matrices while leaving open how the latter are used to represent physical rotations or similar.This way the analysis stays general and less complex because most of the usual complexity comes from the how and what to represent.This strategy is possible because there is a common aspect considering all usual ways to model proper physical rotations with matrices: They formulate a one to one relationship with the special orthogonal R 3×3 matrices, SO(3) ∶= {C ∈ R 3×3 C T = C, det(C) = 1} with their group operation (matrix multiplication) corresponding to some composition of rotations -just in different ways.The direction cosine matrix used in the introduction as an example is only one possible interpretation of SO(3).See App.C.2 for a discussion of all the common interpretations.
This little common ground is already enough to formulate the original problem when restricting it to the relation between unit quaternions, U ∶= {q ∈ H = (R 4 , +, ⊙), q = 1}, and SO(3) by entirely forgetting about their potential usage.This relation has different meaning depending on which meaning is assigned to U and SO(3) but all common formal possibilities how to map U to SO(3) can be analyzed entirely without referring to this meaning.This way a thorough formal comparison becomes more tractable.
Because of this possibility we will, after introducing some essential notions, adopt a purely formal perspective to compare the common different ways for how to map U to SO(3) and its relation to the quaternion multiplication and rephrase the original problem in that context.This will leave us with two optimal solutions: the one that was suggested in [1] and the one we are proposing to adopt instead.To compare them further we will investigate the relation to the cross product, the rotation vector and the angular velocity in V-E.3 and additionally to the active usage in V-E.4.These comparison will show significant differences in favour of the solution including Hamilton's multiplication.After that we are going to verify that non of the other perspectives, numeric, algorithmic and intuition give strong reasons for one of the two option over the other.In particular, we will explain why non of them performs better from any of these other perspectives.This way, overall, our suggestion will remains as preferable.

D. Essential notions
To support a concise communication in this V-C it is important to clarify some essential notions, namely rotation and convention of rotation representation.
1) Rotation: For the sake of simplicity we refer to 3dimensional proper rotations or attitude / orientation or coordinate transformations between orthonormal coordinate systems with just rotations.Despite the fact that these are quite different concepts this is possible because for this paper's cause and arguments their distinction is irrelevant.
2) Partial rotation convention: In order to allow reliable arguments for a claim like both multiplications are equally capable we need some rigorous notion to specify what precisely we compare.As tools for rotation representation the quaternion multiplications do not stand alone.Instead they need to be combined with rules such as how to use them to rotate a vector, which typically involve choosing one of multiple available options (see for example the binary choices of [3]).A set of such rules / determinations is often referred to as convention.What we actually want to compare are classes of such conventions.For instance the class of conventions using Hamilton's multiplication with the class using Shuster's multiplication.
One way to support this would be to define the convention notion in a rigorous way.But this is difficult mostly because it is not clear what specifications are necessary for a convention to be complete.In practice it is very different how much authors actually specify when they declare the convention they use in a text.Typically not more than needed for that text, which is highly dependent on the text.This problem we avoid by introducing the new concept of a partial rotation convention or shorter partial convention.They can play the role of convention classes without relying on a rigorous notion of a complete / full convention.
We refer to any set of arbitrary determinations concerning rotation representation, i.e. not necessary in that particular way, with partial rotation convention.These determinations can be explicit or implicit, i.e. logical / mathematical consequences from the explicit determinations.This is quite analogous to the notion of an axiom system for a given domain.Therefore we call the explicit determinations axioms.Examples of such determinations are conversion rules between rotation parametrizations, how a orthogonal matrix is interpreted as rotation, or how to multiply two rotation quaternions.Fortunately it is not necessary for our cause to specify all kind of determinations that can be made by a partial convention.a) Consistency: A partial convention not contain contradicting axioms we call a consistent partial convention.One hypothetical non-consistent example could be when a convention includes all conversion rules in the triangle of unit quaternions, orthogonal matrices, and angle axis parameters but converting a quaternion first into angle axis and then into a matrix can yield a different result from when the same quaternion is directly converted to a matrix.We only care for consistent conventions.
b) Natural partial order: These partial conventions naturally posses a partial order, just like sets induced by their inclusion.We say a partial convention, C, is included in another convention, D, (C ⊆ D), iff the union of their determinations would yield a consistent partial convention and this union would not determine anything more than D. This fits well the intuitive expectation that when adding an axiom to a convention it becomes a larger convention.In practice it is sufficient and necessary for C ⊆ D that all axioms of C are also determined by D. This makes it particularly easy for a C with only a few axioms.c) QM-convention: We call a partial convention that determines a map from unit quaternions to orthogonal matrices and a particular quaternion multiplication a QM-convention.We call a partial convention, C a minimal QM-convention iff it is a QM-convention and minimal with respect to their partial order, i.e. there is no partial convention Ĉ ⊆ C such that it isn't also C ⊆ Ĉ.Such a partial convention does not determine anything more than absolutely necessary for a QM-convention.One important fact about partial conventions is that everything that can be inferred from the axioms of a given convention applies to all larger partial conventions.This ultimately makes our investigation of minimal QM-conventions in V-E relevant for the partial conventions used in practice, which are typically (much) larger.

E. Mathematical / formal perspective
Given a way to represent rotations with matrices there are different approaches to employ unit quaternions, U, as representation for physical rotations.One approach, the matrixinduced method, is to parametrize these matrices with unit quaternions, by specifying a surjective mapping U → SO(3), and retrieve the induced rotation representation by the unit quaternions.Others approaches are to model rotations directly with unit quaternions or specify their relation to other available rotations representations.Once a unit quaternion representation is given the conversion to any other representation including any matrix representation can be formally retrieved.Any such conversion from unit quaternion representation to a matrix representation would yield a surjective mapping U → SO(3).It must be surjective because the matrices are one to one representations in all cases.I.e.leaving one out would mean missing a physical rotation.Therefore one can find the the same representation applying the matrix-induced approach.
For this section we are adopting the matrix-induced approach because it involves a minimal number of choices while being at least as powerful.We assume the choice for a specific matrix representation to be fixed but unknown to make sure the analysis does not depend on that choice.We are going to compare a set of two mappings only, C H , C S , from U to SO(3), which can be uniquely defined by (4).To the best of our knowledge, these two mappings constitute effectively all mappings that were found and successfully used in the history of representing physical rotations.
1) Problem formalization: By the means of both mappings the unit quaternions become singularity free parametrizations of SO(3), the Euler-Rodrigues parameters in case of M 1 .The problem, (1), comes with the comparison of matrix and quaternion multiplication, each inducing a Lie-group structure on the respective sets, through M 1 and M 2 .It turns out that the mappings C H , C S are -from this algebraic perspective -smooth and surjective group homomorphisms (C H ) and antihomomorphisms (C S ) respectively from U to SO(3): This property follows immediately from the defining property (4), because both multiplications (quaternion and matrix) are associative.
When switching from (U, ⊙) to its opposite group U op = (U, ⊗) with the flipped multiplication, as suggested by [1], a very similar statement becomes true, with the only difference that -as in general when switching one group to its opposite group -homomorphisms and antihomomorphisms switch places when kept fixed as mappings between the two sets, because the identity mapping between the two is an antiisomorphism.
Because U and U op are isomorphic, by means of and because C S = C H ○ Ψ ∧ C H = C S ○ Ψ they also switch places with respect to property (4): The historic problem (1) and action consequently taken can now be phrased as follows: Experience in spacecraft attitude estimation and control showed that dealing with rotation quaternions that behaved antihomomorphic compared to the orthogonal matrices used for the same purpose was error prone and unaesthetic.It was antihomomorphic, because C S was the mapping used together with Hamilton's quaternion multiplication, as in the second part of (5).For some reason it was out of question to change the mapping from quaternion to matrix from C S to C H .And therefore, it was suggested to flip the quaternion multiplication order -the only alternative left besides flipping the matrix multiplication order -to fix the antihomomorphy of (1).
In this paper we are claiming that it would have been better to switch from C S to C H instead, see V-A.3).
The four possible outcomes of the two binary choices, (C, ⋆) ∈ {C H , C S } × {⊙, ⊗}, yield all the minimal QMconventions included in any of the usual convention used in practice.Hence all considerations concerning those four applies to all convention practically used, only depending on which of these four are included 20 .
From the purely formal perspective it is well understandable that the two homomorphic QM-conventions (HQMC), (C H , ⊙) and (C S , ⊗), are favourable over the antihomomorphic QMconventions, (C S , ⊙) and (C H , ⊗).In [3] partial conventions including the antihomomorphic pairs are not even considered possible conventions, because there the choice of the multiplication determines the mapping from quaternions to matrices by assuming the homomorphy through (9), as beyond dispute -and we can only agree with that.
It is also apparent that there is nothing to be gained by choosing one option over the other among the two homomorphic QM-conventions -from this formal perspective.Both fulfill the same and only relevant and desired properties for a homomorphic QM-convention, as observed in ( 4), ( 6) and ( 5), (8).
a) Extension to the entire quaternions algebra: Sometimes derivations or algorithms exploit the fact that the unit quaternions are embedded in the algebra and skew-field of quaternions, H.But even together with this embedding the two options are isomorphic and therefore equally capable.This can be seen as follows.The mapping where q denotes the quaternion conjugate of q, is a skewfield isomorphism (H, ⊗) → (H, ⊙).This can be easily verified using the well-known antihomomorphy properties of quaternion conjugation.Furthermore, Ψ is an extension of ψ onto H in the sense that restriction of Ψ onto U is ψ.
Additionally the quaternion norm ⋅ defining U commutes with Ψ.This implies that the embedding relation between U and H fully compatible with Ψ. Please note that Ψ does not keep the imaginary units i, j, k invariant.Instead they get mapped to their negative.
2) Seeking formal differences that allow for a preference: So far the formal comparison could not yield any preference for one of the two HQMCs.Therefore in this section we are going to discuss the effect of this choice on the relation to additional rotational concepts.Namely the rotation vector and the angular velocity.Including these concepts in the comparison (Table II) will finally reveal an important difference.Why these two extra concepts?First they suffice to formulate our argument and second the reasoning in [1] for flipping the quaternion multiplication was also only based on no further concepts.
First we briefly introduce the two additional concepts as far as needed for the comparison.While introducing them we will implicitly adopt conventions that not everybody would agree with as is true for all other possible decisions.This keeps the formulas more simple.And to compensate for the lack of conventional neutrality we demonstrate in App.B that the conclusions we draw from the comparison are in fact not depending on the these particular conventional choices.a) Rotation vector parametrization: Considering a rotation vector, φ ∈ R 3 (magnitude corresponds to magnitude of rotation (rad) and axis to the axis of rotation) gives rise to a conversion formulas from rotation vector to quaternion or matrix.Again we fix the formal functional relation instead of referring to any interpretation: In literature the name rotation vector isn't consistently used.Other names are Euler vector or angle-axis vector.One compatible and very common interpretation is for example the direction cosine matrix (DCM), C(φ) from a coordinate frame A to a frame B and a rotation vector φ, expressed in A and describing the rotation necessary to rotate the basis of A to overlap with the basis of B assuming a right hand rule interpretation of the axis direction.The rotation vector parametrization is in closely related to the angle-axis parametrization, (α, u) ∈ R × R 3 , with α > 0 ∧ u = 1 by φ = αu This is precisely the interpretation used in [1].After fixing this relationship the choice between (C H , ⊙) and (C S , ⊗) now defines different mappings from the rotation vector to the quaternion as expressed in Table II.
b) Angular velocity: As a physical concept it is one of the more complex to introduce.For the purpose of this paper it is enough to define it in coordinates through the following well-known kinematic equation, given some DCM-trajectory C(t) transforming coordinates with respect to frame A into B-coordinates, with the coordinate frames as subscripts: The second equation is already a consequence of the first, by means of the assumed transformation property of C.
3) Formal comparison independent of the usage: In Table II we compare the two homomorphic conventions based on important identities.The φ denotes a rotation vector in R 3 .The symbol pair (C, ⋆) denotes either (C H , ⊙) or (C S , ⊗) depending on the column of the right hand side of the formula.The convention-factors α C , α φ ∈ {−1, 1} 21 encode the usage of rotation matrices (α C ) and rotation vectors (α φ ).The usage of the quaternion follows from α C given the chosen (C, ⋆) and is identical to α C for homomorphic QM-conventions.We'll look deeper into their effect in V-E.4.The indices A and B for the angular velocities, ω, indicate differences stemming from various usage choices regarding ω.Depending on these choices one of the two formulas is correct.C H (p⊙q) C S (p⊗q) C(q)x I(q ⋆ I * (x) ⋆ q −1 ) I(p ⋆ q) The neutral differences are highlighted in blue.Green vs. red highlights the benefits of (C H , ⊙) in terms of more similarity between corresponding rotation matrix and quaternion equations.The table clearly shows that (C H , ⊙) yields more formal similarity with the rotation matrices when related to rotation vectors or angular velocities: The alternative, (C S , ⊗), does introduce a difference in sign for the expressions involving φ or ω (− instead of +) compared to the matrix cases.This difference in similarity with the corresponding rotation matrix formula does not depend on the interpretation/usage (encoded in α C , α φ , A, B) but only on the choice of the HQMC (see App. B).
Table II also indicates that additionally flipping the cross product (negating the ⋅ × ) would change the similarity argument 21 T in favour of (C S , ⊗).In fact it seems probable that this lack of formal similarity was one reason to introduce the matrix valued operator [[φ]] ∶= −φ × in [1, p. 445].Unfortunately, this is hard to verify because it was introduced only because this "matrix turns out to be more convenient overall".In [2] this matrix was abandoned again in favour of [φ×] ∶= φ × , which had already been mentioned in [1, p. 445] with the words "Some authors define instead [φ×] ∶= −[[φ]]".
4) Formal comparison distinguishing active and passive usage: A further symmetry aspect in favor of Hamilton's multiplication becomes apparent if we compare both active and passive usage of matrices and quaternions (see II and Fig. 1).This yields the Table III, again using the factor α φ to encode the usage of the a given rotation vector φ.In contrast to Table II, which assumes an arbitrary but single usage for rotation matrices and quaternions, it compares both usages (corresponding values in column 2 and 3).Each row corresponds to a rotation representation: rotation matrix and three different flavours of rotation quaternions, each yielding homomorphic conversion to the rotation matrix in row 1.The table shows that neither using Shuster's multiplication for the passive and Hamilton's for active usage (row 3), nor a full switch to Shuster's multiplication (row 4) can yield the same level of form-similarity, when compared to the rotation matrices, as the proposed Hamilton only (row 2) option (similarity flaws are marked in red vs. green).Hamilton only (proposed) 2) q(φ) exp(+α We could not find a single reference from back then that distinguishes active and passive rotation quaternions despite the fact that this distinction was well-known at the time for rotation matrices.This seems odd today as rotation quaternions are applied to coordinates fully analogous to rotation matrices.Historically this could stem from the fact that quaternions were apparently misunderstood as consisting of "physical" vectors and scalars [1], [2].Given this misunderstanding the two usages made no sense.One of the important contributions of [1] was in fact to free rotation quaternions from this misconception for the aerospace attitude estimation and control community [2].Possibly this insight came to late to prevent the problematic abuse of active quaternions for the passive usage. Another important reason could have been that the rotation vector to quaternion conversion was initially copied while overlooking that it was using active quaternions.This is strongly indicated by how [1] writes about [22] that clearly uses active quaternions (see also App.F).

5) Why care about formal similarity between matrices and quaternions?:
There is mostly one problem with little flaws in form similarities: they are error prone, as already found in [2] to justify the change proposed in [1]: "System development will be less prone to error if the multiplication rule for quaternions has the same order as that for the corresponding rotation matrices." This might seam like a weak argument and to many it probably seems that it isn't enough to change an old convention for.But it was a lack of similarity that started the whole discussion in the first place.One could have just accepted that quaternions were multiplied "the other way", (1).The first change of convention to (C S , ⊗) was motivated and solely justified by a gain in similarity (same multiplication order).Switching to (C H , ⊙) instead would have yielded the same gain concerning multiplication order plus the additional similarity in sign highlighted in Table II.
However, the major and most important difference remains in with which convention the two alternatives break: The former with the quaternion multiplication order and the latter with the correspondence between rotation quaternions and rotation matrices.These conventions are very different.Most importantly in how close they are to application vs. pure math.In general it is much better to first question the convention closer to application because typically these convention have not settled over such a long time and it did not necessarily had to prove itself withing a bigger picture.Another important difference back then was that the quaternion multiplication was undoubted while the quaternion to matrix conversion was already defined in competing ways as M. D. Shuster observed himself in [1, p. 473] (see also App.F).

F. Algorithmic and numeric perspective
From an algorithmic perspective sometimes even representations that are fully isomorphic are still not equally preferable for example because one might better fit the machine architecture.However, this particular choice between (C H , ⊙) and (C S , ⊗) is very unlikely to have any impact on numeric efficiency or stability.This can be seen as follows: Any existing algorithm using one of the two HQMCs can be transformed into an algorithm using the other convention by applying Φ from (11) to all relevant quantities (see VI-B.1.a).It is apparent that the effective numerical difference between versions of the algorithms is a sign flip on either the real or imaginary part for all quaternions involved.
The coordinate-vectors to be rotated do not need to be changed at all as shown in Example VI-B.2.e.In summary the only difference remaining is the partial sign flips on the quaternions.
While tedious to proof formally, it seems intuitively convincing for this change not to be able to introduce numerical instability because it is only a partial mirroring of a parameter space.Concerning run-time efficiency it should not make any significant difference because almost for any usual operation the sign flip can be statically merged into other operations, such as scaling or addition without any extra cost.

G. Intuitive perspective
One very special purpose of rotation representation is to allow an intuitive understanding of the space of spatial rotations.The axiomatic requirements, to preserve the origin, lengths and angles, is good to understand what a rotation does.But in order to imagine the full range of rotations parametrizations can be very useful tools.In this section, we will refer to this use case of a parametrizations as the "rotation range intuition" (=:RRI).The most useful for RRI is probably the angle axis concept and the closely related rotation vector since they immediately yield the very intuitive concepts of a rotation axis and a rotation magnitude and a rotation direction.One could see unit quaternions as almost as useful for that task because they are quite close to an angle axis: their imaginary part does indeed indicate the axis of rotation and both real and imaginary part the magnitude of rotation.And the direction can be retrieved similarly to angle axis.However, at least in order to retrieve the actual magnitude an application of the arc cosine is required.
For those who really use quaternions as an intuitive device the decision between (C H , ⊙) and (C S , ⊗) has relevance for RRI because the rotation direction flips when inverting the quaternion.This might be a historical reason for why the relation q = exp(−φ 2) seemed wrong and was rejected as an alternative.Here a two arguments that counter this argument: a) Use pain angle-axis instead: Since computers can easily translate any quaternion convention into an angle-axis pair there is no need for any human to work with quaternions intuitively.We propose to solely lean on angle-axis or rotation vectors for RRI and similar intuitive tasks and use algorithms to convert between them and other representations wherever necessary.
b) Consider the active usage: Many scientists, for example from other fields such as mathematics or physics, are used to think intuitively of rotations from the active perspective (see App. C.3).For those it is natural to use quaternions actively, i.e. to rotate vectors by the means of their coordinates instead of translating coordinates between coordinate frames.Such an active quaternion must be inverted when compared to the passive quaternion often used in robotics or attitude estimation and control, assuming that everybody agrees on one multiplication.Therefore both equations, q 1 = exp(−φ 2) and q 2 = exp(φ 2) will be inevitably used somewhere.The decision between (C H , ⊙) and (C S , ⊗) can only decide which of the two perspectives has to live with the minus.Of course, one could argue here that this is the very reason to have two multiplications and only one formula, q = exp(φ 2).But the fact that there are active and passive perspectives on rotations is unavoidable and useful as it allows a truly different perspective.Why should it not be reflected in conversion formulas?It is reflected in the corresponding to matrix formulas (see V-E.4).In fact the minus in q 1 = exp(−φ 2) can be interpreted as reminiscence to the transitions from an active, φ to a passive q 1 , given the (C H , ⊙) choice.The other formula, q 2 = exp(φ 2), would in that case describe the relation between an active quaternion, q 2 , and an active φ.On the other side two multiplication are neither useful nor unavoidable both because they merely yield an (anti)isomorphic structure.

VI. RECIPES
In this section we give some practical advice to a) identify QM-conventions and b) migrate between them.

A. How to detect which QM-convention is used
Given some convention, C, it can be important to find out which QM-convention is actually included, i.e. which minimal QM-convention D is included in C (D ⊆ C).This could be for example in order to find out whether it is necessary to translate formulas (VI-B) or conjugate quaternion values to interface with a piece of software.As already mentioned in V-D.2.b it is sufficient to check whether the axioms of a candidate convention, D are compatible with C to conclude that D ⊆ C. All interesting minimal QM-conventions are determined by two binary choices, which quaternion to matrix map, C, and which quaternion multiplication, ⋆.Therefore, it is enough to determine these two choices, which can be done as follows (see App. D for further details): 1) For the quaternion multiplication: one of the easiest ways is to find out the result of the product i ⋆ j.If the result is k then ⋆ = ⊙ otherwise it is −k and ⋆ = ⊗24 (see also Table II).
2) The quaternion to matrix conversion: can be identified by applying it to a suitable test quaternion, e.g.q T ∶= √ 0.5(1, 0, 0, 1) 2).This test can also be performed on a matrix to quaternion conversion.It maps C T to ±q T if C H is used and to ±q T in case of C S25 .

B. Migrating from one QM-convention to another
There are several efficient ways to migrate a tool (e.g.formulas, derivations, proofs, publications or algorithms and implementations) between QM-conventions, where migration shall refer to a transformation after which the tool does exactly the same job but with all quaternions going in or out being compatible with the target convention.We introduce here two powerful alternative procedures, translate and interface, that are applicable to all types of tools.Both procedures migrate between the two homomorphic QM-conventions 26 .It can be very helpful to first decompose a tool into smaller sub-tools and migrate each with the most advantageous procedure.For this it is crucial that the boundaries of the components composing the tool are clear and yield a distinct and total decomposition.For an equation any directed acyclic graph (DAG) graph of logic, predicate and function evaluation expressions, including nullary expressions (i.e.constants or variables), resembling the same equation, would be a candidate decomposition, no matter how big the individual expressions are (highly ambiguous!).An algorithm is usually already decomposed into functions, but it might help considering a different decomposition.
1) The two migration procedures: See App.A for a sketch of a correctness proof.For both procedures a successive mathematical simplification step (mostly merging in quaternion conjugations) is recommended to avoid complexity inflation.a) Translate: Replace all quaternion valued constants, c ∈ H, within the tool with their conjugated value, c, and all quat.multiplications with their flipped version (⊗↔⊙).
b) Interface: Conjugate all quaternion valued inand outputs of the tool 27 .Components of a partial quaternion (i.e.not constituting a complete quaternion) going in or out should be treated as plain real numbers and not changed.For these components it is important to treat them consistently: it must not happen that e.g. a real number going out of one component is considered part of a full quaternion on a receiving component.If this seems to happen an additional sub tools needs to be defined doing the assembly from real number (components / coordinates) into a quaternion and that sub tools must be migrated as well.Please note that interfacing does not change the interior of the tool.While this can save effort it does not get rid of the other convention, it is just contained within the tool.For most tools this is therefore more a temporary solution 28 .
2) Examples: Next, we provide some examples, mostly taken from Table II, while suggesting efficient ways to migrate them: , which simplifies to i ⊙ j = k.Interfacing it would not change it since it has no inputs and only a logic output, which should and would remain true.

VII. CONCLUSION
In this paper, we suggested an alternative solution to the antihomomorphy problem that lead to the introduction of the flipped quaternion multiplication.We further proposed to discontinue its use in favour of Hamilton's original definition combined with the suggested alternative solution.To argue for this we gave evidence of the cost of maintaining two multiplications and showed that for principal reasons there cannot be any significant capability benefit in using the flipped multiplication for theory or algorithms.Only those few who might (still) use quaternions to support their rotation intuition and use the passive world to body perspective have objective reason to prefer the flipped multiplication.To those we can only recommend to use angle axis parameters since they are even better suited for intuition.Additionally, we demonstrated that the formal similarity between matrices and quaternions, when related to angular velocity or rotation vectors, is in favour of the Hamiltonian multiplication independently of any other conventional decision as long as the definition of the cross product is not additionally questioned.Furthermore, we provided recipes for how to migrate formulas and algorithms from one quaternion multiplication to the other as well as how to detect which convention is used in a given context.inflation layer (effectively translating all source C into the target C; see Example VI-B.2.d).Since M ( T ) would be used through conversions using the target C, which would cancel out the translated inflation, causing the same effective input output behaviour as M (T ) and therefore different from T .It follows T ≃ M ( T ), while ¬Q( T ).Furthermore T must have been already translated: If it had been interfaced (as a whole) M ( T ) would exactly behave as T , because the interfacing conjugation effectively revokes the translation of the inflation, rendering M into an equivalence transformation, contradicting T ≃ M ( T ).It follows M doesTranslate T and, since component-wise translating is equivalent to translating as a whole also M doesMigAsAWhole T .
3) T is no counter example: It is well-known and straight forward to verify that conjugation is a structure isomorphism (H, +, ⊙,⋅) ≃ (H, +, ⊗,⋅) that lets the embedding R ⊂ H invariant.Since T can only use the quaternions by means of their structure and their relation to R (nothing more is defined about them after all) replacing all quaternion constants according to the isomorphism and all operations with their isomorphic partners, as precisely done by the translation procedure, cannot change its input-output behavior for nonquaternions.Therefore ¬Q(T ) ∧ M doesTranslate T contradicts T ≃ M (T ) and proves the claim.

B. Proof: Hamilton QM-convention always yields more similarity
Let C be a consistent partial convention that is a homomorphic QM-convention and additionally determines a mapping, C.q ∶ R 3 → U from rotation vectors to the unit quaternions.
1) Rotation vector to matrix and rotation quaternion conversions: As C is consistent it holds for all φ ∈ R 3 that C.C(C.q(φ)) = C.C(φ), with C.C denoting the rotation vector to matrix conversion determined by C. Assuming the right side has the form with some a ∶ R 3 → R 334 it holds necessarily using the exponential map of quaternions, exp 35 , because for all x ∈ R 3 it holds, independently of C, that Due to the definition of C H it follows, for the case that (C H , ⊙) is sub convention of C, (and therefor C.C U = C H ): which yields analogously for this case C.q(φ) = α exp(−I * (a(φ) 2)).
Comparing ( 16) and ( 18) with ( 14) it becomes evident that the second case, (C S , ⊗) being part of C, always yields an extra −.
2) Angular velocity kinematic equation: Our definition for the angular velocity, (13), was for a specific interpretation of the rotation matrix C and assignment of frames.However, all common conventions and frame assignments yield very similar equations.In fact to the best of our knowledge they all have one of the two forms: with β ∈ {−1, 1} and C(t) a rotation matrix trajectory.
For the following we assume the first form.The claim can be shown for the second analogously.
Firs we observe that a QM-convention, q ↦ C(q), completely determines the corresponding relation to the quaternion trajectory, q(t) representing the same trajectory as C: with a convention-factor γ ∶= 1 for (C H , ⊙) and γ ∶= −1 for (C S , ⊗).
The last equality of ( 20) is not trivial but can be extracted from known identities as follows.Table II contains a wellknown special case of (20) for β = −1 and ω = ω A : Multiplication with −β proofs the last equality of (20).And comparing (20) with the assumed ω × = βC −1 Ċ, shows that γ = 1 yields more similarity independently of β and therefore any conventional decision beyond the QM-convention.

C. Representing 3d proper rotations with matrices
In this section we aim at clarifying the different kinds of "rotation matrices" and the distinction about active and passive rotations as far as needed for the arguments presented in the rest of the paper.For that we first we briefly define the setup and some notions we need in order to define rotation matrices.Second we define rotation matrices in three different ways.After that we explain their relation to the usages, active and passive, and how those are related to the composition of rotations.
1) Rotations in 3d-Euclidean space: First we need a general setup in which to define rotations in three dimensions.The Euclidean three dimensional vector space E 3 with the scalar-product ⟨⋅, ⋅⟩ is sufficient.A linear map Φ ∶ E 3 → E 3 is a proper 36 rotation iff it preserves the scalar product and the orientation.It is important to note, that Φ is not a matrix, but just a map mapping abstract vectors to abstract vectors.A basis, B = (b i ) 3 i=1 , we call a positively oriented orthonormal basis (PONB) iff it is of positive orientation and orthonormal, i.e. ⟨b i , b j ⟩ = δ ij

And we write
Three competing major approaches to represent a rotation with a matrix: Given a PONB, B = (b i ) 3 i=1 there are three major approaches of representing a rotation Φ with a matrix: (a) The representing matrix 37 of the rotation with respect to a PONB B, such that for all vectors v ∈ E 3 : This is typically used in mathematical literature.But one could have flipped R B Φ and [v] B interpreting the latter as row-vector 38 and define this way the transposed matrix.(b) The change-of-basis matrix that transforms the coordinates of all fixed vectors v ∈ E 3 when the PONB B is rotated, with respect to which the coordinates of v are given before and after the rotation: In all three cases the resulting matrix is itself orthogonal (so its transposed is its inverse) and it has determinant 1 (this corresponds to Φ preserving the orientation).They all depend on the choice of the basis B but not one to one.In general given a second PONB C which results from applying the rotation Ψ on B the representing matrices are all connected by the following conjugation, while M denotes one of R, B, C: But they are not all the same in value (in definition they are clearly different).In fact the following always holds: 37 Yes, this name seems a bit unfair -compared to the others, since we are talking about how to represent a rotation with a matrix.But the other common name for that matrix connected to a general linear map is "transformation matrix".Unfortunately this name is often specialized to the matrix representing elements of the special euclidean group -at least in the robotics community. 38The usual identification of R 3 with R 3×1 is purely conventional.
Hence, considering only the values of R, B, C leads to two different rotation matrices (for a given basis and a given rotation) always being a mutually inverse pair.
3) Usage and Composition: The value of R is called the active rotation matrix and the value of B, C the passive rotation matrix for the rotation Φ with respect to B. The motivation behind active is the fact that the definition of R is based on how Φ rotates B while the idea behind passive is that B is based on how the coordinates of a fixed v change when switching basis.We call these different ways to use a rotation matrix its usage.However, as we mentioned before, all the definitions include an arbitrary binary choice that taken differently would lead to the transposed / inverse matrix.Therefore the assignment of active and passive to the values of rotation matrices seems arbitrary or purely conventional, too.Especially it is unclear why the definitions are not aligned such that at least they all lead to the same matrix.The reason is that for various applications the important difference between the available matrices is not their definition but what the standard matrix product corresponds to in terms of rotations.Because for every pair of invertible matrices, X, Y it holds (XY) −1 = Y −1 X −1 it actually makes a difference whether one uses the orthogonal matrix R or its inverse, e.g. C.And switching between the two options has the same effect on the result as flipping the two represented rotations or the two matrices.Both resulting matrices correspond to a composition of two rotations, Φ, Ψ with a significant difference.Using R as active and C as the passive matrix: The active matrix, R, matches the composition order, Φ after Ψ, with its multiplication order when one keeps the basis of representation (24).The inverse, passive matrix, C does the same iff one represents the second rotation with respect to the second (rotated first) basis (26).In other words the passive is better suited when from the applications domain it is preferable to switch the reference basis with each rotation (e.g.attitude estimation and control) and the active is preferable whenever it is preferable to keep the reference frame fixed for all the composed rotations.In contrast to the definitions above this difference is not arbitrary or conventional.And therefore the labels active and passive, i.e. the usage of a rotation matrix, would be more robustly defined using these properties with respect to composition of rotations.
The big confusion concerning rotation matrices is causedin our opinion -by the fact that papers and textbooks from different disciplines seemingly fight for the authority to define which definition deserves the label "rotation matrix" instead of mentioning the two fundamental options and explicitly choosing the one that is more suitable for a given use case.Of course somebody who only knows about one definition and usage of rotation matrices will be confused when reading texts that call the inverted matrix "the rotation matrix".

E. C++ library Eigen
The fastest way to find out what multiplication Eigen seems to be a small test program.Running this program will output ( i * j ).z()=1, which proves 39  that ij = k holds for the implemented multiplication, * .

F. Historic investigation
Malcolm D. Shuster opened the introduction of [2], "The nature of the quaternion", with : "The quaternion [1] is one of the most important representations of the attitude in spacecraft attitude estimation and control. . . .For a brief historical discussion of the quaternion and other attitude representations with references, see reference [1, pp. 495 -498].After such a long passage of time, the quaternion should be well understood and free of ambiguities.Surprisingly, the truth is different, one of the most important inconsistencies has arisen during the past 30 years.The two most important confusions concern the order of quaternion multiplication and the nature of the quaternion "imaginaries," both of which are the subject of this article. . . .That work ( [1]) has been cited very frequently within the astrodynamics community over the past fifteen years, and its formulation seems to have become standard there."What had happened before these 30 years?The answer can also be found in [2]: "Hamilton's approach to quaternions . . ., seemingly in universal use until the publication of reference [9] and still in almost universal use until the publication of reference [1], which, probably, more than any other work, has been responsible for the change to the natural order of quaternion multiplication in spacecraft attitude estimation and control.This was, in fact, an avowed purpose of the author of reference [1].But although nearly every writer on spacecraft attitude is aware now of reference [1], which is cited frequently, he or she may not be aware of the inconsistency of reference [1] with many other works on quaternions."To indicate a clear trend towards generally adopting the suggested natural multiplication order [2] mentions: "Of the more recent texts, four . . .follow the conventions of reference [2] and cite it, and one [14] follows the traditional approach."What he did not mention is that these four were, one of his, and three other publications of aerospace engineers, while the one still using Hamilton's multiplication was from applied mathematics.This is nevertheless interesting and might and related to Shuster's own observation when reflecting about why mathematicians might not have reformed the quaternions in [1]: "The concern of pure mathematics is not in representing physical reality efficiently but in exploring mathematical structures . . .As engineers, our interest is in "im-pure" mathematics, contaminated by the needs of practical application." Interestingly the very author of [9] was referencing [1] as the source of the "natural" multiplication order in [51] and in [52].
In any case a very important contribution of [2] and [1] is to give up the concept of physical vectors somehow embedded in the algebraic quaternion structure: "There is no need for the vectors of the quaternion space to be also vectors in physical space.It is sufficient that there be an isomorphism, as there is between physical vectors and their column-vector representations." In [1, p. 473] the author claims that Hamilton's multiplication cannot be made consistent with homomorphy requirement (10) and his equation (157), which is precisely C S .An thus [22] would need to change this last relation.What he apparently missed was that [22] was discussing quaternions used from body to world.This indicates that at the time Shuster was not fully aware of the big picture described in V-E.4.The question is of course where this equation (157) comes from.The text does not clearly tell but indicates that it is actually derived from the Rodrigues formula and the assumed conversion form rotation vector to quaternion (159), which converts active rotation vectors to active quaternions or passive to passive.An alternative source could be [53,8].
with α ∈ {−1, 1}.To get the analogous result for the second case, (C S , ⊗) is sub convention of C, we can translate (see VI-B) the left hand side of (15) into the other QM-convention and get C S (exp(−I * (a(φ) 2))) = C.C(C.q(φ)), ending up with the inverse matrix B B Φ −1 , as used e.g.in[32, p. 25].(c) The direction cosine matrix that contains the coordinates of a rotated PONB B with respect to itself before rotation -one rotated basis vector per row:(C B Φ ) i⋅ = [Φ(b i )] B or C B Φij ∶= ⟨Φ(b i), b j ⟩ Here M i⋅ denotes the ith row of a matrix M.This is used e.g.in[50], p. 8 and[1], p. 447.One could have chosen columns instead of rows.This would have yielded the transposed matrix C B Φ T .

TABLE III ACTIVE
VS. PASSIVE USAGE GIVEN A ROTATION VECTOR φ.