I want to implement a rotation in 2d: given an angle for x and y rotation how are the corresponding matrices for rotation around the x and y axis computed?
To rotate a point (x, y) by an angle 'θ' in a 2D plane, the transformation matrix is:

'''shell
[cos(θ)  -sin(θ)]
[sin(θ)   cos(θ)]
'''

This rotation matrix represents a counter-clockwise rotation of the point by angle 'θ'.
Provide python code