For counterclockwise rotation:
┌ ┐ │ cos (theta) sin (theta) 0 │ [ x' y' 1 ] = [ x y 1 ] * │ -sin (theta) cos (theta) 0 │ │ 0 0 1 │ └ ┘
For clockwise rotation:
┌ ┐ │ cos (theta) -sin (theta) 0 │ [ x' y' 1 ] = [ x y 1 ] * │ sin (theta) cos (theta) 0 │ │ 0 0 1 │ └ ┘