Talk:Rotation matrix/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


rewrite by TomViza[edit]

I just completed a major rewrite, this article is now much more generalised and also more easy to read. I moved some stuff in from Rotation (mathematics) which is very long.

I also added the formula to find the matrix in terms of the Euler angles.

TomViza 16:41, 21 May 2006 (UTC)[reply]


The following is the derivation of the second function in the 3D section. When I moved the equation from Rotation (mathematics), I thought that the derivation was not very encyclopdic, but have kept it here for thouroughness. TomViza 16:41, 21 May 2006 (UTC)[reply]

Derivation. This matrix is derived from the following vector algebraic equation (see dot product, cross product, and matrix multiplication):

which in turn is derived from

Here

which shows that u is resolved (see Gram-Schmidt process) into a parallel and a perpendicular component (to v). The parallel component does not rotate, only the perpendicular component does rotate. This rotation is similar to a two dimensional rotation, except that instead of x and y axes, there are and axes, both of which are perpendicular to v.

Use of homogenous Coords?[edit]

Hello,

This may be confusing for people who have to implement this with translation compounded, as there is no section on homogenous coords, should this be added? 129.78.208.4 02:51, 7 November 2006 (UTC)[reply]

Added generators, reformat[edit]

I have added a description of the generators of the group, and reorganized things so that the roll, pitch, and yaw matrices come first. That way, the other representations are more easily understood as compositions of these basic rotations. I also added expressions for the generators, except the Euler angle matrix, because I don't have an expression for that generator. Nothing has been deleted, but some things have been rephrased. PAR 20:52, 5 January 2007 (UTC)[reply]

How to find the generator A?[edit]

I'm reading the section about the properties of the rotation matrix...if I have M, but I want to find the generator A, what is the best way to do this? --HappyCamper 22:27, 26 April 2007 (UTC)[reply]

Knowledge Gap[edit]

As interesting as Lie algebras, spin groups, quaternions, or the intricacies and many properties of SO(3) group theory are, many editors are forgetting that the article is about Rotation Matrices and not about Algebra, Physics, Peculiar 19th century math, or theoretical mathematics. There clearly is a huge disconnect here between what should be here (and is missing) and that which is optional (which is abundant, even overshadowing).

Glimpsing over the article I'd swear it was about quaternions, until the caption told me it should have been about Rotation Matrices, the simple representation between 2 rotated coordinate systems in an orthonormal basis nowhere to be found, not even the very essential composition of rotation matrices about the three cartesian axes are mentioned!

With all due respect to the various authors, 90% of the material is better off in other articles where it doesn't bumb the signal to noise ratio off the scale. 82.72.87.196 (talk) 17:20, 18 February 2008 (UTC)[reply]

You may not be aware of this, but all Wikipedia content is contributed by unpaid volunteers, and anyone can edit the articles if they think they can improve them. So, be bold. If you add new content, the best is to follow a published accessible treatment from a good textbook, which can be cited as a source. I do not see how the article would be improved by removing more advanced content (which, unlike you, I think is highly relevant and important information).  --Lambiam 09:31, 20 February 2008 (UTC)[reply]

Ambiguities[edit]

It's good that ambiguities are listed, but they seem not to be resolved in article itself. E.g. whether presented matrices multiply rows or columns? Roman Cheplyaka (talk) 11:49, 27 June 2008 (UTC)[reply]

sandwich character[edit]

At the end of section 6.5 "spin group" there is the "sandwich" expression which uses the code ∗ instead of the ordinary asterix (*). The lowast character does not read on my terminal and perhaps on other readers too. Thus I made an edit to better express the sandwich; said edit being un-done. I suggest using to better express the required sandwich map. In the present case q* = q^-1 so there is no difference.Rgdboer (talk) 22:49, 7 July 2008 (UTC)[reply]

Significant change[edit]

I've added the algebraic forms of 2D and 3D matricies. They currently arn't in this article (although they are referenced somewhat obliquely in the examples) and for real-geometries (i.e. R2 and R3) they really should appear because frankly they're more important than a whole screen-ful of examples. MattTait (talk) 00:44, 18 October 2008 (UTC)[reply]


I do not quite see why you would need to add this, since the rotations are already given a little farther below. I fixed them nevertheless, the y matrix was wrong.DaffyDuck1981 (talk) 15:52, 27 October 2008 (UTC)[reply]

Converting Matrix to Quaternion[edit]

Is there a foolproof way to convert any rotation matrix to a quaternion, such that a fool like myself can use it? I was using

w = 0.5*sqrt(1+Qxx+Qyy+Qzz)
x = copysign(0.5*sqrt(1+Qxx-Qyy-Qzz),Qzy-Qyz)
y = copysign(0.5*sqrt(1-Qxx+Qyy-Qzz),Qxz-Qzx)
z = copysign(0.5*sqrt(1-Qxx-Qyy+Qzz),Qyx-Qxy)

from the article. The matrix

gives 0 + (root2, 0 root2), but I think the correct result should be 0 + (root2, 0 -root2)

Does this formula not work for 180 degree rotations, or am I missing something else? —Preceding unsigned comment added by 198.99.123.63 (talk) 19:19, 6 November 2008 (UTC)[reply]


Deficiency in the article?[edit]

It seems to me that there's a major deficiency in this article, which is that it's not made clear what the connection is between a rotation matrix and the geometric operation of rotation -- this connection being that if you premultiply a rotation matrix by a column vector, then the result is another column vector that is just a rotation of the first.

Okay, it is stated eventually, but not until the geometry section, and there only in the abstract language of linear algebra, putting the main point of rotation matrices out of reach of anyone except those who should know it already.

I'm hesitating to jump in and revise it, as I'm kind of new to linear algebra, but will probably go ahead and take a crack at it eventually if no one with more expertise wants to step up.

168.156.89.237 (talk) 23:51, 27 November 2007 (UTC)[reply]

That's true. I already moved the remark "this works for column vectors" from deep inside the dimension 3 section to top of "dimension 2 and 3" section, but it is an important fact that probably applies to the whole article.
Also, rotations work on row vectors too (but then the matrices need be transposed), that would be worth a word too. MathsPoetry (talk) 10:59, 1 June 2009 (UTC)[reply]

