6. Let $a_{1}, a_{2}, a_{3}, a_{4}$ be any permutation of $1,2,3,4$, and $f$ be a one-to-one mapping from $\{1,2,3,4\}$ to $\{1,2,3,4\}$ such that $f(i) \neq i$. Consider the matrix
$$
A=\left[\begin{array}{cccc}
a_{1} & a_{2} & a_{3} & a_{4} \\
f\left(a_{1}\right) & f\left(a_{2}\right) & f\left(a_{3}\right) & f\left(a_{4}\right)
\end{array}\right] .
$$

If the corresponding positions of two matrices $M$ and $N$ differ in at least one entry, then $M$ and $N$ are considered two different matrices. The number of different matrices that satisfy the conditions is ( ).
(A) 144
(B) 192
(C) 216
(D) 576
6. C.

For a permutation of $a_{1}, a_{2}, a_{3}, a_{4}$, there can be 9 mappings satisfying $f(i) \neq i$. Since $a_{1}, a_{2}, a_{3}, a_{4}$ have a total of $A_{4}^{4}=24$ permutations, therefore, the number of tables satisfying the condition is $24 \times 9=216$.