2. Given the set $A=\{x \mid(a x-1)(a-x)>0\}$, and $2 \in A, 3 \notin A$, then the range of the real number $a$ is $\qquad$
For $a>1$, $A=\left(\frac{1}{a}, a\right) \Rightarrow a \in(2,3] ; 0<a<1$ 时, $A=\left(a, \frac{1}{a}\right) \Rightarrow a \in\left[\frac{1}{3}, \frac{1}{2}\right)$. Therefore, the range of real number $a$ is $(2,3] \cup\left[\frac{1}{3}, \frac{1}{2}\right)$.