2

My understanding was that if you take a matrix whose columns are a bunch of orthonormal vectors that span the whole space, you get a rotation matrix, where the rotation takes you from current basis to the basis described by those orthonormal vectors. I tried to apply this concept to recreate a 2-d rotation matrix. If I rotate the x and y axes by an angle, $\theta$, what I get is two vectors, $(\cos(\theta), \sin(\theta))$ and $(\sin(\theta), -\cos(\theta))$ (see figure at very bottom). Including them as columns of a matrix yields:

$$ R = \begin{pmatrix} \cos(\theta) & \sin(\theta) \\ \sin(\theta) & -\cos(\theta) \end{pmatrix} $$

But this is different from the rotation matrix we know: $$ R = \begin{pmatrix} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{pmatrix} $$

Where did I go wrong?

enter image description here

user
  • 162,563
Rohit Pandey
  • 7,547
  • 1
    The first one isn't a rotation matrix: its determinant is $-1$. It is a symmetry matrix wrt to the line with equation $y=\tan(\theta/2)x$ – Jean Marie Sep 04 '22 at 21:28
  • Yes, but why did my attempt at constructing one fail? – Rohit Pandey Sep 04 '22 at 21:31
  • 2
    "if you take a matrix whose columns are a bunch of orthonormal vectors that span the whole space", you get an orthogonal matrix ($A^T=A^{-1}$ or equivalently $AA^T=I$)" but not necessarily a rotation matrix – Jean Marie Sep 04 '22 at 21:34

2 Answers2

2

If we rotate the vector $(0,1)$ counterclockwise we obtain $(-\sin(\theta), \cos(\theta))$ which leads to the correct rotation matrix (according to the usual convention for cartesian axes)

$$R_1 = \begin{pmatrix} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{pmatrix}$$

The other rotation matrix, if we consider $y$ axis reversed would be

$$R_2 = \begin{pmatrix} \cos(\theta) & \sin(\theta) \\ -\sin(\theta) & \cos(\theta) \end{pmatrix}$$

enter image description here

user
  • 162,563
  • 1
    I don't agree with the second part of your answer: the "other" rotation matrix... isn't a rotation matrix (as I said above in a comment); it is symmetry matrix which is a very different transformation... Saying that you switch the axes means amounts to change the orientation of the plane... – Jean Marie Sep 04 '22 at 21:52
  • @JeanMarie Isn't it just a modification in the convention? Thanks, I check it. – user Sep 04 '22 at 21:56
  • 1
    @JeanMarie I've added a picture to clarify what I mean. Of course the usual convention is the first one. – user Sep 04 '22 at 21:59
  • IMHO, it is not a matter of convention. A plane with the alternative orientation is a different plane. – Jean Marie Sep 04 '22 at 22:01
  • @JeanMarie I understend your point, let me check again. Thanks – user Sep 04 '22 at 22:06
  • 1
    @JeanMarie Yes I see know what is wrong, I fix that. Thanks – user Sep 04 '22 at 22:10
  • @JeanMarie Now it should be fine! – user Sep 04 '22 at 22:13
  • 1
    I agree with this version... – Jean Marie Sep 04 '22 at 22:27
  • 1
    @JeanMarie Yes now $R^T=R^{-1}$! Thanks again to have pointed out the mistake. – user Sep 04 '22 at 22:39
2

The mistake is that orthonormal bases come in two opposite orientations, called left handed and right handed. Undoubtedly you remember from high school physics that $\vec{u}$, $\vec{v}$ and $\vec{u}\times\vec{v}$ typically form a right handed set (in that order). Thumb, index finger, middle finger and all that. The division exists in all dimensions though we typically first hear about in 3D. In the current context $R$ is a change of bases matrix. The matrix $R$ takes one orthonormal basis to another if and only if $R^{-1}=R^T$, whence $\det R=\pm1$. If $\det R=+1$, then it takes a right-handed orthonormal basis to another right-handed system. But if $\det R=-1$, then the handedness is reversed.


Look at your image. Place the thumb of your right hand along the original $x$-axis, and the index finger along the $y$-axis. Your middle finger will point towards you (from the screen). If you do the same with the other two vectors, you notice that the middle finger will point away. The handedness is reverse, and that shows in the determinant.

Handedness can be fixed by replacing one of the orthonormal vectors $\vec{v}$ with the opposite vector $-\vec{v}$. Or by permuting any two vectors. More generally, odd permutations of basis vectors change the handedness while even permutations keep it.

One more remark. The space itself has no preferred handedness (at least not mathematically, particle physicists may disagree). Therefore it is somewhat incorrect to call a basis right-handed without specifying a reference basis. In 3D, once you have drawn $\vec{i},\vec{j},\vec{k}$, you have given a reference basis, and we can use the determinant, as above, to check whether some other orthonormal basis shares the same orientation or not.

Jyrki Lahtonen
  • 140,891
  • This should be a comment, but it wouldn't fit. The question is an obvious duplicate, hence CW. – Jyrki Lahtonen Sep 05 '22 at 04:50
  • 2
    I know it can be a matter of intepretation and dicussion, but honestly in this case I don't think the OP is a duplicate of the targeted question. Here the asker already has the concept of what a rotation matrix is and he is trying to enforce that asking for a specific mistake. Of course the targeted duplicate is strongly related and link it at this thread is very helpful but I don't agree that it is a duplicate. For the same reasons, also your answer is very helpful and I think it should be posted as a regular answer. – user Sep 05 '22 at 06:37