X mistake[edit]

In section Euler angles there are two "z" in first equation I think "x" should be instead of the first of them, but I'm not sure, so I didn't change that. Can someone check that?

No, Z-X-Z is a common order for Euler angles. Remind that, unlike linear coordinates, the axes themselves are moved by previous rotations. So it is possible to have twice a rotation around the "same" axis to gain 3 degrees of freedom. Perharps have a look at illustrations on Euler angles or gimbal lock to understand it if I'm not being clear. MathsPoetry (talk) 11:05, 1 June 2009 (UTC)[reply]

-1, -1, -1, -1 example[edit]

Ok, my correction was wrong, but then the comment after the example is ambiguous. It does not reverse the direction of a 3d vector in homogeneous coordinates. Is this an irrelevant point? --sissyneck (talk) 22:12, 28 December 2008 (UTC)[reply]

I thought it was a 4D rotation, rather than a 3D rotation in homogeneous coordinates. — Arthur Rubin (talk) 23:05, 28 December 2008 (UTC)[reply]
I understand it as a 4D rotation that inverses 4D vectors. Why would vectors stop existing after dimension 3 ? MathsPoetry (talk) 11:07, 1 June 2009 (UTC)[reply]

Citations[edit]

Currently the references to citations in the text are in two formats. The first one is with small numbers like ² or ³, the second one is the "academic style" like (Smith, 2009) or (Jones, 1995).

Wouldn't an homogeneous typography be better ? If yes, which one should we choose? It seems to me the ² or ³ style is more common in wikipedia, and it also generates a small arrow like ↑ in the references list that allows to go back to the text. MathsPoetry (talk) 11:14, 1 June 2009 (UTC)[reply]

Transpose as inverse[edit]

Hmm...it doesn't seem as obvious to me that the transpose of a rotation matrix is its inverse as it perhaps was to the writer of this article. Might this section perhaps be altered? I'm not actually certain of the best clear way of showing this - perhaps showing that under the appropriate orthogonal basis, the leading diagonal is 1's except for 2 Cos(theta)s, and everywhere else in 0 except the sin thetas, then simply subbing in -theta for theta? Wrayal 15:17, 13 May 2007 (UTC)[reply]

My way of showing it would be to point out that the length of vectors shouldn't change under rotation, so that

Using this property you can also show why the determinant must be (plus or minus) one:

I think the above section on "Rotation matrix vs orthogonal matrix" explains why it should be +1 but it's a little beyond me. A possible argument could be that the identity matrix is a rotation, and swapping a row = changing the handedness, so that all rotations must have a determinant the same sign as the identity matrix.

To me it'd make much more sense to introduce rotation matrices as transformations that leave vector lengths, angles between vectors and handedness unaffected and show from there why the properties of its transpose and determinant hold.Michael.Clerx (talk) 15:22, 19 July 2009 (UTC)[reply]

Three dimensional rotation matrix[edit]

It is stated in the article (General rotations section) that a three dimensional rotation matrix is the product of the three rotation matrices:

I think the order is opposite: first apply rotation around x, then around y and finally around z. Thus:

In the linked Yaw, pitch and roll article the matrix product is indeed written as the latter. 79.26.188.44 (talk) 14:46, 24 August 2009 (UTC)[reply]

xy-plane[edit]

Does the 2×2 matrix given in the introduction really rotate all vectors in the xy-plane? Does it, for example, have any meaning to a vector with a component also in the z-direction? I didn't think it did, in which case it should really read that the matrix "rotates two-dimensional vectors expressed in cartesian coordinates counterclockwise..." and not "in the xy-plane". Bigbluefish (talk) 21:46, 6 November 2009 (UTC)[reply]

Incorrect determinant?[edit]

One of the examples claims that the determinant of

is -1, so it is not a rotation matrix. The determinant is actually 1, which I believe should make it a rotation matrix.

...Agreed.

12.159.28.3 (talk) 03:49, 20 September 2009 (UTC)[reply]

A bit late to reply but I only just noticed this message: I noticed this and fixed this a couple of weeks ago.--JohnBlackburnewordsdeeds 09:23, 2 February 2010 (UTC)[reply]

Sign error?[edit]

The direction given for the rotation in two dimensions appears backwards to me. CW should be CCW, etc. Try it. Mikiemike (talk) 18:45, 25 July 2009 (UTC) I agree. I checked its validity by trying to rotate (1,1) counterclockwise by 90 degrees, but the result is (1,-1), which is clearly a clockwise rotation. Anon 07:22 2 February 2010 (UTC) —Preceding unsigned comment added by 24.17.41.38 (talk) [reply]

I don't. I get

as expected: a 90° clockwisecounterclockwise rotation. The others all seem OK in two dimensions too--JohnBlackburnewordsdeeds 09:21, 2 February 2010 (UTC)[reply]

That doesn't seem right to me. For a 90° clockwise rotation it should be:

because in the new frame, the y-axis is pointing in the negative direction of the x-axis. So a positive a_x is a negative component of the new y-axis. —Preceding unsigned comment added by 130.221.224.5 (talk) 23:52, 3 February 2010 (UTC)[reply]

Rereading what I wrote I mistated what the result was. The following
Is a counterclockwise rotation. It takes a vector in the upper-right quadrant and rotates it into the upper-left quadrant (x < 0, y > 0). The multiplication is just done as described at Matrix (mathematics)#Matrix multiplication, linear equations and linear transformations. The matrix is the first 90° rotation matrix, R(90°). I've corrected it above as well as hopefully explaining it fully here. All the other matrices can be related to this one.--JohnBlackburnewordsdeeds 00:30, 4 February 2010 (UTC)[reply]

