Understanding Rotation Matrices: A Journey of Mistakes and Lessons Learned

In summary, TerryW is working through Meisner Thorne and Wheeler (MTW) and has been temporarily sidetracked by a problem with rotation matrices. After producing the matrices through multiplications, they are trying to understand the results and have noticed discrepancies between their geometric formula and the matrix results. They have also attempted to compare their results using a spreadsheet and a physical model, but are still unsure where they may have gone wrong. They are open to trying different approaches and seeking assistance to move forward.
  • #1
TerryW
Gold Member
191
13
I'm working through Meisner Thorne and Wheeler (MTW), but have been temporarily sidetracked by a problem with rotation matrices.

I've worked through the maths and produced the matrices by multiplying the three individual rotation matrices, (no problem there) but I have been trying to work out what is actually going on. I have ended up with a 3x3 matrix which I believe is giving me the new co-ordinates of the new axes (now X'Y'Z') in terms of the original axes XYZ. after a rotation around a vector nx ny nz. The X component of X' is cos nyt*cos nzt. Well this looks fine because it is the same as you will find in lots of places in Wikipedia. The only problem I have is that I then went on to try to derive the same results using pure geometry I arrived at a different formula, which is not necessarily a problem because it is a different process, a single rotation rather than three separate rotations. But the numerical results should be the same. So I built a spreadsheet to compare my geometric result with the matrix result and I also made a cube and stuck a skewer through it to see what really happens.

I chose the vector (1, 0.6, 0.8) as the axis of rotation.

My geometric formula looks to come up with the correct result, the X' axis (1,0,0) is back to where it started after a rotation of 2π. The corresponding result for the rotation matrix is an X co-ordinate of 0.8413! Moreover, the rotation matrix result produces some negative values for the X co-ordinate, but there is nowhere during its rotation that the original point (1,0,0) ventures into negative territory when I spin my cube around the skewer.

I must be getting something wrong somewhere but I can't see it - can anyone help?
TerryW
 
Mathematics news on Phys.org
  • #2
You will have to be more specific. What exactly did you do when "multiplying the matrices together". Did you do consecutive rotations around the three axes? This is not and should not be equivalent to doing one rotation around an axis such that the rotation components match each individual rotation. This is only true for two dimensional rotations where there is only one axis.
 
  • #3
Thanks for the reply.

I've attached a PDF of the original problem from MTW. It appears to be saying that if you perform three consecutive rotations around the X, Y and Z axis, where the angles of rotation are nxt, nyt and nzt respectively, then this is equivalent to a rotation of nt around the vector defined by nx, ny and nz.

The rotation matrix obtained for (10.29) is the standard matrix you can find on the internet, eg http://inside.mines.edu/fs_home/gmurray/ArbitraryAxisRotation/
where α = nxt, β = nyt and γ = nxt.

My problem is that calculating the X component of the X' axis after a rotation using the rotation matrix is producing strange results. Given that this matrix is used extensively in CGI and we don't see our CGI spaceships behaving oddly when they rotate, I conclude that I must be doing something wrong, but I can't see what it is.RegardsTerryW
 

Attachments

  • MTW Ex 10.17.pdf
    2.2 MB · Views: 414
  • #4
TerryW said:
I've attached a PDF of the original problem from MTW. It appears to be saying that if you perform three consecutive rotations around the X, Y and Z axis, where the angles of rotation are nxt, nyt and nzt respectively, then this is equivalent to a rotation of nt around the vector defined by nx, ny and nz.
No, it is not saying this. Since the generators do not commute, there is a difference between exp(n1t + n2t + n3t) and exp(n1t) exp(n2t) exp(n3t), where ni is the rotation vector component multiplied by the corresponding generator.
 
  • #5
Hi Orodruin,

I've worked my way through 9 chapters of MTW now and the problems they set are, without exception, always based on the material covered previously. I evaluated exp(nxtK1 + nytK2 + nztK3) as exp(nxtK1)*exp(nytK2)*exp(nztK3) as there is nothing anywhere (I think) to indicate that this is not a valid approach. I took comfort in the fact that the three components exp(nxtK1), exp(nytK2) and exp(nztK3) produce the respective matrices for rotations around the x, y and z axes respectively, (I proved this in an earlier exercise), and earlier problems had used the technique of multiplying matrices to get a compound rotation. Additionally, the result proved to be the same as that found in the Glen Murray paper I referenced in my original post. (Though I must admit, exp(nxtK1 + nytK2 + nztK3) could be evaluated as exp(nytK2)*exp(nxtK1)*exp(nztK3) or other variant with different outcomes!)

But I recognise that this isn't taking me forward so I am happy to try a different approach if you can give me some idea of a way to proceed ie what should I be evaluating instead of exp(nytK2)*exp(nxtK1)*exp(nztK3)?Regards
TerryW
 
  • #6
TerryW said:
Though I must admit, exp(nxtK1 + nytK2 + nztK3) could be evaluated as exp(nytK2)*exp(nxtK1)*exp(nztK3) or other variant with different outcomes!

No, there is a strict definition of this exponential in terms of a series expansion. The addition of arguments for multiplied exponentials is only valid for commuting arguments. You may want to look up the Baker-Campbell-Hausdorff formula http://en.m.wikipedia.org/wiki/Baker–Campbell–Hausdorff_formula

However, any rotation matrix can be written as the product of the three exponents, or as the exponent of the sum, they are simply different coordinates on the set of rotations.
 
  • #7
Orodruin said:
No, there is a strict definition of this exponential in terms of a series expansion. The addition of arguments for multiplied exponentials is only valid for commuting arguments. You may want to look up the Baker-Campbell-Hausdorff formula http://en.m.wikipedia.org/wiki/Baker–Campbell–Hausdorff_formula

