These examples are carefully chosen to be rotation matrices. Note that if I gave you a random 3-by-3 matrix, it probably wouldn't be a rotation matrix, and isn't guaranteed to have any fixed vectors at all.
12. Rotations
12. Rotations
We'll analyse some examples of 3-by-3 rotation matrices, and then see to figure out the axis and angle of rotation for a general 3-by-3 rotation matrix.
Example 1
Let A=(cosθ-sinθ0sinθcosθ0001) . This is an example of a 3-by-3 rotation matrix. The top-left 2-by-2 block rotates the xy -plane, and the 1 in the bottom-right tells us that the z -axis is fixed. More precisely: (cosθ-sinθ0sinθcosθ0001)(xyz)=(xcosθ-ysinθxsinθ+ycosθz), so the vectors (xy0) in the xy -plane get rotated by the 2-by-2 rotation matrix (cosθ-sinθsinθcosθ) , and the vector (001) which points along the z -axis is fixed.

A key point here is that the axis of rotation is fixed, i.e. any vector u pointing in the z -direction satisfies u=Au .
Example 2
Let B=(001010-100) . This is another example of a 3-by-3 rotation matrix. What is the axis of rotation? We need to find a vector u=(xyz) such that u=Bu . In other words, (xyz)=(001010-100)(xyz)=(zy-x). This is three equations (one for each component): x=z,y=y,-x=z. The equation y=y is trivially satisfied. The other two equations imply x=z=0 . Therefore u=(0y0) , and u must point along the y -axis.
By comparing with Example 1, the angle of rotation can be found by:
-
taking a vector v which lives in the plane orthogonal to the axis,
-
applying B to get Bv ,
-
computing the angle between v and Bv using dot products.
For example, we could take v=(100) (as v⋅u=0 so v is orthogonal to the axis). Then Bv=(00-1) , so v⋅Bv=0 . If θ is the angle between v and Bv then this implies cosθ=0 , so θ=±90 degrees.
In fact, we can understand exactly what this rotation is doing by drawing the images of the basis vectors e1,e2,e3 under B (i.e. the three columns of B ). The vector e2 is fixed, e3 goes to e1 and e1 goes to -e3 , so this rotates by 90 degrees about the y -axis, sending the positive z -axis to the positive x -axis.

Example 3
Take C=(001100010) . This is another 3-by-3 rotation matrix; we'll find the axis and angle of rotation.
To find the axis u=(xyz) , we need to solve u=Cu : (xyz)=(001100010)(xyz)=(zxy). The first two equations imply x=y=z , so the third is redundant, and any vector of the form u=(xxx) is fixed. In other words, the axis points in the (111) -direction.
To find the angle, pick a vector v orthogonal to u . For example, v=(1-10) satisfies u⋅v=0 so is orthogonal to u . We compute v⋅Cv=(1-10)⋅(01-1)=-1. We also know that if θ is the angle between v and Cv then -1=v⋅Cv=|v||Cv|cosθ . Since |v|=|Cv|=√2 , we get cosθ=-1/2. This tells us that θ is 2π/3 (or any of the other values that have cosθ=-1/2 ). Let's draw a picture to convince ourselves it's really 2π/3 (120 degrees).
The axis of rotation points out of the screen:
