# Transforming base vectors in Matrix.

1. Jun 19, 2008

### Metro_Mystery

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?

Last edited by a moderator: May 3, 2017
2. Jun 19, 2008

### Fredrik

Staff Emeritus
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.

3. Jun 19, 2008

### HallsofIvy

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

Also be careful about the difference between rotating a vector and rotationg the coordinate system in which the vector is written!

4. Jun 19, 2008

### ice109

what do you mean by coordinate system?

5. Jun 19, 2008

### Cyrus

Think of a different reference frame ice.

6. Jun 19, 2008

### ice109

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.

7. Jun 19, 2008

### jimvoit

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.

8. Jun 20, 2008

### Cyrus

Rotating a vector means the frame does not move. Rotating a frame means the vector does not move.

9. Jun 20, 2008

### HallsofIvy

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 $\pi/4$. In terms of the x'y' system, the same vector has coordinates $(\sqrt{2},0)$. That is exactly what you would have gotten if, instead of "rotating" the coordinate system by $\pi/4$, you had rotated the vector, in the xy-system, by $-\pi/4$.

10. Jun 20, 2008

### mathwonk

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.)

11. Jun 20, 2008

### jimvoit

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.

12. Jun 20, 2008

### mathwonk

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