I guess there are two ways to think about it, and the article doesn't really address this. When I think about and use rotation matrices, I do so for the purpose of rotating from one coordinate frame to another. Thinking about it this way, then the sign should be switched on the two "sine" terms in the rotation matrix. However, if the rotation matrix is used to rotate a vector from one direction to a new direction within the same coordinate frame, then the sign of the "sine" terms is correct. So, it is all a matter of reference, whether the rotation matrix is rotating the coordinate frame to a new coordinate frame, or if the rotation matrix is rotating a vector within a fixed coordinate frame, the rotation matrix will be slightly different (opposite signs on the sine terms). —Preceding unsigned comment added by Belegorn (talkcontribs) 18:26, 4 February 2010 (UTC)[reply]

I see what you mean. The article is about the matrix used to represent a rotation, as in a rotation (mathematics) of a object described by vectors. That's the generally accepted usage in mathematics, especially as doing it the other way is trivial mathematically. It does touch on what you're thinking of, under ambiguities, but that sections not at all clear - for a start if it's formulated properly nothing should be ambiguous. I think that could be replaced with a better statement of how rotation matrices work when it's the axes not objects that are rotated - I'm not sure the other 'ambiguities' are at all needed.--JohnBlackburnewordsdeeds 19:16, 4 February 2010 (UTC)[reply]

Major rewrite[edit]

Against my better judgment I have attempted to make this a solid article. Experience strongly suggests that before long an endless stream of editors who barely understand anything about the topic will attempt to "improve" it. I do hope that someone besides me who does understand and who cares will keep an eye out and revert the damage. Lacking the patience to babysit, I leave it to its fate. (But I am open to serious questions on my talk page.)

This, by the way, is a trimmed down version of an earlier draft. I have (modestly?) added a B rating; feel free to adjust up or down. Enjoy. --KSmrqT 08:35, 30 August 2007 (UTC)[reply]

What do you want, a medal? Jeez. —Preceding unsigned comment added by 71.111.251.229 (talk) 17:50, 16 February 2008 (UTC)[reply]


The equations used to express the rotation are for angles opposite in sign to their definition in the descriptions. For example, consider a test vector having coordinates of x=+1, y=0, z=0 in the old, unprimed coordinate system. Rotate this vector positively (counterclockwise) by 90 degrees about the z axis. After the rotation, the z' axis is identical with the previous z axis, the x' axis is where the previous y axis was, and the y' axis is pointed in the direction which was the negative direction along the old x axis. The vector itself, of course, does not move, meaning that its coordinates in the new, prime coordinate system are x'=0, y'=−1, z'=0. But that's not what you get from the equations describing the rotation. Those equations erroneously return x'=0, y'=+1, z'=0, which are the primed coordinates that the test vector would have if you had rotated a right-handed coordinate system negatively (clockwise) by 90 degrees about the z axis. So you've got the rotation equations wrong by the sign of the angle of rotation. That's probably true for all the other rotations as well. Jenab6 (talk) 01:47, 7 May 2010 (UTC)[reply]

"Obviously", the transformation indicated by a rotation of the coordinate system is the inverse (and hence corresponding to a negated angle) indicated by a rotation of the vectors. It appears that you are rotating the coordinate system, while most people rotate the vectors. — Arthur Rubin (talk) 03:47, 7 May 2010 (UTC)[reply]

Please check formula for quaternions[edit]

The formula given in the article is:

t = Qxx+Qyy+Qzz (trace of Q)
r = sqrt(1+t)
w = 0.5*r
x = copysign(0.5*sqrt(1+Qxx-Qyy-Qzz), Qzy-Qyz)
y = copysign(0.5*sqrt(1-Qxx+Qyy-Qzz), Qxz-Qzx)
z = copysign(0.5*sqrt(1-Qxx-Qyy+Qzz), Qyx-Qxy)

Copysign was defined as follows: where copysign(x,y) is y with the sign of x.

The definition of copysign seemed to be wrong (a sign cannot be obtained from a square root, and multiplying by 0.5 would not change the sign). So, I inverted it. But there's the possibility that the definition of copysign was correct, and the formula was wrong. I am not really interested in quaternions. I just know there was something wrong. Please check.

Paolo.dL (talk) 17:58, 6 December 2010 (UTC)[reply]

I would just remove it altogether. It's unclear what the point of it is: it's not a mathematical formula, nor is it in any programming language that I recognise, though I do a lot of mathematical programming. If it's included at all it should be written in plain English with normal mathematical formulae as at Rotation representation (mathematics), though as the content is there, and linked to from here, there seems no point having it here. --JohnBlackburnewordsdeeds 19:31, 6 December 2010 (UTC)[reply]
Yes, it is a programming language for sure. It's not MATLAB, it may be some version of Fortran. I have seen the main article Rotation representation (mathematics), but I am not sure it is a good idea to delete this text, as I found here, in another subsection within the same section, useful information (mainly about numerical "robustness", but also different algorithms to solve numerical problems) that is not given in the main article. More exactly, I found very useful the text and the formulas in the subsection about axis-angle, which clearly was written by the same person who wrote the subsection about quaternions, as all the formulas are expressed in the same language. Actually, I found there something that I believe should be added in the main article about using ATAN2 rather than arccos or arcsin. I know little about quaternions, and I have not read that subsection with attention, so I can't judge it. However, there is a request for merging the whole section into the main article. I agree about merging, but cannot do the job. Paolo.dL (talk) 21:11, 6 December 2010 (UTC)[reply]

Ambiguities[edit]

Some of these ambiguities are not real:

Positive or negative sense
A positive rotation can mean clockwise or the opposite.

Well no, actually. By definition a rotation by a positive angle is a clockwise rotation. Perhaps the ambiguity lies because rotation by a positive angle means rotating the axes anti-clockwise? Either way, it's a duff-argument. This should be absorbed into the alibi/alias problem.

You are an idiot. —Preceding unsigned comment added by 146.169.6.124 (talk) 19:38, 13 December 2010 (UTC)[reply]

Matrices are not left-handed nor right-handed. A rotation matrix does not rotate "counterclockwise" unless you respect the usual conventions for the orientation of the plane or the 3D space. Changing the text accordingly. MathsPoetry (talk) 06:05, 17 May 2009 (UTC)[reply]
Row or column vectors
A square matrix can multiply a column vector or a row vector.

