Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Problem with rotation matrix

  1. May 4, 2015 #1

    TerryW

    User Avatar
    Gold Member

    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
     
  2. jcsd
  3. May 4, 2015 #2

    Orodruin

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
  4. May 5, 2015 #3

    TerryW

    User Avatar
    Gold Member

    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.


    Regards


    TerryW
     

    Attached Files:

  5. May 5, 2015 #4

    Orodruin

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
  6. May 6, 2015 #5

    TerryW

    User Avatar
    Gold Member

    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
     
  7. May 6, 2015 #6

    Orodruin

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
  8. May 6, 2015 #7

    TerryW

    User Avatar
    Gold Member


    I'm pretty sure MTW would not be expecting their readers to be familiar with the Baker-Campell-Hausdorff formula!

    TerryW
     
  9. May 6, 2015 #8

    Orodruin

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
  10. May 7, 2015 #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|##.
     
  11. May 10, 2015 #10

    TerryW

    User Avatar
    Gold Member

    Hi Hawkeye,

    Thanks for this! I had started to look at BCH and realised 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 realise 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 both


    TerryW
     
  12. May 10, 2015 #11

    Orodruin

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
  13. May 11, 2015 #12

    TerryW

    User Avatar
    Gold Member

    OK - thanks


    TerryW
     
  14. May 14, 2015 #13

    TerryW

    User Avatar
    Gold Member

    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:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Problem with rotation matrix
  1. Matrix problem (Replies: 3)

  2. Matrix Problem (Replies: 4)

  3. Matrix rotations (Replies: 1)

  4. Matrix problem (Replies: 4)

Loading...