What are “clockwise” and “counter-clockwise” in matrix rotation

mathmatrixpcarotation

MOVED: Moving this question to math.stackexchange.com and closing it.


I'm learning about the math invovled in PCA. For my purposes here, I'm just trying to understand a 90° rotation matrix. I get the concept of a rotation matrix, but when I look on wikipedia, the Wolfram Mathworld site, etc. I keep seeing the following defined as a 90° counter-clockwise rotation matrix:

|0 -1|
|1  0|

but when I actually do the math, I seem to get the point(s) rotated clockwise around the origin:

|1 2|     |0 -1|     |2 -1|
|3 4|  x  |1  0|  =  |4 -3|

Graphing the points (1,2) and (3,4), they're both in quadrant 1 (+,+). Graphing the resulting points, (2,-1) and (4,-3), they're both in quadrang 4 (+,-). The rotation works, but it seems clockwise, not counter-clockwise. What am I missing?

Note A friend suggested that it's the coordinate system that's being rotated, but the wolfram site (linked above) seems to explicitly exclude that from being the cause of my misunderstanding (see (1) and (3) on the wolfram site).

Any help greatly appreciated.

Best Answer

x'  =  | 0  -1 | * | x |
y'     | 1   0 |   | y |

So what you want is

x'  =  | 0  -1 | * | 1 |
y'     | 1   0 |   | 2 |  =  (-2, 1)

x'  =  | 0  -1 | * | 3 |
y'     | 1   0 |   | 4 |  =  (-4, 3)

If you plot that on a graph and draw a line between the two original points, and the two new points, and then draw a dotted line from the origin to the first point of each line, and then draw a 90 degree angle marker between the two dotted lines you will see that the 90 degree angle has rotated counter clockwise from the origin.

Related Topic