So what? That doesn't change the mathematics of a rotation matrix. A rotation matrix only guarrantees to send v to a rotation of itself about the origin, it says nothing about what it does to .

Row- or column-major storage
Matrix elements may be stored in computer memory in either row-major order or column-major order, depending on the programming language and API.

This is certainly not an ambiguity to do with math. This is an ambiguity perhaps for algorithms and how matricies are stored in computers, but it is nothing to do with the math.

Cartesian or homogeneous representation
Homogeneous coordinates carry an extra dimension compared to Cartesian coordinates to allow more flexibility.

A rotation matrix uses cartesian notation. homgeneus representation is a generalization of rotation matricies that allow affine rotations (a rotation + translation).

MattTait (talk) 02:01, 18 October 2008 (UTC)[reply]

3D Basic rotations[edit]

Just a quick note as to why the matrices in the current version are correct, as there seems to be some confusion based on recent edits. The matrix at the top of the section,

rotates in 2D from the x-to the y-axis, as shown in the diagram and described in detail in the maths below it. This generalises straightforwardly to the following in 3D,

which also rotates the x-axis to the y-axis, as it says in the description, while keeping the z-axis fixed: a rotation about the z axis. Because it's the same rotation in x and y the upper-left 2×2 matrix is the same. The other matrices follow from this by permuting the axes. So the matrices match the descriptions below and match the 2D matrices above, to hopefully make them easier to understand.--JohnBlackburnewordsdeeds 17:11, 19 October 2010 (UTC)[reply]

As a note, I spend some time before I realized that the 3D rotation matrices are multiplied by a column vector AFTER the matrix. The reason I didn't realize is because in the vector library I'm using a vector is a row, as is the case in most software packages I've seen. Multiplying a row vector on the left of the given matrices yields COUNTER-clockwise rotation, contradicting the text. Thus, I suggest for clarity, we mention the multiplication order explicitly. 79.100.93.24 (talk) 18:42, 4 January 2011 (UTC)[reply]

CVonline External links[edit]

================================================================
Hi - we re-added the CVonline entry to the Rotation_Matrix page to trigger a discussion on the topic below. We were not sure otherwise how to get it to your attention. Our apologies.

================================================================
Thanks for your concern about the addition that we made to Wikipedia. I understand what the potential problem is.

Allow me to explain what we are trying to achieve and then perhaps you can advise us on the correct procedure.

Over the past 10+ years we have developed a resource called CVonline

      http://homepages.inf.ed.ac.uk/rbf/CVonline/

which is a sort of encyclopedia of computer vision. The main structure is a hierarchical tree of concepts in computer vision and image analysis, with the root nodes of the tree pointing to 1-10 content URLs that give further information related to the root node concept. These content URLs are hand selected to exemplify the concept, provide examples, show extensions of the basic concept, etc. The content URLs are presented to the user by a trigger to a cgi script (which may look like a search engine, but is in fact simply retrieving a fixed set of entries from a database of URLs encoded by the concept's database key).

In the case of the Wikipedia term Rotation_matrix, there is no content that is not already in Wikipedia. But other entries, eg. the use of Clifford Algebra for computer vision

      http://homepages.inf.ed.ac.uk/cgi/rbf/CVONLINE/entries.pl?TAG106

has some content not already present in Wikipedia:

      http://en.wikipedia.org/wiki/Clifford_algebra

At the moment, CVonline has about 2000 root node concepts (pointing to about 10K URLS) which intersect with about 500-1000 (estimated) Wikipedia entries. CVonline is used heavily by the image analysis community, with on the order of 50-100K front page accesses a year, and many more via search engines.

Now that Wikipedia is starting to have content that overlaps heavily with CVonline, our hope is to somehow help Wikipedia exploit all the content that we already have collected over the past 10 years. It would reduce duplication, and allow CVonline to gracefully fade away, replacing a 1-ish person effort by a community effort.

Eventually, the community sourced content should supplant the CVonline content, but, in the mean time, CVonline has a lot more.

So, what should we do?

1) What would be ideal is to rewrite all the CVonline content into Wikipedia, but we have neither the estimated 100 person-years of resource, nor the copyright permissions to do this with the existing content.

2) Another possibility is to directly copy the URLs from CVonline into the corresponding Wikipedia pages.

3) What we did that triggered your attention was to instead add the cgi script call to the External Link section of a page.

We felt that #3 achieved all that #2 did, except was faster to implement. If you think #3 would not be acceptable even after our explanation, but #2 is acceptable, then we can do this. What do you recommend?

[As a side note, CVonline provides no commercial benefit to myself or anyone else directly. There might be some indirect benefit via a software and book list that is included in CVonline, neither of which are not expected to be moved into Wikipeia.]

There is another point that I'd like your advice on: at the moment, there is a very useful subject hierarchy in CVonline. For example, look at the "Vision Geometry and Mathematics" page at:

http://homepages.inf.ed.ac.uk/rbf/CVonline/geom.htm

While there are some advantages to the flat Wikipedia structure, some summary hierarchies like these pages help people understand related concepts and technical developments.

It would be good if there were a mechanism to include this hierarchical structure page somewhere into Wikipedia. For example:

(1) If it were appropriately retitled, then the page given above could be rewritten into Wikipedia form, where all the current cgi script hot-links are replaced by Wikipedia links (assuming that they exist).

(2) Another possibility would be for the hierarchy page to remain part of CVonline, but the content links replaced by Wikipedia page URLs (especially if we find an acceptable solution to the problem described in the first part of this message). The disadvantage of this solution is that the hierarchy is not extendable and re-organisable by the community.

Again, what do you recommend?

================
Papadim.G (talk) 17:12, 11 May 2011 (UTC)[reply]

The link you just added to this article, [1], links to a page which has no content and only two links, one back to this article and one to the equivalent article at Mathworld. As I noted on your talk page external links to external search sites should not normally be added. In this case a link to Google would be far more useful (it returns those two links and many more) but as a reader can trivially search Google themselves such links aren't provided either. So no, links like that should not be added, and you should not add any more.--JohnBlackburnewordsdeeds 17:28, 11 May 2011 (UTC)[reply]