However, any rotation matrix can be written as the product of the three exponents, or as the exponent of the sum, they are simply different coordinates on the set of rotations.
I'm pretty sure MTW would not be expecting their readers to be familiar with the Baker-Campell-Hausdorff formula!

TerryW
 
  • #8
TerryW said:
I'm pretty sure MTW would not be expecting their readers to be familiar with the Baker-Campell-Hausdorff formula!

TerryW
Nevertheless, the exponent has a well defined meaning, and it simply cannot be interpreted as the product of the individual rotations. This is relatively standard group theory and I would not be surprised if it is expected of readers.
 
  • #9
There is an elementary way of computing this matrix exponent. First of all you should notice that the matrices ##K_j##, ##j=1, 2, 3## are the matrices of cross product with the corresponding coordinate vector ##e_j##, $$K_j x = e_j\times x\qquad \forall x\in \mathbb R^3$$ (I might be wrong with the sign, you should check, but in what follows this does not matter).

Therefore, the matrix ##K=n_x K_1 +n_y K_2 + n_z K_3## is the matrix of the cross product with ##n##, ##K x= n\times x##. Then if you pick an orthonormal basis of positive orientation such that its first vector is ##|n|^{-1}n##, then the matrix of ##K## in this basis is exactly ##|n| K_1##.

And as I understand you can show that the exponent of ##\alpha K_1## is the rotation about ##e_1## by the angle ##\alpha##. So ##\operatorname{exp}(tk)## is the rotation about ##n## by the angle ##t|n|##.
 
  • Like
Likes TerryW
  • #10
Hawkeye18 said:
There is an elementary way of computing this matrix exponent. First of all you should notice that the matrices ##K_j##, ##j=1, 2, 3## are the matrices of cross product with the corresponding coordinate vector ##e_j##, $$K_j x = e_j\times x\qquad \forall x\in \mathbb R^3$$ (I might be wrong with the sign, you should check, but in what follows this does not matter).

Therefore, the matrix ##K=n_x K_1 +n_y K_2 + n_z K_3## is the matrix of the cross product with ##n##, ##K x= n\times x##. Then if you pick an orthonormal basis of positive orientation such that its first vector is ##|n|^{-1}n##, then the matrix of ##K## in this basis is exactly ##|n| K_1##.

And as I understand you can show that the exponent of ##\alpha K_1## is the rotation about ##e_1## by the angle ##\alpha##. So ##\operatorname{exp}(tk)## is the rotation about ##n## by the angle ##t|n|##.
Hi Hawkeye,

Thanks for this! I had started to look at BCH and realized there was no way I was going to get a to solution using that! Earlier today, I had a thought that there might be a way forward by multiplying the Ki matrices but it might have taken a long time to realize what the results of the multiplications could lead to.

Thanks also to Orodruin for pointing out that the exponential expression wasn't as straight forward as I had originally assumed.

Haweye, has however demonstrated a route to the answer which doesn't require any knowledge of BCH, so my faith in MTW remains intact.Regards to you bothTerryW
 
  • #11
TerryW said:
Haweye, has however demonstrated a route to the answer which doesn't require any knowledge of BCH,
Just to be clear, I never intended for you to use the BCH to solve the problem. It is not very useful as you would get a long string of commutators. I only quoted it for showing the idea od non-commutative exponentials.
 
  • #12
Orodruin said:
Just to be clear, I never intended for you to use the BCH to solve the problem. It is not very useful as you would get a long string of commutators. I only quoted it for showing the idea od non-commutative exponentials.

OK - thanksTerryW
 
  • #13
Hi Hawkeye18 and Orodruin,

Oh dear, the problem was amazingly simple to solve if you start off on the correct path. I took the wrong route of turning the exponential of the sum of three terms into three exponentials multiplied together and got into problems because the result, although it represented the effect of three sequential rotations, did not represent a rotation around the vector n. Now if I had set off and summed the three matrices nxK1t, nyK2t and nzK3t to produce a single matrix, the answer would have been sitting there before my eyes!

Still, I learned a lot about rotation matrices.TerryW:smile:
 

What is a rotation matrix?

A rotation matrix is a mathematical tool used to represent a rotation in a three-dimensional space. It is a square matrix with three rows and three columns, and it is used to transform coordinates from one coordinate system to another.

Why do we encounter problems with rotation matrices?

Problems with rotation matrices can occur due to a variety of reasons, such as incorrect implementation, improper use, and mathematical limitations. These problems can result in errors, distortions, or unexpected results in the transformed coordinates.

How can we avoid problems with rotation matrices?

To avoid problems with rotation matrices, it is essential to have a thorough understanding of the mathematical principles behind them and to implement them correctly. Additionally, using alternative methods, such as quaternions, can help reduce potential problems with rotation matrices.

What are some common sources of errors in rotation matrices?

Some common sources of errors in rotation matrices include rounding errors, singularity issues, and non-commutativity. These errors can arise during the calculation of the rotation matrix or when using the matrix to transform coordinates.

How can we troubleshoot problems with rotation matrices?

To troubleshoot problems with rotation matrices, it is helpful to check for errors in the implementation, verify the input and output data, and compare the results with alternative methods. Debugging tools and techniques can also be used to identify and fix errors in rotation matrices.

Similar threads

  • Mechanical Engineering
Replies
3
Views
455
Replies
16
Views
21K
  • General Math
Replies
3
Views
2K
  • Advanced Physics Homework Help
Replies
8
Views
732
Replies
5
Views
2K
Replies
4
Views
1K
Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
7
Views
1K
  • Special and General Relativity
Replies
4
Views
1K
  • Advanced Physics Homework Help
Replies
3
Views
2K
Back
Top