Matrix Rotation Rotate a matrix by 90 degrees clockwise or counterclockwise. Description Rotate a matrix by 90 degrees clockwise or counterclockwise.