9. Determine all integers $n > 1$ such that: for all integers $a, b \in \mathbf{Z}$ that are coprime with $n$, $a \equiv b(\bmod n) \Leftrightarrow a b \equiv 1(\bmod n)$
9. Solution: We say that $n$ has property $T$ if for all integers $a, b$ coprime with $n$, $a \equiv b(\bmod n)$ if and only if $a b \equiv 1(\bmod n)$. It is not hard to see that $n$ has property $T$ if and only if for any $a \in \mathbf{Z}$, if $(a, n)=1$, then $a^{2} \equiv 1$ $(\bmod n)$. We will prove: if $n$ has property $T$, then any prime factor of $n$ also has property $T$.

In fact, for any $a \in \mathbf{Z}$, if $(a, p)=1$, then there exists $a^{\prime} \in \mathbf{Z},\left(a, a^{\prime}\right)=1$ and $a \equiv a^{\prime}(\bmod p)$, thus
$a^{2} \equiv\left(a^{\prime}\right)^{2}(\bmod p),\left(a^{\prime}\right)^{2} \equiv 1(\bmod n)$,
so $\left(a^{\prime}\right)^{2} \equiv 1(\bmod p) \Rightarrow a^{2} \equiv 1(\bmod p)$.
By the choice of $a$, we know that $p$ has property $T$.
Next, consider a prime $p$ with property $T$. If $p \geqslant 5$, then $(2, p)=1$, but $2^{2} \neq 1(\bmod p)$, so $p$ does not have property $T$. Therefore, $p$ can only be 2 or 3.

Thus, any positive integer $n$ with property $T$ must be of the form $2^{\alpha} \cdot 3^{\beta}(\alpha, \beta \geqslant 0)$, so we can take $(5, n)=$ 1. Therefore, $n \mid 5^{2}-1=24$.

So the positive integers greater than 1 that have property $T$ can only be: $2,3,4,6,8,12,24$.
Upon verification, these 7 natural numbers indeed have property $T$, and they are the ones we seek.