I may not have understood correctly, but..
Rotating about the X axis:
[1, 0, 0]
[0, cos x, -sin x]
[0, sin x, cos x]
Rotating about the Y axis:
[cos x, 0, sin x]
[0, 1, 0]
[-sin x, 0, cos x]
Rotating about Z:
[cos x, -sin x, 0]
[sin x, cos x, 0]
[0, 0, 1]
Although that may or may not do what you want, I haven't touched that stuff in a while now
EDIT: You know I think this applies to transforming actual objects in a 3D coordinate space... not physically rotating a 3x3 matrix in place like you are describing... never mind all of this.