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

Transforming base vectors in Matrix.

  1. Jun 19, 2008 #1
    http://en.wikipedia.org/wiki/Dot_product" [Broken] is a Wikipedia about the Dot-Product, which includes the relevant section on Rotation.

    Given the first example- is it correct where it says "Notice that the rotation matrix R is assembled by using the rotated basis vectors u1, v1, w1 as its rows, and these vectors are unit vectors". My understanding of it would be that the rotated basis vectors are represented as the columns.

    The same applies in the second example- "If a1 is a row vector, rather than a column vector, then R must contain the rotated basis vectors in its columns, and must post-multiply a1". Isn't it that the rotated basis vectors are the rows?

    This seems wrong, can someone confirm this?

    Thanks in advance.
    Last edited by a moderator: May 3, 2017
  2. jcsd
  3. Jun 19, 2008 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I agree with Wikipedia in this case, but note that since a rotation matrix is orthogonal (it's transpose is equal to its inverse), the only thing that would change if you take the components of those vectors to be columns instead of rows, is that the rotation would be in the opposite direction.
  4. Jun 19, 2008 #3


    User Avatar
    Science Advisor

    Notice however, that "swapping" rows and columns changes from a rotation through angle "[itex]\theta[/itex]" to a rotation through angle "[itex]-\theta[/itex]".

    Also be careful about the difference between rotating a vector and rotationg the coordinate system in which the vector is written!
  5. Jun 19, 2008 #4
    what do you mean by coordinate system?
  6. Jun 19, 2008 #5
    Think of a different reference frame ice.
  7. Jun 19, 2008 #6
    what should i think about it? i meant does he mean rotating basis vectors? did he mean rotating the coordinate vector of the actual vector? i'm not being facetious, i'm reviewing linear algebra and testing my mettle.
  8. Jun 19, 2008 #7
    I think the previous posts have pretty well covered the question, but here is an interpretation that has been helpful to me. For simplicity I’ll use a 2D Cartesian coordinate system as an illustration, but the same interpretation applies in 3D with rotations about an axis instead of the origin.
    Vectors i and j are the standard basis vectors of a 2D Cartesian coordinate system. They have the constant values of (1, 0) and (0, 1) . If we place these base vectors in row 1 and row 2 of a matrix, the matrix represents a 2D coordinate system aligned with the coordinate lines of a standard Cartesian coordinate system. Call this coordinate system A (CS A).
    If we have another coordinate system, CS B, which is rotated an angle theta, relative to CS A, (counterclockwise positive), then the rows of its matrix will have the values
    Row1 Cos[theta}, Sin[theta]
    Row2 -Sin[theta],Cos[theta]

    If you plot these four vectors , you have the base vectors of the two coordinate systems, CS B rotated relative to CS A
    I prefer to focus on rows when I can, because when these matrices multiply vectors, the multiplication involves the dot products of the row vectors of the matrix with the column vector being multiplied.

    I an almost positive that some readers will be saying “What’s the problem…they’re just direction cosine matrices?”, but some of us need a little more of a geometric view.
  9. Jun 20, 2008 #8
    Rotating a vector means the frame does not move. Rotating a frame means the vector does not move.
  10. Jun 20, 2008 #9


    User Avatar
    Science Advisor

    Draw a simple xy- coordinate system. Draw a vector going from (0,0) to (1,1). The components of that vector are, of course, <1, 1,>. Now draw a new coordinate system with axes at 45 degrees to the first. That coordinate system is the first rotated by [itex]\pi/4[/itex]. In terms of the x'y' system, the same vector has coordinates [itex](\sqrt{2},0)[/itex]. That is exactly what you would have gotten if, instead of "rotating" the coordinate system by [itex]\pi/4[/itex], you had rotated the vector, in the xy-system, by [itex]-\pi/4[/itex].
  11. Jun 20, 2008 #10


    User Avatar
    Science Advisor
    Homework Helper

    the problem is that the wiki article uses language incorrectly. i.e. you are right that the rotation matrix they describe should have the rotated vectors in the columns.

    but the equation they write is for expressing the given vector in terms of the new basis, hence is accomplished by multiplying by the inverse of the rotation matrix.

    so they are correctly using the inverse i.e. the transpose of the rotation matrix and incorrectly calling it the rotation matrix.

    the point is to always draw the diagram defined by a basis. i.e. given a basis B, the matrix with the basis vectors from B in the columns, defines an isomorphism from k^n coordinate space, to your vector space taking a column of scalars to the vector defined by those scalars in terms of the basis.

    Hence the inverse map, takes a given vector to the coordinates of that vector in the given basis. since in the article they are telling you how to express a given vector in terms of the rotated basis, they need to use the inverse of the rotation matrix, i.e. the inverse of the matrix whose columns are the rotated basis vectors.

    so they did it correctly, but described it incorrectly. (I am teaching this course this summer.)
  12. Jun 20, 2008 #11
    Alias and Alibi Transformations

    I’ve looked at the Wikipedia “rotation’ paragraph and it seems clear that they are using an alias transformation as an example, i.e. “A rotation of the orthonormal basis in terms of which vector a is represented”. They are also correct in saying that the rows of the matrix are the rotated basis vectors expressed terms of B1 (see Wikipedia article).

    So I agree with Fredrik in that there are no errors in the Wikipedia section on rotations.

    One source of confusion could be that these rotation matrices are sometimes presented as alibi transformations.
  13. Jun 20, 2008 #12


    User Avatar
    Science Advisor
    Homework Helper

    you may take my word for it. to paraphrase miles reid, i am a professional mathematician of the highest moral fibre.
    Last edited: Jun 20, 2008
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook