2. For $Z$ being a complex number, $M=\left\{Z\left|(Z-1)^{2}=\right| Z-\left.1\right|^{2}\right\}$, then
(A) $M=\{$ pure imaginary numbers $\}$
(B) $M=\{$ real numbers $\}$
(C) $\{$ real numbers $\} \subset M \subset\{$ complex numbers $\}$
(D) $M=\{$ complex numbers $\}$
(B)
2.【Analysis and Solution】 $\because(Z-1)^{2}=|Z-1|^{2}$, i.e., $(Z-1)^{2}=(Z-1)(\bar{Z}-1)$, $\because(Z-1)(Z-\bar{Z})=0$, therefore $Z=1$ or $Z=\bar{Z}$. That is, $Z$ is a real number, the answer is (B).