May I then ask about the possibility of directly copying the URLs from CVonline into the corresponding Wikipedia pages? I have made some example changes to the external links of the following terms:
  Bhattacharyya Distance
  Relaxation labelling
  Hausdorff distance

what do you think? Thanks in advance for your reply. Papadim.G (talk) 10:59, 12 May 2011 (UTC)[reply]

Error in R_y[edit]

I don't know how to modify the graphics, but in section 1.2 on three dimensions, I recommend removal of words like "clockwise" -- such things are ambiguous unless you are very careful about specifying the axis and what direction along that axis you're looking at.

Instead, I recommend a statement like: "For example, in the customary right-hand Cartesian coordinate system when theta = pi/2, the rotation matrix R_x takes the unit vector j into k, R_y takes i into k, and R_z takes i into j."

Note that the given rotation matrix R_y is wrong for the previous sentence to be true -- it should be the transpose of the given matrix.

Someonesdad363616 (talk) 19:44, 14 January 2010 (UTC)[reply]

I hadn't noticed the error before. A potentially correct statement would be, "For example, in the customary right-hand Cartesian coordinate system when theta = pi/2, the rotation matrix R_x takes the unit vector j into k, R_y takes k into i, and R_z takes i into j," although I'm not sure of the overall handedness. At least those are consistent. — Arthur Rubin (talk) 04:59, 7 August 2011 (UTC)[reply]

Basic rotation matrices in 3D - direction of rotation[edit]

Before editing you should fully understand the ALIAS / ALIBI ambiguity. See this section.

The 3D basic matrices shown in the article produce a counterclockwise rotation of the vectors (relative to the Cartesian axes), and a clockwise rotation of the Cartesian axes (relative to the vectors). The sentences you want to introduce to explain the sense of rotation refer to a rotation of a coordinate system axis. Thus, they suggest an ALIAS rotation, which is clockwise, not counterclockwise as stated.

When these basic matrices are described in the article, the ALIAS / ALIBI ambiguity has not been explained yet to the readers. The intro and previous text refer alsways to rotations of vectors (ALIBI). Even the pictures show vector rotations. So, for the sake of consistency and clarity, we must not use the ALIAS "point of view" yet. Also, we need to assume a right-handed coordinate system, and a pre-multiplication by the matrix, as these are the only conventions used and described in the introduction and in the previous sections. And this consistency is higly desirable.

Even the similarity between the 2-D rotation matrix and the Rz matrix is not casual, but a precise choice of the editors, which is possible because we, thorughout the article, consistently interpret and describe these rotations as rotations of VECTORS, produced by PRE-MULTIPLICATION, in a RIGHT-HANDED coordinate system.

Paolo.dL (talk) 13:08, 7 January 2011 (UTC)[reply]

My greatest concern over your edits was that you removed the following "Rx rotates the y-axis towards the z-axis, Ry rotates the z-axis towards the x-axis, and Rz rotates the x-axis towards the y-axis." This is valuable as it relates the 3D matrices to the 2D rotations given immediately above. The way you presented it uses the far more complex observation of the sense of rotation about the axis; complex as it asks the reader to think straight away in 3D and depends on the coordinate system so needs that to be stated.--JohnBlackburnewordsdeeds 13:34, 7 January 2011 (UTC)[reply]
I do understand your concern. Unfortunately, however, these sentences are wrong! Moreover, they refer to an ALIAS convention which cannot be used in this article. Again, Rx, Ry, Rz rotate the coordinate system clockwise, not conterclockwise (i.e., Rz rotates y towards x, not vice versa!). You do not understand how much the ALIAS/ALIBI ambiguity may confuse readers. A proof is that someone wrote, in the section about 2-D rotations, that the counterclockwise rotation is observed with a LEFT-handed frame! So, if you want to keep reverting, keep doing it, but I won't stop counter-reverting until you understand the reason why I cannot accept your sentences. Paolo.dL (talk) 13:44, 7 January 2011 (UTC)[reply]
If you wanted to make your sentences correct, you should write: "Rx would rotate towards the z-axis a vector aligned with the y-axis....". Are you sure that this is clearer than my text? If you want to do it, do not revert. Just add your sentences, as the current edit contains another mistake by the anonymous editor (the axis points toward the observer, not away from the observer), and other parts of my edits are necessary. Paolo.dL (talk) 14:07, 7 January 2011 (UTC)[reply]
I added this sentence as an example: "For instance, Rz would rotate towards the y-axis a vector aligned with the x-axis...." (this rotation is similar to the example given in 2D, see also picture and picture caption). Paolo.dL (talk) 14:37, 7 January 2011 (UTC)[reply]

I agree with Paolo on Alibi vs. Alias, but his most recent change is not consistent with the current rotation matrix. For the given matrix, a vector aligned with the y-axis would rotate toward the x-axis (Alibi convention). Rz has a sin term for the x component of y, which implies that a vector aligned with the y axis will tend to x, and equal x at PI/2.

As for conventions, it's clear everyone thinks in the Alibi convention, which is consistent with other sources on the web (wolfram etc.) Either the rotation matrix should be rewritten using a right handed coordinate system, or the explanation should describe the characteristics of a left handed coordinate system.Melihelibol (talk) 20:37, 7 August 2011 (UTC)[reply]

Rotation tensor[edit]

30 March 2007 - Leonid

Hi everyone!

I just added the bit about the Rotation Tensor representation and Rotation Matrix invariance with respect to change of coordinate frame. I think this invariance note is important in "Rotation Matrix" talks. From the other side, dealing with invariant objects is much more convinient especially if you start doing some advanced stuff like Elasticity Theory and Mechanics of Beams and Shells.

Does rotation tensor thing deserve a page on it's own?

There is some similar bit on "Representation of Rotation" page, but the guy whom wrote that page is cleary in love with quaternions. I am in love with quaternions as well the moment some simulation of rigid body dynamics need to be done, but theory of rotation tensors is very old and deserve it's place (I think). The whole Classical Ellasticity Theory is built on it.

Regards, Dr.Leonid Paramonov PDRA, Imperial College London, UK


17:41, 24 August 2006 - Alanic

