I had a line, y=-1/2 x

I wanted to reflect everything onto the line so as you can see by my steps in the picture below(sorry, I dont know the coding) I first rotated the line theta degrees then projected everything to that line and rotated it back.

I think maybe my triangle for the values of theta are incorrect...this is right at the top. The problem also might be the way I am applying these matrices. To do this, I am correct if my first transformation starts on the left, my second would follow on the right and so on.

As you can see my matrix for the FIRST rotation was on the right hand side(This was the counter clockwise rotation, so the rotation matrix stays the same. The only thing that caused a change is my triangle because putting sin(theta) into the matrix would give me a negative sin, and the negatives would cancel out.[ This all refers to my first transformation matrix]

None the less, I cannot understand where I've gone wrong. Could someone help me understand why my martrices differs from the ones right at the bottom.

enter image description here


Your diagram and rightmost matrix indicate that you have measured $\theta$ in the negative direction and are rotating input points by that $\theta$. In other words your right-most matrix rotates the $x$-axis onto your line. What you really want to do is first rotate by $-\theta$ so that points on your line are mapped to the $x$-axis. This will exchange your two rotation matrices, yielding the form you give in your unsourced image.

More on "negative direction": Angles are measured from the positive $x$-axis in the anti-clockwise direction around the origin. This means that an angle starting at measure zero and slowly increasing first passes through the first quadrant, then the second, then the third, then the forth, before returning to the positive $x$-axis. If we measure in the clockwise direction, it is normal to associate those measures with negative angles. An angle of measure $1 \,\text{rad}$ is in the first quadrant and an angle of measure $-1 \,\text{rad}$ is in the fourth quadrant.

You've measured $\theta$ in the fourth quadrant. (One way to see this is that your $\cos \theta > 0$ and your $\sin \theta < 0$, so you have placed $\theta$ in the fourth quadrant.) When you wrote your rotation matrices, the one on the right (the first one an incoming vector (on the right) gets multiplied by) rotates its input by $\theta$ around the origin. That is, it takes everything on the $x$ axis and rotates it onto the line you gave. What you actually want is to rotate everything by a small positive angle ($-\theta$) so that the points on your line would end up on the $x$-axis, then project down, then rotate everything back, by the small negative angle $\theta$. This exchanges your two rotation matrices, giving the product of matrices in the unsourced image you gave.

  • $\begingroup$ Could you please explain what you mean I've measured theta in the negative direction, I think this is where my problem originates. $\endgroup$ Jan 18 '16 at 19:35
  • $\begingroup$ does this make the theta I have a negative value for theta?...which actually makes sense since its below the axis $\endgroup$ Jan 18 '16 at 19:36
  • $\begingroup$ @TeyashArjun : Slightly more explanation added to the answer. $\endgroup$ Jan 18 '16 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.