Talk:Quaternions and spatial rotation
![]() | Mathematics C‑class Low‑priority | |||||||||
|
Fitting quaternions
The article currently states "The quaternion so obtained will correspond to the rotation matrix closest to the given matrix". The stated reference does not seem to support this claim, and the algorithm described here is seemingly listed as a sub-optimal algorithm (it is not the algorithm that the author's present). They also describe 3 or 4 other algorithms. Some fact checking is needed. —Preceding unsigned comment added by 76.182.110.175 (talk) 04:02, 11 December 2009 (UTC)
- I just read the article, and, AFAICT, it supports the claim. This is "version 3". See "remark 1" on page 1086 that states the new method (eq 12) is equivalent to version 3. You might also read the second paragraph of the conclusions and note that, if the author intended the direct use of equation 12 in practice, that paragraph wouldn't make sense as a conclusion. Finally, I would point out that the text in the description of "version 3" on the first page, as well as the first paragraph of "new algorithm" both imply that version 3 is what is intended. So I don't see a problem with the text, as it stands. It might not be bad to also throw Eq 12 in there, as well, though, if you're still suspicious. It might be nice if the original editor came back and made a comment on this. (Note: I have not worked through the numerical examples, nor have I checked that they use the same ordering of elements as Wikipedia.) 70.234.243.222 (talk) 15:54, 3 June 2010 (UTC)Michael
- This looks like it is related to Davenport's q-method (a solution to Wahba's problem); searching these terms might turn up some better sources JasonHise (talk) 17:10, 6 August 2013 (UTC)
Original article basis
This article is marked:
Author: M. Romero Schmidtke. Translator: August Pieres.
Please can the authors confirm that this is original work, donated under the GFDL?
- The article appears to be a translation from this Enciclopedia Libre article; M.Romero Schmidtke is a regular contributor there. AxelBoldt 01:26 Apr 7, 2003 (UTC)
Thank you, August Piers, for this translation of my article. I would surely not have done better. And yes, it is an original work, writen specifically for enciclopedia libre and the spanish wikipedia.
M. Romero Schmidtke, April 26 , 2003.
The following text was cut from the main page. -- Fropuff 03:48, 2004 Aug 2 (UTC)
simple example
I think something like that would fit better for the explanation of non commutativ of rotations.
A simple example, take a die, rotate so that you see the 1 in front of you. Rotate it around the y-axis for 180 degrees. You can now see the 6. Rotate about the y axis for 90 degree. You will see now the "4". Another Rotation about 180 degrees about x axis will show you an 2. If you change the rotations, like first 180 degree about x axis, and then again 180 degree about x axis (total of 360 degree) and then 90 degrees around the y axis. All you get is a rotation around the y- axis for 90 degrees. —Preceding unsigned comment added by 213.61.226.6 (talk) 12:00, 28 March 2008 (UTC)
a thought
One can specify a rotation in n dimensions by specifying two unit vectors A and B. The specified rotation is that which maps A onto B. The axis of rotation in n dmensions is a surface of (n-2) dimensions. Only in three dimensions is this axis itself one-dimensional.
- If you want to generalize rotations to higher dimensions, it's often much easier to think of rotations "over" a plane, instead of around a "hyper" axis. In 3D, we happen to have a vector as axis, which is the normal of the plane we are rotating over. In higher dimensions this "axis" wouldn't be a simple vector any more, but the thing that axis is normal to will still be a 2D subspace (plane).
I would guess, then, that a quaternion of rotation is equivalent to the cross product of the two unit vectors A and B, which is also a vector only in three-space, and whose magnitude also varies as the sin of the angle.
I'm not sure what you mean by "The specified rotation is that which maps A onto B." In 3 dimensions, there can be many rotations that map A onto B, not just the ones with the cross product as axis. Jwwalker
29 November 2005
I think perhaps the original suggestion is well defined, but the contributor is confusing the point with incorrect vocabulary and muddled concepts. What is probably meant is as follows:
One can specify a rotation in n dimensions by specifying two reflections. Indeed, this is the definition of a rotation. Each reflection can then in turn be specified by a corresponding unit vector, orthogonal to the (n-1) dimensional subspace which is invariant under the reflection. There are two such vectors: A and -A. If we choose positive notation by convention, A is mapped to -A under the reflection represented by A.
Composing with a second reflection B moves -A to its final desination = 2[A|B] B - A , where [x|y] specifies the finite dimensional inner product, following the notation of quantum mechanics for infinite dimensional inner products (<x|y>). [A|B] is of course the cosine of the angle between A and B, call it t, and defines this angle unambiguously. Therefore, A is rotated by an angle 2t through B, in the two dimensional subspace containing both A and B. The 'axis' of rotation is the n-2 dimensional subspace fixed by the composition of the two reflections A and B and is orthogonal to the plane containing A and B. I say 'axis' because its use in this context is an unforgivable corruption of terminology.
Returning to the topic at hand, namely quaternions, one may form the rotation which takes the three dimensional vector A to B in the plane of A and B by calculating sqrt(AB). As the second contributor correctly notes, there are infinitely many other rotations which move A to B. Of course, if A and B are not of unit magnitude, the resulting square root needs to be normalized.
The square root of a quaternion rotation operator is the quaternion operator which, when applied twice to all vectors in three space, yields the same movement as the orginal operator applied once. The square root rotates about the same axis, but by only half the angle. So given q=-cos(t )+usin(t ), which rotates 3-vectors about the axis u by an angle 2t, sqrt(q)=-cos(t /2)+usin(t /2). u is of course a unit pure quaternion specifying the axis of rotation (i.e. a three dimensional vector), and the resulting operator moves vectors by an angle t about u.
An interesting alternative axis of rotation for moving A to B is the unit vector bisecting the angle between them. In this case, the rotation operator is a pure quaternion (t = 90 degrees) formed by computing (A/|A|+B/|B|)/|(A/|A|)+(B/|B|)|, where |x| denotes the norm or magnitude of x.
P.S. As an after thought, the main article on quaternions and spatial rotation needs to be completely rewritten. It is confusing and misleading in places and was clearly authored by individuals who rarely use quaternions in practice, and therefore lack intuitive understanding.
14 December 2005
Well, it seems either no one is tracking this article's discussion, or no one is critically reading it, since the egregious error in my equation for the final destination of A above went unnoticed and uncorrected by others. It is now correct. It seems I muddled the forms for orthogonal bases and self referential bases in my head, which just goes to show extemporaneous online mathematical discourse is error prone. The correct equation is completely self referential.
Ironically, I had the presence of mind to correct the omission of the sqrt in [A|B] B - sqrt(1-[A|B]^2)A the first time I revisited the page, but didn't notice the orthogonal basis adjustment factor was unnecessary, and incorrect in this context.
In spite of these foibles, per wiki etiquette, I am announcing here in the discussion that I have decided to rewrite this article in stages over the next few months, whenever I have a few hours to kill. This is a heads up, in case someone else has adopted this article, or may wish to collaborate on the revision. While I am evidently not the most competent person for the job, apparently no one in the current time frame has greater competence.
When I am finished, the article will be completely new, and I will therefore delete the copyright issue noted above, as it will become irrelevent.
- Hi. Just a note that you are being watched :) . I don't know much about quaternions though and I never used them, so don't expect any help on the maths from me. Please go ahead and improve the article as you see fit. I hope you'll create an account first; that makes it easier to communicate and it enables you to tell us your background; alternatively, if that's what you want, it gives you more anonymity because it hides your IP address. Oh, and don't use this [ | ] notation for inner products unless it really is standard in this context; it most certainly is not standard in the general area of mathematics. I use x · y or xTy or ⟨x,y⟩; you may also use the physicists' ⟨x|y⟩ notation if you like it; it certainly is not restricted to infinite dimensions. Good luck! -- Jitse Niesen (talk) 23:02, 14 December 2005 (UTC)
3 January 2006
Well, it is good to know some discussion takes place before revisions. Regarding anonymity, I have no personal online access and use public terminals exclusively. For the purposes of this effort, I've been making a point of using the same public terminal so that the URL in the history consistently identifies me. Therefore, contributing without an account gives me the greatest anonymity, for I can change terminals in a trice.
Regarding notation, I will stick with what I've used above for reasons which will become apparent. I've nearly completed the revision in my head, and will begin data entry later this week. As far as unconventional notation goes, it is worth noting that Conway, in his recent book on octonians, implicitly defines the norm of a vector as the square of what is usually considered to be a norm, as a contradistinction to the magnitude. It is a good idea, and it sets a useful precedent, something which someone of Conway's stature can easily get away with.
14 Jan 2006
A word of encouragement: The author of the article is doing a better job of explaining a somewhat tricky subject than is usual - rather than simply displaying erudition, as some authors do, he/she seems to be genuinely aware of the pitfalls that can trap (and even dishearten) the interested but non-expert reader; if the Wikipedia is to be useful, it is to this level that I believe it should be targetted. Thanks. PGE.
17 January 2006
Since I'm still quite a wiki-neophyte, there are some editing details that need attention
- The citation mechanism I'm using is ad hoc, created merely to enter the data. What is needed is a footnote placing the data at the end of the article, with a numbered link in situ. I don't know how to do this.
- As things progress, the addition of several figures would be illuminating. I don't know how to make or insert such graphics.
- The math mode creates very awkward font size changes. My predisposition thus far is to make it look right in an ad hoc way. This will become increasingly burdensome as things progress. On the other hand, the formatting choices of the math system are usually positively repulsive aesthetically.
I trust there are more experienced individuals who can help with this. Thus far, I've mostly simply imitated notation existing in the page, and gleaned a few techniques from the "cheat" link on the edit help page. Therefore, if someone would fix a citation, I can figure out what needs to be done with the rest of them.
- Adding an image to this wikipedia is a simple matter - I did the images on the Mobius Transformation page. Creating them is quite a bit trickier. I did the 3d images with a tool called "PovRay", but that is not an interactive graphical tool: you have to greate a description file and tell your machine to render it. Pmurray bigpond.com 23:56, 20 February 2006 (UTC)
In Summary
The "Quaternion rotation" has a summary where it gives the cookbook formula for making a quaternion given an angle and a unit vector.
Could someone add the converse - the formula for getting the vector and the angle from an arbitrary quaternion? Yes, I suppose the reader can work it out from what's given but it would be nice and encyclopedic to include it.
Actually - why not make this summary a separate section? Name it "this is how you actually do it", or something.
Oh - and why use <u, v> (rather than the dot operator) for the dot product when the cross operator is used for the cross product?
As an afterthought: please don't remove these equations. There's an annoying trend on the math pages for hard-core math guys to remove the cookbook ("analytic") stuff. I imagine they feel that people should make the effort to understand the deeper beauties and derive the equations themselves, because the actual resulting equations are uninteresting: but it really imposes a learning curve and makes it difficult for people like me who just want to write code.
Too technical
This article certainly needs many cleanup, accessibility change, tone and style change, and even an rewrite. Personally, I think this article should be moved to wikibooks, but it is also true that wikipedia could use an article that explain how to do spatial rotation using quaternion in detail, through not excessively(translation: not too long that scare away all people).
I suggest that it be moved to wikibooks, and either rewrite this article here, or take the following measures to take it up to encyclopedia article standard:
- The introduction on certain special properties of quaternion can be summarized and moved to the main quaternion article.(And yes, the non-commutativity of rotation can be better explained by using a diagram)
- While useful for an indepth understanding, I don't think doing rotation would need understanding projective space, operator space, and all the like. The concepts section cannot stay, I'm afraid
- Historical terminology(!) can be moved to their respective article.(PS: does this section imply that sometimes historical terms will be used?!)
- Modern terminology can be moved to the last part of this article, sort of like an appendix, until we know what to do with them.
- I know there is difference in notation in computer science and mathematics, even for the same concepts, but I think for the part that shows the mathematics, derive how to do rotation, prove that it is correct, etc, they should use standard mathematics notation(We have LaTeX, sir) , so that it is accessible to mathematician.
- And then, if there's even an algorithm section, that can use the computer science group's notation, if there's a difference.
- Instead, the algebraic rules section should be moved to the beginning, as a summary/revision.
- The rest is ok as it stands. Through the derivation of quaternion for rotation(That is, the main point of this article, afterall) need quite some expansion.
- And as a sidenote, the citation can be done in a footnote style, rather than brackets everywhere(check any featured article and notice some small number that occassionally appear at the end of a sentence.)
That's all for now, thanks. --Lemontea 02:34, 23 April 2006 (UTC)
- Agree. The article is not too technical; its too verbose. The mathematics behind this is actually quite easy, but you would never guess that from this article. The sheer heft of this article is daunting. This whole thing should be moved to wikibooks, and re-written from scratch. linas 14:56, 18 August 2006 (UTC)
- Yes. FAR too technical. The person talking about rotating vectors makes much more sense to me than talking about reflections. The person saying reflections are the basis of the definition of rotation may be right for 4 or higher dimensions, but I really don't think this needs to be mentioned in the article at all, it only confuses me.
Copied?
Has this article been copied from some other site? For one thing, there's this:
...which will not equal the absolute position implied by the sum produced in another representation. This problem arises when simply translating the origin some small distance from the original representation. (illustrative figure here) The positions are unique absolute physical positions, whereas the n-tuple is merely a symbolic abstraction....
Which looks as if a hyperlink was lost in the conversion to text, and nobody noticed.
For another thing, this is not Wikipedia style at all. It reads like a very, very boring book. Worse still, it doesn't actually make sense to anyone who doesn't already know what the article is about. I'm trying to make sense of it, but it's just frustrating the hell out of me.
My brother once said, "I've looked on Wikipedia, but I didn't understand it." This is my first go at that experience. 86.136.82.105 15:31, 9 May 2006 (UTC)
- The source is mentioned at the top of this talk page. Actually this is a small corner of wikipedia that I'm afraid are rarely visited, as shown by how my comment and suggestions(see above) recieve no reply, not even acknowledgement or objection. And it's true that this topic is a quite specific and difficult one. Anyway, I tried to understand quaternion by starting from the matrix representation of complex number. Why rotation was done that way is still unknown to me. --Lemontea 11:25, 10 May 2006 (UTC)
no pictures
That's pretty extreme to discuss that whole article without a single picture.
Re. ^^^^: People's heads probably started aching before they got up to there.
- Here are pictures. I'm a bad graphist, as you will notice. But that's better than nothing and helps understand the maths. MathsPoetry (talk) 14:45, 19 April 2009 (UTC)
Could we have something a bit more to the specific topic?
Could we have something a bit more to the specific topic? The topic is not quaternions, which already exists (elsewhere), it is quaternions and spatial rotation. I would be expecting something to tell me
- how to represent rotation in terms of quaternions
- why quaternions are better than matrixes.
It seems that Blender uses quaternions to represent rotations; perhaps that would provide some assistance from the Blender documentation. m.e. 05:38, 16 October 2006 (UTC)
Ya, *unfortuneately* (from a user standpoint), Blender does use Quats for "bone" rotation representation in the "IPO" (graph) editor.
I think that this article attempts to address the issue of the pros and cons of using different rotations representations in software systems. However, the issue is more complicated then just adding up the size and number of calculation for each representation. For instance rotations matrices are and out, up, and right vector that allow for easy strafing in a game. Also if you intend to use hardware acceleration using rotation matrices can be faster. I think that discussing the pros and cons of using different rotation schemes should be an article onto itself. —Preceding unsigned comment added by Jfischoff (talk • contribs) 20:19, 11 February 2008 (UTC)
Book Description and zy rotation
I changed some of the description for the initial "book" example, it appeared to me that the "spine direction" description was incorrect. If I have changed it incorrectly, please advise .. (and I'll be confused :) if so).
Also in the description of "In fact, the composition zy represents a single rotation of 180 degrees about the [-1 1 0] axis", does that imply from [0 0 0] to [-1 1 0] ? I assume so, as otherwise I don't understand how an axis can be defined by a single point:) .. Unless it's more "understood" math terminology that I'm not familiar with :) Mike Stramba 17:19, 2 December 2006 (UTC)
- Conventionally, an axis is represented by a unit vector (magnitude 1), such as the above mentioned [-1 1 0], so your assumption is correct. Btw, in two-dimensional space, a rotation axis is actually defined by a point. – Adrian Lozano 08:02, 4 December 2006 (UTC)
- [-1,1,0] isn't a unit vector; it has norm \sqrt{2}.
- In linear algebra, vectors are typically concieved as going from the origin to some other point in space. This leads to a common notational ambiguity; does a n-tuple represent the coordinates of a point in space, or a vector from the origin to the point? It could be either; the context helps if you really need to know. But often you don't, which only encourages the laziness. Endomorphic 02:43, 5 December 2006 (UTC)
- My mistake, I don't know where my mind was – but an excellent example of laziness :-) – Adrian Lozano 23:37, 5 December 2006 (UTC)
Large edits planned
Is anyone actively editing this page at the moment? I would hack out the obfuscation in this article but for fears that someone else already has designs on it. Previous comments recommend an overhaul, and I concur. We have definitions from dictionaries a century old. We have vast notation and concepts sections which are at best redundant, at worst counterproductive. What should be the meat of the article doesn't arrive until three quarters of the way through. The article should *start* with 1.) q = cos(α/2) + u sin(α/2) and 2.) f_{q}(x) = q x q* and expand from there. Unless someone can provide a *really good* reason why so much history and handwaving needs to included in a practical article such as this, it's all going to get removed. Endomorphic 02:24, 5 December 2006 (UTC)
- As a rank amateur researching quaternions, I would be delighted to see you perform the aforementioned surgery as soon as possible.
- I've edited a technical magazine for six years and know irrelevancy when I see it. I followed this link sincerely hoping to see something such as, well... "1.) q = cos(α/2) + u sin(α/2) and 2.) f_{q}(x) = q x q* and expand from there". Over time, perhaps folks could even add in a few diagrams; the topic is, after all, rotations and spins.
- The main issue is the obliviousness of the article to the link-intensive style of Wikipedia. That excellent style allows both amateurs (me) and experts (Endomorphic for example) to use the same articles with nearly equal ease. I follow nearly every link as a sort of guided study program. An expert looking at the same text skips over all the links and goes right to what they need. By replicating the contents of an old-style, stand-alone study book, this article instead creates an overly lengthy, out-of-context, and necessarily out-of-date tome that is equally frustrating for both amateurs and experts.
- As a consolation for the sincerely directed efforts of the translator, perhaps some of the early materials could be used to create small, new, properly linked entries for topics not already covered. I seriously doubt the resulting small articles would even be referenced by the final version of this one, though.
- Finally: Since fools go where angels fear to tread, and since I am, ah, very much in the former category, I hereby give fair warning that I will shortly undertake to do a major chop on this critter if Endomorphic or someone else does not do so fairly soon. I can't add anything, but as an editor I know what irrelevancy looks like, and I can be a terror with the editing knife when the circumstances merit it.
- Good grief, what are you waiting for? This bizarre article is in dire need of cleaning up. Nearly all of it is irrelevant, rambling, incoherent, confusing and frustrating. —The preceding unsigned comment was added by 134.174.9.30 (talk) 17:22, 17 January 2007 (UTC).
- I couldn't state it better Jtico 22:50, 31 January 2007 (UTC)
- Done. What this (severely) reduced version now needs are more specifics about applications, e.g., orbital mechanics. I don't have the details, but I know NASA has done a lot along those lines. I'll try to find someone to ask, or maybe a public domain report.
- Incidentally, parts of the excised version tracked closely in content and order to Roger Penrose's section on visualizing quaternions in The Road to Reality. In particular, Penrose goes through much the same discussion of flipping a book around. Such visualization topics may have enough meat to merit a separate Wikipedia article (not here!). Frankly, though, I'd rather add in a reference at an appropriate spot to the chapter in Penrose's book, which does a pretty decent job of describing the visualization aspects of quaternions. (That said, all such attempts that I've seen, including Penrose's, are not for the visually faint of heart...)
- Excellent work. More is required; in particular, sometime I'd like to be motivated enough to detail:
- The advantages over matrices mentioned in the intro. I (Bjones410 21:04, 30 May 2007 (UTC)) added some performance comparisons between quaternions and other rotation methods, though I'm not sure that's what you mean by "advantages."
- Distinction between quaternions representing points in 3D space and quaternions representing rotations.
- The double-cover issue
- The good news is it's more like pruning a hedge into the shape of a fish, rather than chainsawing a path through the Amazon. Endomorphic 21:30, 1 February 2007 (UTC)
- Excellent work. More is required; in particular, sometime I'd like to be motivated enough to detail:
- Thanks, and all three of those possible additions sound very useful. Good use-the-main-ref trim of the basic operations section too -- brings the important material up to the start, where they should be.
- Interestingly, the double cover section is one of the few early parts I thought about trying to preserve. It's and important and fascinating aspect of how quaternions relate to symmetry groups, and could be helpful for anyone coming here to gain insights on particle spin. A fresh start seemed better, though. Terry Bollinger 02:47, 2 February 2007 (UTC)
Discussion of non-commutativity insertion
Janek Kozicki: Your description of the book analogy in 3D space looks correct, and its an interesting point related to rotations of quaternions. However, you might want to think about where you have positioned it versus the kinds of readers most likely to link to this article. I suspect most such readers will not understanding how quaternions are used to represent rotations in the first place -- and until they can fully understand that, an immediate discussion of non-commutativity will not be what they expect, nor something they will easily be able to follow. They may understand the analogy fine, but not why it is being told to them.
I think a paragraph like the one your wrote might fit nicely somewhere within the overall group of quaternion articles, but I would suggesting thinking about location a bit more.
Terry Bollinger 05:40, 5 February 2007 (UTC)
- Sure, you might be right. If you find a better place please feel free to move it there :) Maybe I'll find something too, I dunno. I was just writing an appendix about quaternions in my thesis, and I thought that this paragraph from my thesis might be interesting for the people. Janek Kozicki 20:12, 6 February 2007 (UTC)
It is interesting, readable, and relevant to quaternions, so placement is the question... I'll think on it a bit, and meanwhile, if you find a good spot, by all means feel free to take the initiative.
There may even be a potential for a new article of some sort, something about visualization in general of quaternions (Quaternion visualizations? Hmm. Not title that leaps to mind, is it?) The rotation focus of this Quaternions and spatial rotation can be done almost purely mathematically, making it less critical to have the visualization here...
Actually, one place I think material like this would be very relevant is in explaining the concept of non-commutativity in general to intro math folks. This concept is often presented so mysteriously that people can't see any connection to ordinary circumstances; your book example shows that there are quite ordinary operations on real objects that are non-commutative (or non-Abelian). The Commutativity article itself might be a plausible location, for example, with a proper intro...
- I think the example of non-commutative rotations is good to have in the article, but I don't think the current explanation is clear enough. For someone who is good at thinking in spatial terms, it's easy to follow, but many people will not be, especially people who are new to quaternions. A diagram would really help here, maybe an animated GIF? Does anyone have the ability to make a good one? - Rainwarrior 20:09, 10 February 2007 (UTC)
I disagree with a lot of the intent in the above posts. Representing rotations with quaternions is a specific technical idea. I'm not saying that the article should be filled with jargon; merely that handwaving descriptions of rotating books won't be useful to someone who arrives at Wikipedia wanting to know how to rotate with quarternions. That being said, the book analogy is good, but perhaps it should go at "Non-commutativity" itself, which currently redirects to commutativity. Add a little For a technical discussion of non-commutativity, see Commutativity. line, and you have the perfect place to explain why Rubics Cube's are so difficult. Endomorphic 20:27, 11 February 2007 (UTC)
Application to 3D animation
This article is too technical for me. How are Quarternions used in 3D graphics? --24.249.108.133 22:59, 11 April 2007 (UTC)
Great reference
A wonderful article on all this, which provides a historical picture and, at the same time, shows very clearly how to do calculations with quaternions in a way that will make sense to people with only a background in vector analysis, is "Hamilton, Rodrigues, and the Quaternion Scandal" by Simon L. Altmann, Mathematics Magazine, Vol. 62, No. 5. (Dec., 1989), pp. 291-308.
R. Wilsker
Rwilsker 15:36, 17 August 2007 (UTC)
Versors
Versors are described in Earliest Known Uses of Some of the Words of Mathematics (under Tensor) and in this tutorial, but I found neither clear or relevant enough to be included in the References. -- Jitse Niesen (talk) 11:29, 10 September 2005 (UTC)
Disambiguation page needed for "versor"
Etimology: VERSOR (from Latin versus = toward (or turned), from past participle of vertere = to turn)
Please remove the redirection from "versor" to "quaternion". The word refers to different concepts. For instance,
- For some authors a versor is a unit vector describing the orientation of a Cartesian axis, i.e. any one of the vectors forming a standard basis, or, more generally,
- the normalized vector of a non-zero vector (see unit vector).
- From Earliest Known Uses of Some of the Words of Mathematics: "VERSOR. The term VERSOR was introduced by William Rowan Hamilton (1805-1865). It appears in his Elements of Quaternions ii. i. (1866) 133: “We shall now say that every Radial Quotient is a Versor. A Versor has thus, in general, a plane, an axis, and an angle.” (OED and Julio González Cabillón.) Unlike VECTOR and SCALAR, two of Hamilton's other QUATERNION terms, versor did not enter general currency."
- In 1901, Wilson (a pupil of Josiah Willard Gibbs), defined the versor as a particular kind of dyadic representing a rotation (i.e. something similar to an orientation vector or rotation matrix, as far as I can understand) [See Wilson, Edwin Bidwell (1901), Vector Analysis: A text-book for the use of students of mathematics and physics, founded upon the lectures of J. Willard Gibbs, Yale University Press, page 335].
I conclude that "versor" is a generic word used to indicate different mathematical objects which represent the orientation of a vector (directed line segment), or directed axis, or system of directed axes, or rigid body, although the etimology of the word (see above) makes it more appropriate to indicate an object representing direction (i.e. the orientation of a single axis or vector, as in points 1 and 2), rather than all kinds of orientation (as in points 3 and 4).
Notice that, according to Earliest Known Uses of Some of the Words of Mathematics (see point 3 above), the word versor, as defined by Hamilton with reference to quaternions, "did not enter general currency".
The word "versor" should point to a disambiguation page, containing at least links to these articles:
- Unit vector (where I added the specific definition of the word "versor").
- Cartesian coordinate system (where I added the specific definition of the word "versor", and a reference to standard basis).
- And if you like, to Quaternions and spatial rotation (but in this case somebody should add the relevant definition of the word "versor", which is missing).
I don't know how to build a disambiguation page. Would you mind to do it, and (if you believe it is needed), insert in this article Hamilton's definition of the word? Thanks, Paolo.dL 21:29, 22 August 2007 (UTC)
Derivation of Rotation Matrix from Quaternions
The derivation section does not derive anything actually, it just proves that the double sided multiplication could be a rotation operation. But there is no clue why this should really be a calculation. And it simply says "it turns out that a=cos(alpha/2)". Isn't there any complete derivation of double sided quaternion multiplication as 3D rotation? One can't simply say that complex multiplication is rotation so that quaternion multiplication should also be a rotation... —Preceding unsigned comment added by 130.225.73.232 (talk) 14:54, 19 December 2007 (UTC)
- Section being discussed: Quaternions_and_spatial_rotation#Quaternion-derived_rotation_matrix. If anyone can provide a reference to an actual derivation of a rotation matrix from a quaternion transformation, please do so in the section. WinterSpw (talk) 15:12, 5 July 2016 (UTC)
Matrix to Quaternion Conversion
Is there a simple formula for converting a (special) orthogonal matrix to the corresponding rotation quaternion? The best I can figure out is to solve the axis and angle from the matrix and go from there, but I thought there might be an easy formula. 198.99.123.63 (talk) 16:32, 24 April 2008 (UTC)
- The problem is to find a, b, c, d given a2 + b2 + c2 + d2 = 1 and the matrix
- .
- That's ten equations in four variables, so there are lots of ways to solve it. The only hard part is finding an approach that's numerically well behaved for every possible rotation. I don't know anything about numerical analysis, but I think the following will work fairly well. From the matrix diagonals and a2 + b2 + c2 + d2 = 1 you get
- a2 = (1 + Mxx + Myy + Mzz) / 4
- b2 = (1 + Mxx − Myy − Mzz) / 4
- c2 = (1 − Mxx + Myy − Mzz) / 4
- d2 = (1 − Mxx − Myy + Mzz) / 4
- Pick the largest of these and resolve the quaternion sign ambiguity by taking the positive square root. Then compute the other three coefficients (with sign) from the off-diagonal entries. For example if a2 is the largest then compute b = (Mzy − Myz) / 4a and so on. -- BenRG (talk) 12:16, 27 April 2008 (UTC)
- I just noticed that you can find this exact algorithm in Rotation matrix#Quaternion, as well as a few variations. It's not really the simple formula you were looking for, but I think any simple formula will fail on some rotation matrices. -- BenRG (talk) 12:43, 27 April 2008 (UTC)
- I just noticed that the transform from quaternion to matrix is different from that from the following website: http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToMatrix/index.htm , I think the formular in Wikipedia have switched the sign on off diagonal components.-- Bamboo77 (talk) 1:02, 10 November 2009 (CSU)
Comparison with Rotation operator (vector space)
Duplicate thread deleted, see Talk:Quaternion#Comparison between Quaternions and spatial rotation and Rotation operator (vector space). -- BenRG (talk) 01:43, 14 August 2008 (UTC)
Quaternion "handedness"
Note that quaternions, like any other rotation or linear transform, are not "handed" (as in left-handed vs right-handed). Handedness of a coordinate system comes from the interpretation of the numbers in physical space. No matter what the handedness convention, rotating the X vector 90 degrees around the Z vector will yield the Y vector -- the math and numbers are the same.
I think this paragraph is confusing at best, since "rotating the X vector 90 degrees around Z" is subject to convention too (clockwise or ccw?). Moreover, the last sentence seems false to me (not always true at least), since in a left-handed coord. system, rotating the X axis 90 degs. around the Z axis, does actually yield -Y axis, provided we use the right hand rule for rotations. Any comments on this? Should this paragraph be changed to be clearer? 87.220.148.171 (talk) 16:39, 29 September 2008 (UTC)
Another thing I've noticed: the previous paragraph states that "The above matrix assumes row vectors on the left". This is plain wrong. It's exactly the other way around (I'm assuming right-handedness here). You can check yourself by trying to rotate every axis over every other axis using the given matrix. For example, acoording to the given matrix, rotating Y axis over X (remember it's supposed to be for row vectors) yields the -Z axis, when in a right-handed system it should yield the Z axis. Comments? 82.144.14.242 (talk) 11:33, 20 October 2008 (UTC)
I've deleted the section. I'm not the user posting the previous paragraphs but the section is indeed confusing and may be wrong unless the creator of that section assumed very unusual conventions for rotations. — Preceding unsigned comment added by 190.230.143.36 (talk) 22:21, 19 September 2012 (UTC)
- I've reversed the deletion because the lack of handedness is important (the cross product is oriented). I concur that the section is confusing, and will look at restating it in a clearer way. — Quondum 10:21, 20 September 2012 (UTC)
Sample code
OK, so this is a shameless piece of self promotion, but I have created a short set of C routines that perform rotations using quaternions. The code is available here under the GPL, and the site has no advertising nor any kind of commercial activity. I have refrained from adding it as an external link, as stated in the external link guideline, but provide it here for interested parties. If someone else wants to add it as an external link, that is fine by me! 129.78.64.102 (talk) 05:49, 30 January 2009 (UTC)
Vectors and components
(Moved from my talk page. -- BenRG (talk) 14:43, 28 April 2009 (UTC))
Hi Ben,
Thank you for having reviewed and corrected my changes on that page.
Ouch...it looks rather strange to me to read , or in words that a vector is *equal* to its coordinates (x, y, z)... For me, a vector *has* coordinates, but does not equal them.
But I suppose this is only the effect of (mathematical) cultural differences. I am French and in France, we write either or or (no right bar), the most common being perharps the second one. What makes me think it is a matter of different languages is that you said in your comments that mathematicians "don't use it", which is obviously wrong when speaking of math books published in my country.
I just check the Euclidean vector English page and it is full of things like , which I would cross in red and give a bad mark if it were in a pupil's essay ;-).
We do write too when the English write for the cross product. This example is often cited to illustrate that the mathematical language is not a completly universal language.
- Sorry, my mistake about the notation, I'd never seen it before (I was educated mostly in the US). When you wrote and later , I initially thought was meant to be a function which constructed a vector from its three components. It didn't seem like the best choice of name since looks like a vector, not a function, and is a vector elsewhere in the article. But then in a later section you wrote and then referred back to , so apparently this notation actually introduces a name for the vector. To me that's like writing "x 3" in place of "x = 3". With an equals sign between and the column vector it would make sense. But most of the vectors that were named in this way were never referred to by name, so it would be better to drop the names to cut down on the reuse of that particular symbol. That leaves , which brings us full circle. In short, I don't understand why you think that incorrectly identifies a vector with its components while is okay; they both seem to identify a vector with its components to the same extent, and the second doesn't agree with any notation I'd seen before. I don't think it's ever used in English-language texts.
- Would you be okay with instead of ? I think it's a bit hard to read but I could accept it as a compromise.
- I don't think confuses anyone. One can argue against it on formalist or aesthetic grounds, but I don't think it actually in practice confuses anybody; it's clear what it's supposed to mean. I'd rather avoid mentioning components entirely in the article, but that seems difficult.
- As you have guessed, (with parenthesis and not brackets, my bad), is a notation that says "vector v has coordinates x, y, and z". completly puzzled me, just like puzzled you. That's just the effect of having learned maths in different places, I guess ;-).
- Here is my answer to why is incorrect from the point of view of someone who has learned maths in France. is an element of a vectorial space, i.e. a mathematical structure just like groups or manifolds. A vectorial space is a set V with two operations : the addition between two vectors and the "external" multiplication by a scalar, and a set of properties, like commutativity, or "mixed associativity". This definition is completly independant of any coordinates system : vectors preexist their coordinates.
- Here is a classical example of vectorial space V. Let's assume you have an euclidean space E, and you have four points P, Q, R, S in E. You define a relation ~ between two couples (P, Q) and (R, S) of E² as follows : (P, Q) ~ (R, S) if PQSR is a parallelogram. It can be proved that ~ is a relation of equivalence, hence you can define V as the quotient of E² by relation ~. You can define an addition and an external multiplication on V, and prove that this is a vectorial space. You are now entitled to call a vector and to write . So far we have worked in a purely geometrical manner (with parallelograms) and not spoken about coordinates. By the way, this construction works the same on a line, a plane, a 3D space or a 4D hyperspace: we don't even know if we were in dimension 1, 2, 3, or 4 (or more)! To add the notion of coordinates, you need a number of special vectors that will act as a basis to measure coordinates. So you see that V (i.e. E²/~) and R² (or R³ or whatever) are very different mathematical beings. Vectors are not their coordinates, and you can even have vectors without coordinates. That's why, from my point of view, is a monster, as it equates an element of V with an element of R³.
- If V of dimension 3 uses R for its scalars, it can be shown that V is isomorphic to R³, but isomorphic sets are not equal sets. And if V uses elements of Q (rationals) or of C (complex numbers) for its scalars, that's not even true anymore! In such a case V would be isomorphic to Q³ or C³.
- Having explained that, I understand it is probably a matter of cultural differences and historical considerations. If English speaking mathematicians are used to writing , fine. I will stick to writing or " has the coordinates " in the French Wikipedia pages, and conform to in the English pages. We can live together with cultural differences. MathsPoetry (talk) 07:06, 30 April 2009 (UTC)
- I agree—vectors are not tuples of coordinates and shouldn't be confused with their components in some basis. It's funny that I wrote a response below talking about algebras modulo equivalence relations and then read your response here, which is about... pairs of points modulo an equivalence relation. It's clear we speak the same language; we shouldn't be having so much trouble communicating. I hope I can at least convert you to the view that ai + bj + ck is an unnecessary componentwise representation of a vector that can better be treated in a coordinate-free way, even when it's part of a quaternion. You dislike coordinates even more than I do, so it should be easy...
- I don't really want to write , I just can't see a good alternative. is unfamiliar to me and presumably many readers. I would somewhat prefer if it weren't for the layout problems it causes. is harder to read and I'm worried it might confuse people more than . would be jumping the gun. -- BenRG (talk) 15:24, 30 April 2009 (UTC)
- Yes, maths are basically a common language, despite some surface differences, and we have no trouble communicating once we identified the small changes in the notations.
- I have nothing against coordinates. They are a powerful tool for a large number of problems, and, as you pointed out, they are an inefficient tool for other problems. What I have is a strong tendancy to put emphasis on the nature of the objects that we manipulate, hence my reluctancy to assimilate a vector to its coordinates, or (see next section) a vector to a quaternion. But, as I said, if people who have learned maths in English-speaking countries are familiar with , it's fine with me, as long as we realize that it is a standard abuse (your own words). So I think this topic is closed ;-). MathsPoetry (talk) 20:16, 30 April 2009 (UTC)
Proof that quaternions rotate vectors
Another remark. We could completly have avoided this historical a quaternion is a scalar plus a number historical approach and sticked to a purely algebrical approach. The proof that quaternions "rotate" vectors works with imaginary numbers i, j, and k too and I think it is more rigorous because it makes obvious that you have to add a zero fourth coordinate to your 3D vector to make it a quaternion. I think it would have been less confusing for the non-specialist readers: a lot of people are familiar to complex numbers, much less people are comfortable with vector algebra. Also, they would have only needed to learn one new notion (the three imaginary numbers), not two (that and the vector notation of quaternions). MathsPoetry (talk) 05:49, 28 April 2009 (UTC)
- I think it would be a big mistake to write the proof out in components. It would be much longer and much harder to follow; the basic steps would be lost in the detail of having to repeat everything 3 or 3×3 times. Instead of
- we would have something like
- Is that really easier for anyone to understand? How easy is it to spot that the two occurrences of are the same compared to the two occurrences of ? Maybe it's easier to teach ij = k than the vector cross product, but there's no point in it. If you slog through dozens of rearrangement steps and applications of the ij = k rule but overlook the fact that is a vector perpendicular to the inputs in the direction given by the right-hand rule, you haven't really learned anything worth knowing; you might as well be writing "I won't chew gum in class" 100 times on the blackboard. I'm not saying the current proof is very insightful, but writing it out in components would make things much worse.
- I don't particularly think that you have to add a 0 to a vector in order to turn it into a quaternion. I think that adding 0 is a no-op. It's like saying that the i in eiπ = −1 is really the formal pair (0+1i); it's certainly a valid way of constructing and thinking about complex numbers, but I don't think it's helpful to beginners. You don't need to construct quaternions as formal pairs or quadruples to work with them; it's sufficient, and a lot easier, to just remember . (Or i2 = j2 = k2 = ijk = −1, but that's less convenient in practice.) -- BenRG (talk) 14:43, 28 April 2009 (UTC)
- First, a vector is *not* a quaternion. In this particular example, vectors are members of three dimensional vector space V, while quaternions are members of four dimensional set H. That's precisely the problem of the a quaternion is a number plus a vector approach: it is basically a convenient notation to put the real part on one side and the imaginary part on the other side, but you see it as if it were a real addition. So your remark I think that adding 0 is a no-op shows that you are being fooled by this notation. It is really much more as adding 0, it is changing a three dimensional being (the vector) into a four dimensional being (the quaternion). If you had to program the rotation of a vector with quaternions in a computer program, you'd perfecly see that you need to convert class vector v(x, y, z); into class quaternion q(0, x, y, z);, adding a zero first component, before calling the multiplication routine -- otherwise: bang! compilation error!
- Second, yes, it would be a bit longer a demonstration if we dropped the 19th century "a quaternion is a number plus a vector" approach. But not very much longer, and perharps simpler to understand. But before I give demonstration outlines below, let me point out that, in this article, we have never explained the origin of the coefficient. The first paragraph about the intuitive vision of the rotations space gives an idea, but absolutely no demonstration. We say it's an hypersphere, fine, but where does that result come from? Silence... We did not prove either the relation that binds quaternion multiplication to cross product and scalar product. Finally, we are using the fact that the inverse of a unit quaternion is the same as its conjugate, but did not prove it. So, in the proof that quaternions rotate vectors, we are currently building results upon moving sand ;-).
- Also, current demonstration skips a lot of intermediate lines, its calculations are not obvious at all.
- Here is the outline of a first demonstration (almost without computations):
- when does conjugation preserves a vector? u V u* = V if and only if u V = V u, i.e. when u and V commute
- u and V commute only if they are collinear
- conjugation is linear (i.e. the conjugate of the sum is the sum of the conjugates)
- the length of the vector part of a quaternion is preserved under conjugation
- a linear application that conserves the length and that preserves a vector only when its axis coincides with the vector is a rotation
- Here is the outline of a first demonstration (almost without computations):
- Another demonstration is to do directly the computations with all symbols and end up with the rotation's formulas. As this leads to endless formulas in the general case (and as you remark above, it's not easy to spot the identities in the transformations), we could do it in a simplified case, for example when rotating i around k of an angle alpha.
- Finally, let me point out that I did not really intend to remove the "vectors approach". It was merely an intellectual side remark. I have enough work with translating this article to French already ;-). I am even wondering if a demonstration is really needed at all in a wikipedia article. MathsPoetry (talk) 09:49, 29 April 2009 (UTC)
- I'm not being fooled by notation, I'm taking a different view of quaternions than you are. Saying that a vector is a quaternion is like saying that a real number is a complex number or a rational number is a real number. In a strictly formal approach those are false statements. Chances are that you constructed the rationals as equivalence classes of ordered pair of integers, while real numbers are equivalence classes of Cauchy sequences of rationals and complex numbers are ordered pairs of reals. Integers, in turn, are signed natural numbers, while natural numbers are finite ordinals and ordinals are certain sets. You can't say, in this system, that 2 is an integer, at least not if you also want to say that 2 is a natural number; that would be an abuse of notation. You need to write an explicit injection into the integers if you want to use 2 as an integer. If you want to use it as a real number, so you can multiply it by π for example, then you have to inject the integer 2 into the rationals and from there into the reals. If you really want to take a principled strongly-typed approach to mathematics then it's not enough to demand that vectors be explicitly constructed from their components and then explicitly injected into quaternion space. You'll also have to write things like , where for "convenience" I've defined . Take a look at 2p2e4 at MetaMath to see what it's really like to write mathematics like software (see also the trivia).
- Also, there's nothing informal or weakly typed about the s + v approach to quaternions. The reason numbers are usually constructed as formal n-tuples is just that ordered tuples are easy to define in set theory. That's also why and are constructed that way in software, because programming languages have primitive ordered tuples. But it's equally rigorous, just less foundational, to write down the axioms of an algebra with formal symbols i, j, k and equivalences i² = j² = k² = ijk = −1. In that system it's a theorem that every value has a representative of the form a + bi + cj + dk where a, b, c, d are reals. It's equally rigorous to write down the axioms of an algebra of mixed scalars and vectors and the equivalence uv = u×v − u·v. In that system it's a theorem that every value has a representative of the form s + v. How do you add a vector and a scalar? Well, I just did. Expecting it to collapse to a "single value" is no more reasonable than expecting a+bi to collapse to a single value. If complex numbers are pairs then that really means (a,0) + (b,0) × (0,1), which collapses to (a,b). That's the computer-software approach. But people don't think of complex numbers as pairs satisfying the rule (a,b)×(c,d) = (ac−bd, ad+bc), they think of a+bi and i² = −1, and they are fully justified in doing so, mathematically speaking.
- I'm completely in favor of your largely calculation-free proof that quaternion rotation works, if you can pull it off. I don't like the current proof very much. All I'm opposed to is a proof that's like the current one but with an even larger lump of unexplained calculation in the middle. -- BenRG (talk) 14:50, 30 April 2009 (UTC)
- I am happy you have taken the example that rationals are not real numbers, and that real numbers are not complex numbers. If you remind well your work with Cauchy sequences, you should remind that your teacher proved at some point that the constant sequence (q) where q is the same rational number (for every N) is a Cauchy sequence and the associated real number could be considered "equal" to this rational number, even though they are objects of very different natures, making Q a mere subset of R. This is by no means a straightforward consideration and needed a proof, even though this proof is obvious. The same applies to complex numbers, that you have probably constructed as pairs (x, y) of reals (exhibiting a "number" i with funny properties was fine in the 16th century, but it is not rigourous). Your teacher probably proved that the subset of C of the form (x, 0) was equivalent to the reals, making R a mere subset of C. Again, there's nothing "straightforward" in such facts and it deserved a demonstration, albeit very simple. Introducing i as a notation for (0, 1) is practical and can be thought of "the number whose square is -1", but it's only a shortcut of the mind. I have added a sentence to state that, in conjugation , the vector V was turned into a quaternion and I think this sentence was very necessary. But I think that we basically agree on that. Sorry if I hurted your feelings with the word "fooled", I should have used some other word. I just wanted to say that this "addition" hides changes in the dimensions.
- About "my" proof without computations that conjugation by a unit quaternion is a rotation. First, it's not "my" demonstration, I remembered it from some mathematical reading (which one??? mistery... I'm afraid I have forgotten where I have read it). Second, yes it's very elegant, but somehow it is "cheating"... It uses a very powerful result: "if f is a linear map that keeps lengths unchanged and that keeps an axis invariant, then f is a rotation". Somehow this is too powerful, it's like drawing a rabbit from a magician's hat. So I am not 100% sure it would be better than current demonstration from a pedagogical point of view. Also, current demonstration has an advantage over "mine" : it shows why had to be divided by 2 ;-).
- Again, do we really need a demonstration at all of the quaternion-rotation equivalence in an encyclopedic article? I have currently mixed feelings towards all three demonstrations (vector oriented, linear maps oriented or analytical computations oriented), each of them has qualities and drawbacks, perharps I need time to give some more thinking on that topic. MathsPoetry (talk) 21:01, 30 April 2009 (UTC)
- Of course there's a Cauchy sequence converging to every rational. That doesn't make Q a subset of R. Rather, it gives a natural injection of Q into R, which I called . I can't see any evidence that you understood anything that I wrote above. You complained that in the sum s + v a vector was being implicitly converted into a quaternion. I responded by saying that that's not true in the system I'm advocating (second paragraph) and also not true in the system you're advocating (first paragraph). In your followup not only do you repeat what you said before, you don't even seem to realize that I disagree with you! Do you see the problem with claiming that a real number is a complex number while also claiming that a three-vector is not a quaternion because the spaces have different dimension? When I wrote "How do you add a vector and a scalar? Well, I just did", do you understand what I meant by that? Do you understand that in my approach i is not a shorthand for (0,1)? Does it help if I mention that I'm constructing the complex numbers as , a quotient ring of a polynomial ring?
- I don't know whether we need a proof, but I don't think it's doing any harm. It isn't very long, and it's not something people would necessarily see how to do on their own. The article already says things like "any rotation in three dimensions is a rotation by some angle about some axis" (which is far from obvious), so I don't think there would be anything wrong with "a linear map that keeps lengths unchanged and that keeps [just one] axis invariant is a rotation". -- BenRG (talk) 11:58, 4 May 2009 (UTC)
- Exactly, strictly speaking, Q is not a subset of R, but there is a natural injection. Saying that Q is a subset of R is, again, a common abuse. So is saying that a real is a complex. Or that a vector is the imaginary part of a quaternion. We only do such shortcuts because a) we have complex constructions that JUSTIFY our notation shortcuts (like the Cauchy sequences, and the abovementioned natural injection), and b) because these shortcuts are so PRACTICAL - every 13 years old pupil considers Q as a "subset" of R, and it is written in many math books, though some persons with more math knowledge like you and me know that it is not exactly true.
- Now returning to the quaternions, in this wikipedia page we have NO justifications. We have vague sentences like "the imaginary part of a quaternion behaves like a vector", and that's all. Basically, that's "believe me, that's how it works". Later on, taking an usual, geometrical, vector, and using it in quaternion multiplications is left unjustified, just the same. I agree this vector notation is practical. I also agree wikipedia is no maths manual, and that's not the place to do such constructions and justifications. But we need to at least WARN the reader that, when we take V and conjugate it, it becomes suddenly a quaternion (we aggregate a first zero coordinate). Hence my sentence let also be an ordinary vector of the 3 dimensional space, considered as a quaternion with a real coordinate equal to zero which I consider as very important. But I am wondering what we are arguing about, as you did not seem to oppose that sentence.
- Let me also say that you have absolutely no reason to be so harsh in your tone. I am trying to be polite and I am expecting the same from you. Don't say that I don't understand what you say, that is very offending.
- Yes, you're right, the current proof does not do any harm. Let's leave it alone. Switching to the so-called "my demonstration" would not really be any better. Or would it? I'm not really sure of anything in this affair. MathsPoetry (talk) 18:23, 4 May 2009 (UTC)
(restarting the indentation at 0). Regarding "my demonstration" (we need a better name for it), I have been giving some thought at it and I am wondering if it is even correct. I have been searching a property similar to "if f is a linear map that keeps lengths unchanged and that keeps an axis invariant, then f is a rotation", and have not found it. First, it is not true in other dimensions than 3 (in a plane, a linear map that is an isometry and that keeps an axis unchanged is a reflection). Second, I am wondering it it is even true in dimension 3. Perharps it should be proven that f keeps handedness too. The closest property I have found was "if f is a linear map that keeps scalar product and determinant unchanged, then f is a rotation". I still think that this demonstration is valid, but it probably needs some more work and additional verifications. MathsPoetry (talk) 07:40, 6 May 2009 (UTC)
- It is true in dimension 3. An antirotation for example does not keep the vectors of the axis unchanged, it converts them to their opposite. This demonstration is valid in dimension 3, it's only that I would like to see a book where the final property "a linear application that conserves the length and that preserves a vector only when they pertain to a given axis is a rotation" is stated, or better, established. I am feeling uncomfortable to use a tool that no one else mentions. Or perharps I just did not search well. MathsPoetry (talk) 10:03, 7 May 2009 (UTC)
(restarting the indentation at 0). The article Quaternions and spatial rotation was translated by MathsPoetry, and we have a discussion in french on that translation. I advise you to read it (if you can understand french).
- Let f be an isometry (= linear map preserving the distance) of R3. Assume 1 to be an eigenvalue of f. Say, there exists a vector V such that f(V)=V. Then the line generated by V is stable under f. As f is an isometry, it preserves the orthogonality. Thus, f preserves the plane orthogonal to V. In particular, f restricts to an isometry of V. You probably know that isometries in dimension 2 are rotations or orthogonal symetries with respect to a line generated by W. Thus f is a rotation of axis RV (first case) or a symetry with respect to the generated by V and W.
- MathsPoetry has partially right. There exists a beautiful geometric argument (beautiful for anyone who loves geometry). The field of quaternions H is equipped with an Euclidean metric |.|, and we have . In particular, the action A(q) of a unitary quarternion q by conjugation preserves this Euclidean metric. Then, A(q) is an isometry of the Euclidean vector space H, which preserves 1, then the line of reals and its orthogonal, which is the vector space E of the pure quaternions. Here E is a vector space of dimension 3, and can be naturally identified with R3 because i, j and k is an orthonormal basis. The linear map A(q) restricts to an isometry of E, still denoted by A(q). Now, the set of unitary quaternions is simply the unit sphere of H. So you can pass continuously from 1 to q. There is a continuous path of isometries from the identity to A(q). Hence, the determinant of A(q) is 1. In other words, A(q) is a rotation. This prrof is well-known, and it is not hard to find references, if necessary. I hope no.
- The explicit computation ("your proof") is also very nice, but appears to me as a sort of trick. But it is useful to understand really how a unitary quaternion represents a rotation, with its axis and its angle.
- f can't be a symetry with respect to a plane, because such symetries preserve the whole plane. In the case of conjugation, a vector V is preserved if and only if it pertains to a given axis. Re-read my demonstration, please (which btw is not mine).
- Yes, the demonstration you give above is a beautiful demonstration, indeed. Probably the most beautiful among all the "conjugation<=>rotation equivalence" demonstrations that we have exhibited so far. However, I would not call it a "geometrical" demonstration, because it makes use of continuity, which is typically a topological notion. MathsPoetry (talk) 20:55, 3 June 2009 (UTC)
- Sorry you were right. The set of fixed vectors of your isometry is exactly a line so that the isometry must be a rotation.
- General topology can be viewed as a part of geometry, even though this point of view is debatable. Note that the definitions of topological manifolds or varieties require the notion of continuity. Continuity is necessary to define interessant geometric objects. Neifbor Udofix (talk) 23:29, 3 June 2009 (UTC)
Example
Currently, the text of the example says:
- This can be simplified, using the ordinary rules for quaternion arithmetic, to
I think it is a bad idea to omit all the computations, because a reader who is not familiar with "quaternion arithmetics" may wonder where this comes from and feel disappointed. I suggest to replace this paragraph with:
- If we develop the previous expression, and if we apply
- we obtain:
I know these computations are long and boring. But without them, we give the impression that we are illusionists drawing a rabbit from a magician's hat. Also, it is informational to show that quaternion arithmetics are long and tedious.
Perharps we could skip a few lines to keep its length reasonable.
Criticism and opposition are welcome. If no one disagrees, I'll proceed with the change. MathsPoetry (talk) 09:24, 4 May 2009 (UTC)
- No reaction after three days; I'll go on with that change. MathsPoetry (talk) 08:42, 7 May 2009 (UTC)
Conversion from an orthogonal matrix to a quaternion
Hi everyone
This article says :
- The value of
- will certainly be a real number
That might be true, but I don't understand why. Can someone enlighten this point? Perharps we could add a reference in the article to some place where this point is explained? References in Wikipedia are a good thing ;-). MathsPoetry (talk) 09:46, 10 May 2009 (UTC)
- This whole conversion formula is obviously wrong and should be removed or corrected. Let us assume that Q is the identity matrix. The current version of the conversion formula then returns the quaternion (undefined, 0, undefined, undefined) (lots of divisions by zero), when in fact it should trivially return (1, 0, 0, 0). Sebsch (talk) —Preceding undated comment added 14:16, 16 April 2010 (UTC).
- I don't have the time to correct the article but the correct formulas can for example be found in A8 of this paper, which is often cited in the computer vision literature.Sebsch (talk) 14:32, 16 April 2010 (UTC)
- I've just had a go at fixing it, before reading your last comment. I'm not convinced it's the best approach as it would be numerically unstable very close to the identity but it at least deals with the divide by zero.--JohnBlackburnewordsdeeds 14:36, 16 April 2010 (UTC)
- I believe, the square root will still yield complex values in a number of situations. I see no guarantee, that just because .131.246.191.249 (talk) 09:49, 11 June 2010 (UTC)
- I've just had a go at fixing it, before reading your last comment. I'm not convinced it's the best approach as it would be numerically unstable very close to the identity but it at least deals with the divide by zero.--JohnBlackburnewordsdeeds 14:36, 16 April 2010 (UTC)
From an orthogonal matrix to a quaternion: The naming conventions are not kept consistent: q0 + qxi + qyj + qzk is used to define the quaternion but u,v and w are used as indices for the formula. Despite that the conversion formulas appear to be wrong (i.e. mixed up) —Preceding unsigned comment added by 131.246.194.27 (talk) 08:43, 6 August 2010 (UTC)
The conversion from a matrix to a quaternion is the same one provided by Berthold Horn (1987). If the input matrix is not exactly orthogonal, its columns can be used as 3 independent vectors that are to be registered to the 3 elementary vectors in the least-squares sense. Horn's formula finds the least-squares spherical displacement as a quaternion, which is what the conversion returns. Incidentally, the quaternion can then be used to create an orthogonal matrix that is, in the registration least-squares sense, a "correction" of the input matrix. (This correction matrix is not optimal in the sense of being the orthogonal matrix closest under the Frobenius norm but it is nearby if the input matrix is "nearly" orthogonal.) —Preceding unsigned comment added by RandyEllis (talk • contribs) 19:21, 8 October 2010 (UTC)
The given method was unstable if the matrix approached the identity matrix. I replaced it with a link to [Rotation_matrix#Quaternion], which gives a correct and stable method. Note that this 'bug' in the article has already leaped into several libraries, showing the influence (good and bad) of wikipedia. 62.245.183.130 (talk) 09:24, 11 January 2012 (UTC)
Parameterizing the space of rotations
In the example of 2D rotations (rotations about an axis on the xy-plane) - "A point (w,x,y) on the sphere represents a rotation around the axis directed by the vector (x,y,0)..." shouldn't it be (0,x,y)?
pvazteixeira (talk) 10:37, 15 October 2009 (UTC)
Double cover
The reference to double cover is mentioned only lightly at one point. It is actually a serious drawback of quaternions when comparing them to 3x3 matrices and should be mentioned in this comparison section. It means that users either have to accept two different values for each orientation or their representation has a discontinuity. —Preceding unsigned comment added by 203.214.118.60 (talk)
- I don't think it's ever a problem in practice; can you give an example? -- BenRG (talk) 20:23, 23 October 2009 (UTC)
OK,
- how do you average three orientations? a simple solution is to add up the components then normalise the result, but there are two quaternions for each orientation, so the choice affects the average. If you make all of the quaternions have +ve w you get a different result to if you make them all have a +ve x, so this shows that choice of how deal with the double cover affects the resulting orientation. With 3x3 matrices you could add them together and orthonormalise and get a good approximate average.
- if you want to lerp (linear interpolate then normalise) from one orientation to another the result depends on which of the two quats are being used at each end. If the 2 quats both are known to have +ve w then you still need to check the 4d dot betweeen them to avoid the lerp interpolating the long way around. With 3x3 matrices you can interpolate then orthonormalise without these concerns.
- the above show how it can be a good idea to keep quats with a +ve w at all times, however, this means the data jumps when going from +180 degrees to -180 degrees, which for example complicates interpolated table lookups based on orientations, and it complicates any code that tries to measure the change in orientation based on the similarity of the data. With 3x3 matrices you can take one from the other and the square sum of the components is a reliable measure for how different the orientations are.
- When interpolating between quaternions you do have to check the dot product and negate one input when it's negative. However, that has the side effect of ensuring that the angle between the inputs is no more than 90°, so they're guaranteed to be well conditioned as inputs to the lerp. The test and negation are a tiny inconvenience compared to the problems you run into with matrices when one of the axes is rotated by an angle near 180°. I'm not completely sure what it means to take the average of three orientations, but I suppose that with quaternions I would compute the four sums a±b±c and take the longest of them. It's easy to show that its length will be at least √3, so this gives sane results for all inputs. Again, the matrix equivalent will break in the general case unless you make heroic efforts to identify and handle the special cases. We could add to the article a statement to the effect that it's easier with matrices to write some functions that work in simple cases (but break in the general case), while with quaternions you're basically forced to handle the general case. But I see that as an advantage of quaternions.
- I don't think it ever makes sense to demand a canonical form for the quaternions because, as you say, there will always be discontinuities that you'll have to check for anyway. All functions on the quaternions should be sign-agnostic on their inputs. -- BenRG (talk) 19:09, 27 October 2009 (UTC)
- OK, maybe just something reminding people that there are two values for each orientation, which needs to be remembered when comparing two orientations. I just think this double cover needs to be mentioned as a (minor) complication, since I've been bitten by it once or twice myself. Tom. —Preceding unsigned comment added by 124.171.141.46 (talk) 01:00, 28 October 2009 (UTC)
- These issues with the double cover are dealt with easily. See Michael Johnson's MIT PhD thesis, "Exploiting quaternions to support expressive interactive character motion" for all the details. Briefly, a bundle of quaternions should be confined to one hemisphere by making sure they all have a positive dot product with the quaternion representing the average of the bundle. This way, there is no "jumping" when going from +180 to -180. The average is the 1st Eigenvector of the 4x4 Hermitian matrix given by the Einstein sum . Notably, this is the only correct method for computing mean rotation. Really, his PhD thesis has the best explanation and diagrams for understanding quaternions that I've found. Reve etrange (talk) 14:53, 3 March 2019 (UTC)
A doubt about zr in 4D rotation section
Shouldn't zr in vector-matrix form be:
and not
? —Preceding unsigned comment added by 90.147.26.254 (talk) 11:30, 19 November 2009 (UTC)
- No – consider for example . Then , or equivalently, using the article's version:
- which is consistent. The alternative you gave would give instead (and is equivalent to exchanging for for any ). Κσυπ Cyp 13:53, 11 December 2009 (UTC)
Please clarify some points early in the article
I found it hard to follow the explanation in the paragraph that begins with "We can see similar behavior on the surface of a sphere."
1) It states "the axes of rotations use three dimensions". This is unclear, as the angle between the pole and a latitude has only one degree of freedom, so why give this three dimensions?
2) It mentions "just the rotations about axes in the xy plane". Does this refer to rotations within the xy plane? If so, then they are all around the z-axis, not around (plural) axes. Or are axes parallel to the z-axis the cause of the plurality? Please clarify this.
3) It states "the angle of rotation is twice the latitude difference from the north pole" but there is no explanation for this counter-intuitive fact. Please explain.
I don't doubt that the paragraph is mathematically correct, what I am questioning is the clarity of the exposition. Soler97 (talk) 00:13, 18 April 2010 (UTC)
- Please check out the new description, addressing these points. PAR (talk) 09:47, 18 April 2010 (UTC)
- Thanks. I have carefully reread the two paragraphs beginning with "In order to visualize the space of rotations". I got lost when the radius of the small circle was said to correspond to a small rotation. I pondered it for a while and now I think I understand. It would be helpful if you mentioned that the xy plane is vertical and it would also help if the north pole were marked on the illustration. Drawing the two lines that define the angle would be even more helpful. In fact, I'm still not sure where the angle is.
- The next point where I had trouble was, "the circles become larger until the equator of the sphere is reached, which will correspond to a rotation angle of 180 degrees." To me it seems that the rotation in question is 90 degrees, not 180, as the angle is defined by a line through the centre of the sphere to the north pole and another line from the centre to a point on the equator. Or did I misunderstand? It would help a lot if the angle were clearly shown on the diagram using two lines rather than by means of a single arrow.
- I could not understand "each rotation is actually represented by two antipodal points on the sphere, which are at opposite ends of a line through the center of the sphere." Surely, the two antipodal points define a line, not a rotation?
- At this point I gave up. Soler97 (talk) 21:46, 23 April 2010 (UTC)
- I agree, a better diagram would be good. The thing is, every point on the sphere represents a rotation, but is not the rotation itself. If I have a box of apples, and I use my fingers to count the apples, my fingers are not apples, they represent apples. The points on the sphere represent rotations, but are not rotations. Two antipodal points define a line, but they represent a rotation. If you pick a point on the sphere, you can figure out what the rotation is. Pick a point, take a slice through the sphere that is parallel to the xy plane (the xy plane is horizontal!) and goes through that point. A line drawn from the center of the circle to the point will be a vector that is parallel to the axis of rotation. The length of that vector will be the radius of the circle and will represent the angle of rotation (but its length is not equal to the angle of rotation, its a bit more involved). So that is how a point on the sphere entirely represents a rotation. If we want to make sure that radius represents an angle of rotation, and if we want every rotation to be represented, then we have to make that radius represent a rotation from 0 to 360 degrees as we go from the north pole to the south pole. That means the half way point (180 degrees) is represented by going half way from the north pole to the south pole (i.e., the equator). That means that a point on the equator, which is 90 degrees from the north pole, will represent a rotation of 180 degrees. PAR (talk) 03:53, 24 April 2010 (UTC)
- As I understand it, you are suggesting a correspondence between points on the sphere and rotations. I can see that the radius of the circle going from 0 to a maximum and back to 0 is an analogue of the rotation angle going from 0 to 360 degrees, given that 360 = 0 degrees. Maybe the explanation you give above should be merged into the article. I think this correspondence between points and rotations is very abstract. The diagram does not seem to help me at all. I think I now understand your explanation, but it took me a real effort. I think that a good diagram would be a big help. Thanks for your help.Soler97 (talk) 22:22, 6 May 2010 (UTC)
Used methods
This section needs a serious cleanup.
The psuedo code for rotation using a quaternion is confusing, for example, the temporaries start at t2 (why? Has the original author missed a step?) and there are cases where the temporaries are assigned values such as -c * c (does this mean -(c*c) or just c*c?). Also, why say Also note one optimization of the diagonal entries of the R matrix in this section? It has no relevance as far as I can see.
I'd clean it up but I have no idea about most of this stuff and I know I'd mess something up. Ephphatha (talk) 15:18, 16 May 2010 (UTC)
- I have replaced this with new pseudocode, hopefully this is clearer. User A1 (talk) 15:45, 20 May 2010 (UTC)
Pseudocode
The pages of pseudocode are unnecessary and should be removed. All you need to do quaternion rotation is quaternion multiplication, i.e.
The code examples make it look much more complicated, mostly by doing a lot of of extra and redundant stuff. Even if trimmed down to just show the above mathematics it would be unnecessary - pseudocode is hardly needed to show how to multiply quaternions, which already gets a page under the heading quaternions briefly, and this is a maths article not a computer algorithms one. Any objections to removing it and tidying up that section?--JohnBlackburnewordsdeeds 13:08, 15 June 2010 (UTC)
Codes are not necessary but people can use them for programing their oun things, programing quaternions is not easy, the other thing is that quaternions are used a lot in programming, but may be code and pseudo code must be in an article of programming with quaternions —Preceding unsigned comment added by Daniel.villegas (talk • contribs) 02:18, 22 June 2010 (UTC)
- Programming quaternions is easy if you understand them, as it comes down to basic arithmetic which all modern languages support, and quaternions can easily be encapsulated in structures or classes. Wikipedia is not an instruction manual; code to show an algorithm that's best expressed as code may be appropriate, code included for people to "use them for their own things" is never appropriate. And this is not the article "programming with quaternions", nor is their any such.--JohnBlackburnewordsdeeds 18:50, 22 June 2010 (UTC)
- Quote from Jimmy Wales:
But Wikipedia is more than a website. We share a common cause: Imagine a world in which every single person on the planet is given free access to the sum of all human knowledge. That's our commitment.
- This means that destruction of useful, referenced content is to be avoided, no matter how many Wiki-laws you can cite. The only question we have to answer is "where does it go?". That said, I agree, the code in its present form is too much, redundant, and Python-centric. It needs to be pared down to demonstrate an algorithm, but in pseudocode. Code in Python and every other language must go elsewhere. I think WikiBooks is the place for it. I think any editor who wishes to delete good, referenced code from an article has the responsibility of being able to evaluate that code, and then to place it where it belongs, rather than being a destructionist (oops, sorry, a "deletionist") and pitching good information into the trash. PAR (talk) 23:23, 22 June 2010 (UTC)
- The quote is about knowledge, not just any content, and the source code does add to the article's sum of knowledge: it just implements the simple maths described at length elsewhere. It's not referenced, or at least no references are provided for either block of code. As for moving it elsewhere I know little about WikiBooks except it exists, so it would be better for another editor to find a home for it there. Removing it here would be no barrier to that as the content will be in the article's history with this discussion on the talk page providing a reference - though both sections of code are overlong with many irrelevant parts, so it might be easier to write it anew in the appropriate WikiBook.--JohnBlackburnewordsdeeds 16:31, 23 June 2010 (UTC)
Shouldn't this be 'addition', not 'multiplication'
From the section "From the rotations to the quaternions" / "Quaternions briefly":
"Those who have studied vectors at school might find it strange to add a number to a vector, as they are objects of very different natures, or to multiply two vectors together, as this operation is usually undefined. However, if one remembers that it is a mere notation for the real and imaginary parts of a quaternion, it becomes more legitimate. In other words, the correct reasoning is the multiplication of two quaternions, one with zero vector/imaginary part, and another one with zero scalar/real part:
a + \vec{v} = (a + \vec{0}) + (0 + \vec{v}). "
Shouldn't the bolded word above be "addition", not "multiplication"? I am just learning this stuff by reading this article, so I could be wrong; but I've puzzled through this paragraph many times and I just can't see how the word 'multiplication' is correct to describe the subsequent equation which describes the addition of two quaternions, not multiplication. —Preceding unsigned comment added by 204.176.49.45 (talk) 19:57, 10 August 2010 (UTC)
- You're right and I've fixed it, thanks. It probably could do with some further editing that whole section but for now I've just corrected that error.--JohnBlackburnewordsdeeds 20:38, 10 August 2010 (UTC)
Article cleanup?
Comparing this article to other mathematics-related articles, I miss clarity and crispness. The introduction seems too long and is more tutorial-style than encyclopedic. I also believe that reordering the sections would help. Most importantly, the link to the Euler-Rodrigues equation is missing. The article should start mentioning the purpose of this equation (calculate the rotation operator in 3D vector space), its reparametrisation with the Euler-Rodrigues parameters, and the connection to quaternions.
I have some ideas for this cleanup, but wonder what is a good procedure to do it. I am new to Wikipedia editing-- can someone make a suggestion?
Note also the page on Euler-Rodrigues parameters. Some ideas, which are very briefly outlined there, should be worked out in detail in a combined article.
Arjenvreugd (talk) 13:39, 8 July 2011 (UTC)
- I strongly urge you to clean up this article, if you can be bothered. It's written tutorial style, which makes it unusable if you want to LOOK UP something, and that's what an encyclopedia is for: to look things up. Thanks for your effort!--345Kai (talk) 03:22, 14 March 2012 (UTC)
- I've had a crack at it. I've put together a short, concise, introduction to using the concepts with links to anything too much to explain immediately. I'm sure some of the language can be sharpened up still further though. --Chadernook (talk) 10:09, 23 May 2012 (UTC)
Problem with example
In the example halfway down the page, i,j,k are used for the unit basis vectors for 3-d cartesian space, and also for the quarternion imaginary terms. These are not the same thing and it makes the example very confusing.Eregli bob (talk) 05:27, 22 September 2012 (UTC)
- I must agree with this comment. The two concepts, being the vector part of a quaternion and a vector in Euclidian space cannot be conflated into the same concept without comment. This can be seen from the fact that a quaternion unit vector squares to −1 (under the quaternion product), whereas a geometric unit vector squares to +1 (under the dot product). Both these are easily accommodated in a geometric algebra but this ephasizes that they are distinct; they are in fact each other's Hodge dual in a 3-D geometric algebra. Thus special care (and explanation) is needed for interpreting i, j and k as geometric unit vectors. I do not know the traditional way of resolving/presenting this; I suspect it is by simply conflating the two, but reserving the notation q2 to mean the quaternion product rather than the vector dot product, for example for the pure vector u, u⋅u = u∗u = (−u)u = −u2. Whatever the case, it should be made clearer. — Quondum 11:04, 22 September 2012 (UTC)
so what's this u?
" α around the axis \vec{u} as previously described" this is the first mention of \vec{u}. And nowhere does the article seem to touch on what vector \vec{u} should be chosen and when 24.94.182.11 (talk) 19:05, 27 October 2012 (UTC)
Explanation of why conjugating by quaternion rotates a vector expressed as an imaginary quaternion
I think there is a more motivated proof of this than the one in the article (which just goes ahead and does the calculations), albeit one which is more theoretically advanced. It starts by saying that the vector being rotated is, most fundamentally, not actually a vector. What it is is an element of the Lie algebra of the group of rotations, in other words, either an infinitesimal rotation, or more easily, a rotation 'speed', one with the vector as an axis and the speed of the rotation is determined by the magnitude of the vector. (Strictly speaking, it is not the rotation group as we represent each rotation speed twice: rotating anti-clockwise at a certain rate about one axis gives the same rotation speed as rotating clockwise by the same rate around the opposite axis.)
Without realising this, there appear to be two unrelated ways of applying a quaternion rotation: once by conjugating a matrix, and another by left multiplication of projective co-ordinates. But we see the former can be derived from the latter. It's straightforward to see that a rotation matrix acting on co-ordinates has to transform by conjugation if the co-ordinates are transformed. Then you observe that an infinitesimal rotation (or rotation speed) has to transform the same way (looking at the expression for the exponential map).
I don't have the foggiest clue where I would start with discussing this in this article and others. Count Truthstein (talk) 19:24, 9 March 2013 (UTC)
- Absolutely no. The vector to be rotated is namely a vector, and we should not know anything about cross product (i.e. the Lie algebra structure) to use a representation of a group to rotate the 3-dimensional space. It happens that SU(2), the group of unit quaternions, covers SO(3), and this is the thing because of which it works. In almost the same way SU(2)×SU(2) covers SO(4), but there is no cross product in ℝ4. BTW, what are mysterious “projective co-ordinates”? Incnis Mrsi (talk) 21:59, 9 March 2013 (UTC)
- The projective co-ordinates which are two complex numbers specifying a point on the complex projective line, equivalent to the Riemann sphere. Multiplying the column of these numbers by a matrix is the same as doing a Möbius transformation on the Riemann sphere. Count Truthstein (talk) 22:14, 9 March 2013 (UTC)
- Are these “projective co-ordinates” topical? Riemann sphere has the Möbius group, a broader automorphism group than SO(3) of S2. It corresponds to Minkowski space geometry, not to one of three-dimensional space. Moreover, corresponding matrices are from SL(2,ℂ) which, unlike SU(2), is irrelevant to quaternions. I do not see any relationship but to demonstrate how different groups make different geometries. Incnis Mrsi (talk) 22:55, 9 March 2013 (UTC)
- They are topical in that if you represent quaternions as 2-by-2 complex matrices then rotations of points on the sphere given by these co-ordinates can be given as quaternions. It is using quaternions to describe spatial rotation in another way. Not all Möbius maps represent rotations of course - the rotations are a subgroup (see the subgroups section of the Möbius group article). Count Truthstein (talk) 23:37, 9 March 2013 (UTC)
- Are these “projective co-ordinates” topical? Riemann sphere has the Möbius group, a broader automorphism group than SO(3) of S2. It corresponds to Minkowski space geometry, not to one of three-dimensional space. Moreover, corresponding matrices are from SL(2,ℂ) which, unlike SU(2), is irrelevant to quaternions. I do not see any relationship but to demonstrate how different groups make different geometries. Incnis Mrsi (talk) 22:55, 9 March 2013 (UTC)
- The projective co-ordinates which are two complex numbers specifying a point on the complex projective line, equivalent to the Riemann sphere. Multiplying the column of these numbers by a matrix is the same as doing a Möbius transformation on the Riemann sphere. Count Truthstein (talk) 22:14, 9 March 2013 (UTC)
You can define quaternion rotation rigorously using rotors. In geometric algebra rotors rotate anything, i.e. anything of the algebra including vectors. And in 3D rotors are just quaternions. This makes the imaginary part of a quaternion not a vector but a bivector or pseudovector. This requires neither matrices nor projective coordinates. To prove this is a rotation you need to define the rotation, but the usual way in GA is to construct the rotor and then confirm the transformation applied to vectors is a rotation. You can e.g. check that the angle between two vectors before and after is the same, so it's orthogonal.--JohnBlackburnewordsdeeds 23:03, 9 March 2013 (UTC)
- This is actually very similar to what Count says in his opening paragraph. When the Count says that
what he's describing is what in geometric algebra is known as a bivector, the exponential of which is a rotor. And in geometric algebra, as the quaternion article says, the imaginary parts of quaternions are exactly bivectors: k = - e1e2, i = - e2e3, ji = - e3e1."[what's] being rotated is, most fundamentally, not actually a vector. What it is is an element of the Lie algebra of the group of rotations, in other words, either an infinitesimal rotation, or more easily, a rotation 'speed'"
- But as you say, the great thing about rotors is they rotate anything. In 3D we can use the fact that bivectors are the dual of vectors, so we can do everything with quaternions. But the advantage of seeing this as part of GA is that you then can see it as a process that isn't just about 3D, but generalises to any dimensionality, since the rotors in that dimensionality don't need to act on a bivector, they can act directly on a vector (or indeed, anything). Jheald (talk) 17:25, 10 March 2013 (UTC)
Duplicate sections
The first section, "Using quaternion rotations", and a later section ("From the rotations to the quaternions") both describe the same thing. They should be merged. Count Truthstein (talk) 14:27, 10 March 2013 (UTC)
Product conjugation error
The article currently says:
"It follows that conjugation by the product of two quaternions is the composition of conjugations by these quaternions. If p and q are unit quaternions, then rotation (conjugation) by p q is
- ,
which is the same as rotating (conjugating) by q and then by p. The scalar component of the result is necessarily zero."
Shouldn't the operation in the above equation by conjugation (*), not inverse (-1)? One then needs to know that (pq)* = q*p*. Also why is the scalar component of the result is necessarily zero? Since quarternions are a division ring, any non-zero rotation can be represented as the product of two other rotations, so this would mean the scaler part of any rotation is zero, which can't be right.--agr (talk) 17:07, 4 August 2013 (UTC)
- I understand now. For units, the inverse is the conjugate (I added a sentence to point this out), and the conjugation operation is being applied to a 3-vector, so scaler part remains zero.--agr (talk) 18:35, 8 August 2013 (UTC)
- You may have confused things further. "Conjugation by" is an operation that sandwiches a quantity between a quaternion and its inverse, and has nothing to do with the "quaternion conjugate". It is essentially a coincidence that when the quaternion is a unit quaternion, the inverse that gets used is also equal to its quaternion conjugate, and that the terms are so similar. You can conjugate by a quaternion that is not a unit quaternion, in which case the coincidence does not hold. No offence, but I'm reverting your edit. If you can find adequate wording to clarify this confusion, feel free to add it. — Quondum 20:34, 8 August 2013 (UTC)
- I've cleaned it up a little. See whether it is clearer now. — Quondum 20:51, 8 August 2013 (UTC)
- It's better, but it is still a little muddled. It isn't completely clear what the sentence "This operation is known as conjugation by q." refers to, taking the inverse or qpq-1, as q-1 is the logical antecedent to "This". Also if we are now defining conjugation in terms of the inverse, do we need to mention the conjugate at all? Maybe just in a footnote.--agr (talk) 21:20, 8 August 2013 (UTC)
- I've tweaked it. The article still needs a lot of polish: a general copyedit. Also, the notation using over-arrows and bold is nonstandard in this context and should be removed. I'm not sure whether I'll be putting energy into this soon though. — Quondum 22:41, 8 August 2013 (UTC)
- It's better, but it is still a little muddled. It isn't completely clear what the sentence "This operation is known as conjugation by q." refers to, taking the inverse or qpq-1, as q-1 is the logical antecedent to "This". Also if we are now defining conjugation in terms of the inverse, do we need to mention the conjugate at all? Maybe just in a footnote.--agr (talk) 21:20, 8 August 2013 (UTC)
Sloppy or wrong
This sentence in the Visualizing section:
"The vector part of a unit quaternion represents the radius of the 2-sphere corresponding to the axis of rotation, and its magnitude is the cosine of half the angle of rotation."
should either read 'the sine of half the angle', or the word 'magnitude' should be replaced with 'scalar part', no?
I'll change it upon verification, or you go ahead and do it.
173.25.54.191 (talk) 23:52, 5 August 2013 (UTC)
Diagrams for rotations of vectors as double reflections
Would these be useful anywhere?
These were primarily intended for the geometric algebra article, but apparently the quaternionic formalism was used first. C.f. this paper by Eric Chisolm, a great pdf with good explanations, for the rotation/reflection concept see the diagram on page 7.
M∧Ŝc2ħεИτlk 11:30, 20 August 2013 (UTC)
A couple more have been created for the reflection along the vectors, which visually looks a bit messier, but still leads to the same result, and should be included of course for NPOV. M∧Ŝc2ħεИτlk 15:29, 20 August 2013 (UTC)
- Nice diagrams, very clear. As you say, the second is messier, both diagramatically and algebraically. I suppose the second one arose because people are familiar with mirrors in 3d, thinking of relection in terms of planar mirrors, and representing the orientation of a plane by its normal vector. They'd probably work for either article. — Quondum 21:34, 20 August 2013 (UTC)
- Thanks, note they've been modified. M∧Ŝc2ħεИτlk 08:07, 24 August 2013 (UTC)
- The flag helps in visualisation of an operation as a reflection or rotation. It would be sensible to mention the flag's purpose in the text or possibly the caption; I'm not sure which would be better. — Quondum 11:25, 24 August 2013 (UTC)
I'd say the captions. The flag idea is in the diagrams. M∧Ŝc2ħεИτlk 07:36, 25 August 2013 (UTC)
- I've tweaked the captions a bit more. I think it is worth keeping the direct mention of vectors. My wording is perhaps a little verbose, but see what you think of it. — Quondum 12:02, 25 August 2013 (UTC)
- Seems fine, thanks. One quibble might be the letters m and n which are not used in the article, but at least they serve their purpose. M∧Ŝc2ħεИτlk 11:28, 27 August 2013 (UTC)
Problems with "Pairs of unit quaternions as rotations in 4D space" section
The 4D rotation section has a lot of issues that need to be resolved.
- The text mentions a matrix M which is mentioned nowhere else.
- the phrase "that is, that each matrix (and hence both matrices together) represents a rotation" is gibberish. If this is all true, it should just say "the pair of quaternions represents a rotation of R^4"
- "Therefore, there are two commuting subgroups of the set of four dimensional rotations." While I'm sure it's true (you can think of lots of pairs of commuting subgroups of many groups) it doesn't seem to follow from the previous fact, and it doesn't seem to be relevant at all.
- "Since an infinitesimal four-dimensional rotation can be represented by a pair of quaternions, all (non-infinitesimal) four-dimensional rotations can also be represented." This is a little strange, and also seems bad because infinitesimal rotations are not being discussed here. I don't think the author is using this descriptor in the standard sense of Lie algbra. Perhaps the author meant that generators of the rotation group can be represented, hence all representations can be represented.
I will make a few simple changes to address some of these points and then wait for feedback. Also please note there is an earlier section above that asks about the factual correctness of the equations. Rschwieb (talk) 14:21, 4 February 2014 (UTC)
- The first part of the section seems to be correct, but the representation of a quaternion as a matrix is used without definition. I suggest trimming this down to a bare outline of what can be read at Rotations_in_4-dimensional_Euclidean_space#Relation_to_quaternions plus a link to this, where it is given in more detail.
- The second part seems like it is completely incorrect, in that the formula for the rotation matrix and for the quaternions cannot possibly be correct. It is also unreferenced. I suggest deleting this part in its entirety. —Quondum 07:23, 5 February 2014 (UTC)
Derivation (COI Edit Request)
![]() | It is requested that an edit be made to the semi-protected article at D. (edit · history · last · links · protection log)
This template must be followed by a complete and specific description of the request, that is, specify what text should be removed and a verbatim copy of the text that should replace it. "Please change X" is not acceptable and will be rejected; the request must be of the form "please change X to Y".
The edit may be made by any autoconfirmed user. Remember to change the |
Hi everyone. I'm 100% new to Wikipedia. This is my first attempted edit. I just posted a derivation of the quaternionic rotation identity, and it got reverted for COI issues. The version which got reverted can be found here: old-version
The paper which I linked to was indeed my own, and it was hosted on my own external site: derivation
Still, I think the material would benefit the page. There has already been discussion here in the Talk page specifically asking for this derivation: here and also here. On that second link see the line where the user says "Through the derivation of quaternion for rotation (That is, the main point of this article, afterall) need quite some expansion."
I would be happy to repost the paper on a columbia.edu sub-domain which I have control over, if that would give it more credibility. I could also take my name off the paper, if that would fix the COI issue. I would also be happy to include the core of the derivation inline into the article, perhaps below the "Proof" section. The whole of the derivation would be a bit too much too include, but I could maybe trim it down.
Still, it would be easiest for me if someone could just revert the revert. Anybody who can read the mathematics can verify that my derivation is correct. And it's just a paper with my name attached for contact purposes. It's not like I'm shouting out ads for goods or services. — Preceding unsigned comment added by Patrick.rutkowski (talk • contribs) 2015-01-06T02:56:22
- As I wrote in my edit summary it's out of place and COI; inline links should never appear in the body of the article like that and the COI is as it's your own paper; the presumption on any editor that comes to WP and just adds links is they're not interested in improving the encyclopaedia, just in promoting their web site/special cause/new discovery.
- Looking at it more closely again it does not seem a remarkable or interesting result. It's wrong to say it derives the identity without knowing it; it assumes the form of the identity with quaternion unknowns then does some very longwinded calculations to work out the unknowns. A pointless exercise in algebra. There are far better (shorter, clearer and more interesting) geometric derivations using geometric algebra. Not everything needs a derivation but that could perhaps be added. But your derivation or a link to it I don't think helps at all.--JohnBlackburnewordsdeeds 03:14, 6 January 2015 (UTC)
- It doesn't assume the form of the identity. It starts by noting the striking similarities between the terms present in quaternion multiplication and the terms present in the rotation function. It's conceivable that a person could have seen these similarities even if they hadn't known in advance about how unit quaternions do rotations. The processes is a plausible path of first discovery, and it's therefore a "derivation." It's only "long winded" because quaternion multiplication involves so many terms; you might also call general relativity "long winded" in the same sense. I resent that you don't trust my intentions, and I also resent that you just admitted to not having even looked at the material before doing your revert. — Preceding unsigned comment added by Patrick.rutkowski (talk • contribs) 04:26, 6 January 2015 (UTC)
- Though I don't particularly put much stead by the COI as an argument against inclusion, adding a link to an external site is usually to be considered suspect (and summarily removing such is typical). And while the intention is clearly to share what might be an interesting derivation for some rather than to advertise own work, the result must still be encyclopaedic. More than a demonstration of correctness is unneeded in this context; though I have not reviewed the linked paper, and though my reasoning might differ from JohnBlackburne's, my general conclusion about what should be in an *encyclopaedia* page is much the same. That said, a new editor getting the feel of what is considered to be encyclopaedic and who has value to add to WP is most certainly to be encouraged. May I suggest at first working on page wording and contained content than external content while growing familiar with the style and objectives? It is exactly interactions like this from which one learns what works. —Quondum 05:52, 6 January 2015 (UTC)
- I did look at it before my first revert: I will check all links as they may be useful references or external links. I generally only revert without checking for obvious spam such as adding links to multiple articles. It's only after your posting that I tried looking at it more closely. Looking at it again I can see an error. It has "At this point a very small leap of intuition suggests that...", but you can't do that. You can't when you're trying to prove a result effectively intuit the main part of the result. Because yes, you know the result already, so it's in your mind. This makes your derivation even less impressive; all it's really doing is checking the result which is neither interesting or useful.--JohnBlackburnewordsdeeds 19:51, 6 January 2015 (UTC)
- The responding editor is correct; we do not allow external links in the body of an article and this is typically associated with spam and linkbait. On the other items, we would probably want independent secondary sources about the results if they were to be included, such as press articles, review articles in academic journals, etc. rather than getting the information directly from a paper publishing original research. CorporateM (Talk) 19:53, 18 January 2015 (UTC)
- I did look at it before my first revert: I will check all links as they may be useful references or external links. I generally only revert without checking for obvious spam such as adding links to multiple articles. It's only after your posting that I tried looking at it more closely. Looking at it again I can see an error. It has "At this point a very small leap of intuition suggests that...", but you can't do that. You can't when you're trying to prove a result effectively intuit the main part of the result. Because yes, you know the result already, so it's in your mind. This makes your derivation even less impressive; all it's really doing is checking the result which is neither interesting or useful.--JohnBlackburnewordsdeeds 19:51, 6 January 2015 (UTC)
Can someone please give a reference and/or rewrite the section Quaternions_and_spatial_rotation#Quaternion-derived_rotation_matrix to actually give a derivation of the rotation matrices from a quaternion transformation. In other words, the section needs more mathematical elaboration / a concrete proof / a reference that the sandwich product in the quaternion transformation is equal to the end result 3D rotation matrices described in the section:
where and are sin θ and cos θ, respectively; as well as the rotation matrix:
Thank you. WinterSpw (talk) 15:20, 5 July 2016 (UTC)
- I think that the first formula is irrelevant to this article -- it isn't needed to derive the second formula and otherwise belongs to the rotation matrices article. I removed that one. The second one is really a straight forward bracket opening -- I doubt that the article would benefit from showing that. bungalo (talk) 21:13, 30 April 2017 (UTC)
Error in rotation matrix formula ?
The alternate rotation matrix formula seems to be wrong, according to: http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToMatrix/
More specifically, it seems the off-diagonal signs are reversed. — Preceding unsigned comment added by 134.160.96.253 (talk • contribs) 2015-04-16T07:58:42
Hi,
I think the confusion here is the Concept of Right and Left Handiness in the Rotation matricies. The picture of X,Y,Z axis is for a Right Hand Axis set up. But the Rotation matrix is for a left hand axis set up. — Preceding unsigned comment added by 208.68.197.6 (talk) 11:34, 12 April 2016 (UTC)
External links modified
Hello fellow Wikipedians,
I have just modified one external link on Quaternions and spatial rotation. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
- Added archive http://web.archive.org/web/20060403162645/http://www.diku.dk:80/publikationer/tekniske.rapporter/1998/98-5.ps.gz to http://www.diku.dk/publikationer/tekniske.rapporter/1998/98-5.ps.gz
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}
).
This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}}
(last update: 5 June 2024).
- If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
- If you found an error with any archives or the URLs themselves, you can fix them with this tool.
Cheers.—InternetArchiveBot (Report bug) 18:20, 20 July 2016 (UTC)
This part is confusing or possibly wrong
I don't have much expertise in this area, so when I read:
ngle {\displaystyle \alpha =2\cos ^{-1}w=2\sin ^{-1}{\sqrt {x^{2}+y^{2}+z^{2}}}.} \alpha =2\cos ^{-1}w=2\sin ^{-1}{\sqrt {x^{2}+y^{2}+z^{2}}}.
I am confused by this notation. From reading previous text I would think it's:
ngle {\displaystyle \alpha =2\cos ^{-1}w=2\sin ^{-1}{\sqrt {x^{2}+y^{2}+z^{2}}}.} \alpha =2\cos ^{-1}{\sqrt {x^{2}+y^{2}+z^{2}} w=2\sin ^{-1}{\sqrt {x^{2}+y^{2}+z^{2}}}.
because there's a rotation in both angles. Is this right or am I missing something? DazzleNovak (talk) 21:26, 5 November 2016 (UTC)
Derivative of rotated vector with respect to quaternion
Recently, there was a section added with a formula for computing the derivative of a rotated vector with respect to the quaternion by which the vector was rotated ("Differentiation with respect to the rotation quaternion"). I have simulated this formula numerically, and it does not appear to be accurate. I have found an alternate source at the below linked pdf that appears to be correct. See equation 46.
http://web.cs.iastate.edu/~cs577/handouts/quaternion.pdf — Preceding unsigned comment added by 23.119.121.46 (talk) 00:14, 7 January 2017 (UTC)
"May be more efficient"?
What struck me was this part in the first paragraph, third sentence. "Compared to rotation matrices they are more compact, more numerically stable, and may be more efficient." As it is, I think it's just confusing.
If they are more efficient in some specific situations, then it should read "more numerically stable, and more efficient in some specific situations". If it is disputed or unknown whether they are more efficient, it should read "more numerically stable.", plus possibly something about research/disputes regarding their efficiency compared to rotation matrices. If it depends on the platform or programming language, it should read "more numerically stable, and on some platforms/in some programming languages, more efficient".
As the sentence is, it is just jarring and almost anything else would be better in my opinion. 130.232.105.232 (talk) 08:13, 7 February 2018 (UTC)
Recovering the axis-angle representation
From the definition looks like the angle is 2*arccos(q_r). Why it is now a different expression including atan? Is it a different angle now? Is it w no longer cos(w/2)?
- is correct only assuming a unit length quaternion, and has stability issues near . Using the two-argument arg-tangent yields the correct angle for any non-zero quaternion in a numerically stable fashion. bungalo (talk) 17:28, 19 November 2018 (UTC)
Last section on 4D rotations needs rewriting
- The section Pairs of unit quaternions as rotations in 4D space has too many problems and needs to be rewritten from scratch.
- It is never mentioned that the z's have as coordinates the a's, b's, c's, and d's.
- It is never mentioned that the quaternion v has as coordinates w, x, y, and z (z again?).
- The statement
- seems entirely unjustified and incorrect. (I think the author really means that left multiplication commutes with right multiplication (whether by matrices or anything else). It is not true, however, that the two matrices commute.
- It is never mentioned that there are two pairs of z's that result in the identical 4D rotation.
- And it is never mentioned which quaternions zl and zr must be used to achieve a desired rotation in 4-space, or what rotation is achieved using those z's.