Consider the matrix
$$P = \begin{pmatrix} 2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{pmatrix}.$$
Let the transpose of a matrix $X$ be denoted by $X^T$. Then the number of $3 \times 3$ invertible matrices $Q$ with integer entries, such that
$$Q^{-1} = Q^T \quad \text{and} \quad PQ = QP,$$
is
Step-by-Step Solution
Key Concept: Integer orthogonal matrices are signed permutation matrices; commutativity with diagonal matrix restricts to block structure
$Q^{-1} = Q^T$ means $Q$ is an orthogonal matrix with integer entries. Integer orthogonal matrices must have entries in $\{0, \pm 1\}$ with exactly one nonzero entry per row and column — i.e., $Q$ is a signed permutation matrix.
$PQ = QP$ means $Q$ commutes with $P = \text{diag}(2,2,3)$. Since $P$ has eigenvalues $2$ (multiplicity 2) and $3$ (multiplicity 1), commuting with $P$ requires that $Q$ maps the eigenspace of $2$ (spanned by $e_1, e_2$) to itself and fixes the eigenspace of $3$ (spanned by $e_3$).
So $Q$ must map $\{e_1, e_2\}$ to $\{e_1, e_2\}$ and $e_3$ to $\pm e_3$.
For the $\{e_1, e_2\}$ block: signed permutation matrices in $2 \times 2$ are $\begin{pmatrix}\pm1&0\\0&\pm1\end{pmatrix}$ and $\begin{pmatrix}0&\pm1\\\pm1&0\end{pmatrix}$ — that's $4 + 4 = 8$ matrices.
For the $e_3$ component: $Q e_3 = \pm e_3$, giving 2 choices.
Total: $8 \times 2 = 16$.
Correct Answer: C