Say you want to rotate a point to by an angle of in the anticlockwise direction. Notice that if we switch to polars, we have and . When these are rotated by an angle of , that gives and .
Simplifying these using the identities and we get
So putting this all together with the matrices we find
And so the rotation matrix is .