I did the changes I talked about and I'm ready to defend them if you don't agree. The big matrices in "three dimensions" section may need an update, too. This was my very first contribution to Wikipedia and I didn't read any help pages, so feel free to cancel my changes if I'm not abiding any rules.

13:25, 22 August 2006 - Alanic

The first equation shows that the matrix rotated the vector clockwise. This conflicts with the definition that rotation matrices rotate vectors counter-clockwise.

According to the right hand rule, the second equation shows that this matrix rotated this vector around the -z axis. This conflicts with the definitions on the page that a rotation matrix is a matrix that when multiplied with a vector it rotates the vector counter clockwise and that this matrix is a rotation around the z axis. I think all matrices in this page need to be transposed.

67.122.123.121 21:19, 21 August 2006 (UTC) - Geoff Dolan[reply]

  • Hopefully not stepping on any feet, but I added a minus sign on the 21 term of the three dimensional rotation matrix. Besides disagreeing with my text (Sidi, Spacecraft Dynamics and Control, 1997), it's easy to program the matrix into matlab and see that it isn't a rotation matrix without the minus sign.

I think the signs for the rotation about the z-axis on the 12 and the 21 entries are wrong. Can someone confirm this?

I haven't looked at the other matrices to see if they're wrong too. Thanks

  • I don't think they're wrong. They look exactly how I've learnt them on the University a few months ago :)

Torzsmokus 20:36, 3 January 2006 (UTC)[reply]

  • It depends on how you define your positive angle. Conventions differ.
  • I've added a yaw-pitch-roll system today and I've adapted the signs to the current status (out of respect to the authors). However I must say, that at my university the yaw-pitch-roll system was defined like this:

, , . For the 2-dimenional matrix I agree that it usually is defined like this: Wedesoft 21 Mar 2006 22:12 BST

  • All given matrices are correct. But it should read "with the equivalent counter-clockwise rotation in \mathbb{R}^2". I'll correct this immediately. (AK, 2006-04-05)
  • I think the roll and pitch angles are defined in a weird way. I think roll is rotation about the Y axis and pitch is rotation about the X axis. (MTL, 2011-08-16) — Preceding unsigned comment added by 204.11.231.206 (talk) 19:09, 16 August 2011 (UTC)[reply]

Rotation matrix vs orthogonal matrix[edit]

Hi, just came across this article and have a a couple of question.

First, it says in the definition part that a rotation matrix is equivalent to an orthogonal matrix. If this is so, why is there a separate article on rotation matrices when there already is one on orthogonal matrices. What additional information is provided here which does not fit in the article on orthogonal matrices.

Second, is the equivalence of rotation and orthogonal matrices established in the literature? Personally, I would suggest that a rotation matrix is a special case of an orthogonal matrix (for the n-dim case) which only has two eigenvalues not equal to one [my correction]. Such a matrix always appears as a generalization of a 2D rotation for the the n-dim case in the sense that it has one well-defined rotation space in which it rotates with one well-defined angle. Also, in the 2D and 3D cases such a matrix is equivalent to an orthogonal matrix, but in 4 and higher dimensions a general orthogonal matrix is the product of two or more such matrices. Don't know if this is an established way of defining rotation matrices. --KYN 18:48, 12 July 2006 (UTC)[reply]

No, a rotation matrix is an orthogonal matrix with the additional restriction that the determinant is +1. Thus
is an orthogonal matrix, but since its determinant is −1 it is not a rotation matrix. The eigenvalues of a rotation matrix are guaranteed to include a single +1 in odd dimensions, but otherwise may have as many repetitions of −1 or complex conjugate pairs with magnitude +1 as the dimension allows. Thus
is a rotation matrix with four eigenvalues, none of which are +1. We can state the definition as
  • An n×n matrix M is a rotation matrix if MTM = I and if det(M) = +1.
Planar rotations are a very special case, and only 3D rotations have a rotation axis.
We can derive the algebraic conditions from the geometric statement that a rotation is a direct isometry leaving one point fixed. Take the fixed point to be the origin so we are working with a Euclidean inner product space.
  • Then isometry means preservation of distances (and by implication, angles), which is equivalent to preservation of the inner product. In vector form the inner product of a vector with itself is vTv. Therefore an isometry satisfies (Mv)T(Mv) = vTv, for all vectors v. Rewrite the left-hand side as vT(MTM)v, and rewrite the right-hand side as vTIv; then to obtain equality for all v we must have MTM = I, as stated.
  • For an isometry to be direct it must not reverse "handedness". The identity transformation is obviously direct, and the identity matrix is a (null) rotation, with determinant +1. Furthermore, in the Lie group of Euclidean isometries there must be a connected path from the identity to any direct isometry. Thus in the orthogonal group of n×n matrices there are two disjoint connected components: the special orthogonal group, which contains the identity and all of whose members have determinant +1; and the remaining component (which is only a coset, not a group), all of whose members have determinant −1.
Apparently the article could use some work. --KSmrqT 13:10, 21 August 2006 (UTC)[reply]
This is all very well, but it does not justify that a direct (or special) orthogonal matrices are called rotation matrices in dimensions greater than 3. The rotation article only talks about dimensions 2 and 3, and says that a rotation is about a point or an axis (which means only two eigenvalues not 1). Also this article talks almost exclusively about dimensions 2,3. I don't think the usage (and meaning) of the term rotation in dimensions 2 and 3 is well established, and in any case it is not sourced here. Also, as per WP:LEAD the lead should summarize the article, so in particular not introduce generality that is not discussed in the article. So I will remove mention of dimension greater than 3 from the lead. Marc van Leeuwen (talk) 06:32, 21 August 2011 (UTC)[reply]

Conversion from and to axis-angle[edit]

2012-08-23
I can't read picture "Rotation decomposition.png".
At the first try, I had seen "u->" being to the right from y axis, but later thought it is behind y.
Is "v->" and "(I-P)(v->)" below the i-j surface, or above, or on it ?
The image is from a single point of view, but should be at least from two IMO.
Alex_I — Preceding unsigned comment added by Cantregistermynick (talkcontribs) 08:23, 23 August 2012 (UTC)[reply]

