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

Rotation of coordinate system mistake or paradox?

  1. May 18, 2010 #1
    Hello to all,

    I am currently studying computer graphics and I have came up with the following problem. Consider that we have three coordinate systems, lets say CSA1, CSA2 and CSA3 that have the same origin and differ by a rotation. That is to CSA2 connects to CSA1 by R12 and CSA3 to CSA1 by R13. Assume that Ai represents a base for the corresponding coordinate system CSAi. That is Ai comprises from 3 unit orthogonal vectors that are the base of CSAi. Then A2 connects to A1 via:
    A2=R12*A1 (eq. 1)
    and moreover
    A3=R13*A1 (eq. 2)
    eq. 1 becomes A1=inv(R12) * A2 (eq. 3) (inv stands for inverse) and eq. 2 using eq. 3 becomes
    A3=R13*inv(R12)*A2 (eq. 4)

    now we also know from theory that the coordinates (P1, P2, P3) of a point P in the three coordinates systems are connected via:
    P2=inv(R12)*P1 (eq. 5)
    P3=inv(R13)*P1 (eq. 6)
    eq. 5 becomes P1=R12*P2 and substituting it in eq. 6 we have that
    P3=inv(R13)*R12*P2 (eq. 7)

    moreover applying the same rule in eq. 4, we get that the coordinates of P in the second and third coordinate system are connected via:
    P3=inv(R13*inv(R12))*P2 that is
    P3=R12*inv(R13)*P2 (eq. 8)

    equations 7 and 8 gives us that

    which is obviously wrong.

    can anyone help me and show me my mistake?

    Many thx,
  2. jcsd
  3. May 18, 2010 #2

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Your equations (5) to (7) are fine -- so long as you are representing vectors as column vectors. What's happening is that you are mixing up rotation and transformation in equations (1) to (4).

    I tried to write up a more verbose explanation, but it just got too danged long. So, the short answer: With vectors represented as column vectors, rotation matrices chain left to right. That is,

    [tex]R_{2\to 3} = R_{2\to 1}\,R_{1\to 3} = R_{1\to 2}^{\,-1}\,R_{1\to 3}[/tex]

    Transformation matrices chain left to right:

    [tex]T_{2\to 3} = T_{1\to 3}\,T_{2\to 1} = T_{1\to 3}\,T_{1\to 2}^{\,-1}[/tex]

    To understand why, it really helps to understand the difference between vectors and covectors.
  4. May 18, 2010 #3
    I followed your argument up to here:

    Maybe you made a typo, but you stated R12 was the rotation that brought CSA2 to CSA1. But you multiply R12 by A1. It ought to be the reverse:

  5. May 18, 2010 #4

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    No, he did it right, kind of. You, too, are confusing rotation and transformation.
    • Rotation physically rotates some object by some angle. Rotating a vector results in a vector that is physically distinct from the original.
    • Transformation deals with the representation of the same vector in two different coordinate systems. Here the vector itself doesn't change. What does change is how the vector is represented. For example, the position of object B with respect to object A can be represented in a slew of different coordinate systems. All of those representations are representations of the same thing, the vector from A to B.

    Transformation and rotation are related concepts. The rotation matrix that physically rotates the basis vectors from frame 1 to frame 2 is closely allied with the transformation matrix that transforms the representation of a vector in frame 1 to the representation in frame 2. One is the transpose of the other.
  6. May 18, 2010 #5
    first of all, thanks for the reply. I am sure the problem is, like you point out, in the confusion of transformation and rotation but I don't really get what is my mistake in equations 1-4. In my notes it states that if the transformation matrix for two coordinate frames is T then its inverse is the corresponding rotation matrix, which I think is consistent with what I wrote.
    I have read in the past about covariance and contravariance so if you don't have time to explain further could you give me any explanatory links.

    Anyway, i am much obliged
    Last edited: May 18, 2010
  7. May 18, 2010 #6

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    The problem is your equations (1) to (3) -- and your interpretation of them.

    What your equation (1) is really saying is that the basis vectors of frame 2 as represented in frame 1 are given by

    [tex]e^2_1 = R_{1 \to 2} ^1e_1[/tex]

    What your equation (2) is really saying is that the basis vectors of frame 3 as represented in frame 1 are given by

    [tex]e^3_1 = R_{1 \to 3} ^1e_1[/tex]

    Finally, what your equation (3) is really saying is that the basis vectors of frame 1 as represented in frame 2 are given by

    [tex]e^1_2 = R^{\;-1}_{1 \to 2} ^2e_2[/tex]

    You used A1 in lieu of my [itex]e^1_1[/itex] in your equations 1 and 2, and A1 in lieu of my [itex]e^2_1[/itex] in your equation 3. Those are two different vectors, but you treated them as one and the same.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook