### Instruction: The vector $\begin{pmatrix} 1 \\ 2 \\ 2 \end{pmatrix}$ is rotated $90^\circ$ about the origin.  During the rotation, it passes through the $x$-axis.  Find the resulting vector.### Response: I need to find the vector that results from rotating $\begin{pmatrix} 1 \\ 2 \\ 2 \end{pmatrix}$ by $90^\circ$ about the origin.
One way to approach this problem is to use a rotation matrix.
A rotation matrix is a matrix that, when multiplied by a vector, rotates the vector by a certain angle about a certain axis.
Since the vector passes through the $x$-axis during the rotation, the axis of rotation must be parallel to the $x$-axis.
That means I need a rotation matrix that rotates vectors about the $x$-axis.
I recall that the rotation matrix for rotating vectors about the $x$-axis by an angle $\theta$ is given by:

$$R_x(\theta) = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta \\ 0 & \sin\theta & \cos\theta \end{pmatrix}$$
In this case, the angle of rotation is $90^\circ$ or $\frac{\pi}{2}$ radians.
So I plug that into the rotation matrix and simplify:

$$R_x(\frac{\pi}{2}) = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos\frac{\pi}{2} & -\sin\frac{\pi}{2} \\ 0 & \sin\frac{\pi}{2} & \cos\frac{\pi}{2} \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{pmatrix}$$