Total re-write?[edit]

It has been proposed that the Eigenvector slew article should be merged with the "Rotation matrix" article although this is basically a spacecraft article, only secondary a mathematics article. Attached my proposal for a new mathematical "Rotation matrix" article.

This would then be the reference for a very short spacecraft article.

If people also want to keep the old text a solution has to be found

PS:


I would also add some stuff about quaternions as this just is a slight change in format of the "canonical form". And Quaternions are used a lot to specify spacecraft attitude, there should be some suitable stuff for this!

Stamcose (talk) 16:52, 29 July 2008 (UTC)[reply]

Has been implemented[edit]

This new article should better correspond to what the user needs/expects! And it contains the material of Eigenvector slew as a mathematical (linear algebra) article what fits better! I.e. a "merge" has been done!

Stamcose (talk) 11:41, 31 July 2008 (UTC)[reply]

The new draft article proposed[edit]

Let

be an orthogonal positively oriented base vector system in

The linear operator


"Rotation with the angle around the axis defined by "


has the matrix representation

relative this basevector system


This then means that a vector

is rotated to the vector



by the linear operator


The determinant of this matrix is

and the characteristic polynomial is


The matrix is symmetric if and only if , i.e. for and for


The case is the trivial case of an identity operator


For the case the characteristic polynomial is

i.e. the rotation operator has the eigenvalues

The eigenspace corresponding to is all vectors on the rotation axis, i.e. all vectors


The eigenspace corresponding to consists of all vectors orthogonal to the rotation axis, i.e. all vectors

For all other values of the matrix is un-symmetric and as there is only the eigenvalue with the one-dimensional eigenspace of the vectors on the rotation axis:

The "rotation operator" is an orthogonal mapping and its matrix relative any base vector system is therefore an orthogonal matrix with determinant 1. A non trivial fact is the opposite, i.e. that for any orthogonal linear mapping in having determinant = 1 there exist base vectors

such that the matrix takes the "canonical form"

for some value of .


In fact, if a linear operator has the orthogonal matrix

relative some base vector system

and this matrix is symmetric the "Symmetric operator theorem" valid in (any dimension) applies saying

that it has n orthogonal eigenvectors. This means for the 3 dimensional case that there exists a coordinate system

such that the matrix takes the form

As it is an orthogonal matrix these diagonal elements are either 1 or -1. As the determinant is 1 these elements are either all 1 or one of the elements is 1 and the other two are -1. In the first case it is the trivial identity operator corresponding to . In the second case it is a rotation with around the eigenvector having 1 as eigenvalue.


If the matrix is un-symmetric the vector

where

is non-zero. This vector is an eigenvector with eigenvalue

Setting


and selecting any two orthogonal unit vectors in the plane orthogonal to :

such that

form a positively oriented trippel the operator takes the desired form with

Stamcose (talk) 16:52, 29 July 2008 (UTC)[reply]

Error in rotation matrix around Y[edit]

In the text we have the following:

I think this is wrong. I just changed it to this.

Can someone please confirm.

Thank you DaffyDuck1981

Gvozdimirka Rucović (talk) 02:50, 13 October 2008 (UTC)[reply]

Dude, this is now wrong, it was right before! I checked myself and confirmed with other sources. You cost with this mistake Apple millions of dollars, since Llanelly R. O. implemented your matrices in the new iphone software which is causing serious problems. What you wrote is actually a vector rotation matrix. What was written was a coordinate system rotation matrix.

—Preceding unsigned comment added by Gvozdimirka Rucović (talkcontribs) 19:28, 13 July 2010 (UTC)[reply]

Nonsense. If has a in the yz component, then has a in the xz component. — Arthur Rubin (talk) 21:25, 13 July 2010 (UTC)[reply]

DaffyDuck is incorrect. The y rotation matrix that DaffyDuck wrote is one that corresponds to a left handed coordinate system. The set of rotation matrices (for x, y, and z) would be correct if the article said it was for a left handed coordinate system, but it does not. It says it's for a right handed coordinate system. I've double checked this with several sources, including wolfram and other wiki articles that list right handed rotation matrices. I've also come across left handed rotation matrices, and the difference is the y rotation matrix, which points down, not up. I thought I had made a mistake in my own derivation of rotation matrices. The handedness of the matrix made sense only after I derived the rotation matrix for a left handed coordinate system. I lost quite a bit of time due to this mistake. Since this was last addressed a year ago, I will fix this error. Melihelibol (talk) 04:46, 7 August 2011 (UTC)[reply]

I'm not entirely sure whether the representation is left-handed or right-handed, but the present formulation is, at least, consistent. DaffyDuck's proposal is not consistent. — Arthur Rubin (talk) 05:03, 7 August 2011 (UTC)[reply]

The current rotation matrix is left-handed. The version prior to DaffyDuck's correction was neither left handed nor right handed, so a correction was indeed necessary for consistency. Prior to DaffyDuck's correction, the rotation matrix rotated the x and z axes clockwise, while the y axis was rotated counterclockwise. I've made a minor change noting the left handedness of the current rotation matrix. Melihelibol (talk) 19:47, 7 August 2011 (UTC)[reply]

I've reverted my changes due to the ALIAS / ALIBI convention discussion in the rotation in three dimensions section.Melihelibol (talk) 20:15, 7 August 2011 (UTC)[reply]

The original one is correct. Dude is wrong and I have modified it.

I changed the matrices back to DaffyDuck's version as a few students in my robotics class noticed a inconsistency in the Ry rotation direction (opposite to Rx and Rz).

According to Peter Corke's Robotics, Vision and Control text, particularly p27 (chapter covering pose and coordinate frames), I think the Ry matrix should be "the other way around" in terms of the negative sines, meaning that DaffyDuck is correct. The book comes with a MATLAB toolbox (freely available unlike the book unless you have access to SpringerOnline) which also follows this convention and is used by many roboticists for actual rotation calculations in real world systems. I have used this book and toolbox in by postgraduate research as well as a unit I co-taught recently at 3rd year undergraduate level. The different Ry was a common stumbling block for many students but I am fairly sure the convention in the book (DaffyDuck's) is correct for real world use. Here's a screencap of the book:
http://imgur.com/muYMR

Note also that the toolbox has a tranimate(R) function that will show the rotation.

Edit: Wolfram Mathworld has a similar convention: http://mathworld.wolfram.com/RotationMatrix.html

Edit: The matrices in Wolfram Mathworld are correct, try by yourself, and the ones in the article are "wrong". Or maybe if you use some not usual convention please explain it, but this page at the moment for me is wrong. The most common convention used in mathematics are that the rotations are the rotation of a vector in a counter-clockwise angle around the given and fixed axes.

For the expert in robotics: remember that exists two type of rotation the first one is the rotation of a point respect to an axis the second one is the rotation of an axis system respect to a point or an angle, and in robotics the most common operation is the second one, that can be obtained with the inverted matrices (the ones currently in the article).

So please correct this article or at least explain the two type of rotation (or conventions).

Read this: http://www.cprogramming.com/tutorial/3d/rotationMatrices.html

And: http://en.wikipedia.org/wiki/Right-hand_rule


— Preceding unsigned comment added by 2A02:1205:5044:E470:6E62:6DFF:FE47:4FC (talk) 19:33, 5 November 2012 (UTC)[reply]


--WaihoRobot (talk) 10:49, 22 October 2012 (UTC)[reply]

These is quite a mess. The matrix in the following section "General rotations" is not consistent with the previous section either, the result is actually different if you multiply them together (I did it symbolically to make sure). Also, as has been pointed out above the individual (basic) rotations are dubious, but looking around a bit it seems everybody defines them slightly differently (the angles are negated or not, causing/canceling a minus sign in front of the sines). This depends on the direction of rotation and the handednesss of the system, but both Wiki and Wolfram claim to be right-handed and yet have different rotations. I'm not sure if I'm missing something here, but this needs to be clarified and I'm adding a dubious tag to warn other people from relying on this alone. 2001:6B0:17:F028:84A1:5579:BF19:1A8A (talk) 15:49, 8 April 2013 (UTC)[reply]

Guys, this is ridiculous. This fundamental thing has been "controversial" for some time now. The cprogramming page addresses this fairly explicitely, that the difference between them is that one follows the "right handed" rule, and the other follows the left handed rule. It's a matter of perspective, and both types of matrices should be included in the article along with a brief explanation of the right/left handed rules (and a link to their corresponding wiki pages, if they exist). Somebody hop to it! I'd do it myself but I have a test tomorrow to study for (on this material btw), and a bunch of school projects to work on. This is my effort to modify the page so that I can sleep at night. 128.227.227.248 (talk) 23:04, 18 April 2013 (UTC)[reply]

Just tested out rotating a vector using the defined Rx, Ry, and Rz and ended up with an apparently correct LEFT-HANDED answer. However in the following section the multiplied RzRyRx yields the correct RIGHT-HANDED answer. The wolfram page yields the same right-handed answer as the one in this wiki when you multiply its matrices (http://mathworld.wolfram.com/RotationMatrix.html). — Preceding unsigned comment added by 99.62.235.24 (talk) 22:45, 21 April 2013 (UTC)[reply]

Comment on accessibility to linear algebra interpretations[edit]

Consider

>>where [\mathbf u]_{\times} is the cross product matrix of u, ⊗ is the tensor product and I is the Identity matrix.

into

>>where [\mathbf u]_{\times} is the cross product matrix of u, ⊗ is the tensor product, in this case the Kronecker product, and I is the Identity matrix.


I'm a user, Not a mathematician. Wanted rotation in 3D. This page was long, but the part I wanted eventually found in all this esoteric stuff. But the wiki page on tensor product, well, dense. 15 minutes later, I am sort of happy that if this page had said "kronecker product" I would have just programmed my rotation about an arbitrary axis in 3D, normal euclidean space & had it operating by now. — Preceding unsigned comment added by 131.203.13.81 (talk) 22:14, 13 August 2013 (UTC)[reply]

Inconsistency between rotation matrix convention in axis-angle to rotation matrix[edit]

If you use the formula given in Rotation_matrix#Rotation_matrix_from_axis_and_angle for a rotation about the positive z-axis by an angle , then one gets,

This is the inverse of the rotation matrix for the alibi convention, and listed in other areas of the page, e.g. Rotation_matrix#Basic_rotations. The 3D rotation matrix given elsewhere for rotation about the z-axis is the transpose of what it should be. This error can be checked by rotating using the 3D rotation matrix given in the text. Also note the inconsistency between the correct 2D rotation matrix and the incorrect 3D matrix for rotation about the z-axis. — Preceding unsigned comment added by V madhu (talkcontribs) 03:30, 15 October 2013 (UTC)[reply]

The latest edits by an anonymous user (claiming to be Kunal Kathuria) and User:Paolo.dL appear to have fixed these issues. -V madhu (talk) 08:48, 20 October 2013 (UTC).[reply]

Thank you for your warning. ;-) Paolo.dL (talk) 16:49, 20 October 2013 (UTC)[reply]

Error in heading[edit]

The section heading reads "Conversion from and to axis-angle" I presume this should say "Conversion from rotation matrix to axis-angle"Soler97 (talk) 01:37, 19 December 2013 (UTC)[reply]

Exponential Map[edit]

I think this is unclear:

An important practical example is the 3×3 case, where we have seen we can identify every skew-symmetric matrix with a vector ω = θ u, where u = (x,y,z) is a unit magnitude vector. Recall that u is in the null space of the matrix associated with ω; so that, if we use a basis with u as the z axis, the final column and row will be zero. Thus, we know in advance that the exponential matrix must leave u fixed. It is mathematically impossible to supply a straightforward formula for such a basis as a function of u (its existence would violate the hairy ball theorem); but direct exponentiation is possible, and yields

where c = cos θ2, s = sin θ2. We recognize this as our matrix for a rotation around axis u by the angle θ.


In the above formula what is and what is  ? The bottom matrix is

StephenK51 (talk) 19:23, 22 January 2014 (UTC)[reply]