9. (16 points) Find the set
$$
M=\left\{x \in \mathbf{R} \mid \cos 2^{n} x<0(n \in \mathbf{N})\right\} .
$$
(1) First, prove: when $x=2 k \pi \pm \frac{2 \pi}{3}(k \in \mathbf{Z})$, for any $n \in \mathbf{N}$, we have
$$
\cos 2^{n} x=-\frac{1}{2} \text {. }
$$

Notice that, for any $n \in \mathbf{N}$, we have
$$
\cos 2^{n} x=\cos \frac{2^{n+1} \pi}{3} \text {. }
$$

Clearly, $\cos \frac{2 \pi}{3}=-\frac{1}{2}$.
Assume $\cos \frac{2^{k+1} \pi}{3}=-\frac{1}{2}(k \in \mathbf{N})$.
Then $\cos \frac{2^{k+2} \pi}{3}=2 \cos ^{2} \frac{2^{k+1} \pi}{3}-1$
$$
=2\left(-\frac{1}{2}\right)^{2}-1=-\frac{1}{2} \text {. }
$$

Thus, by mathematical induction, we get
$$
\cos \frac{2^{n+1} \pi}{3}=-\frac{1}{2}(n \in \mathbf{N}),
$$

which means $\cos 2^{n} x=-\frac{1}{2}(n \in \mathbf{N})$.
(2) If the infinite sequence $\left\{\cos 2^{n} x(n \in \mathbf{N})\right\}$ consists of negative numbers, then we must have
$$
\left\{\begin{array}{l}
\cos x\cos x>-\frac{\sqrt{2}}{2}\right., \text{ and also }
$$
$$
\begin{array}{l}
-\frac{\sqrt{2-\sqrt{2}}}{2}>\cos 2^{n} x>-\frac{\sqrt{2}}{2}(n \in \mathbf{N}) \\
\Rightarrow-1-\sqrt{2-\sqrt{2}}>2 \cos 2^{n} x-1>-1-\sqrt{2} \\
\Rightarrow 1+\sqrt{2-\sqrt{2}}(1+\sqrt{2-\sqrt{2}})\left|2 \cos 2^{n} x+1\right| .
\end{array}
$$

Then $\sqrt{2}+1>\left|2 \cos 2^{n+1} x+1\right|$
$>(1+\sqrt{2-\sqrt{2}})^{n+1}|2 \cos x+1|$
$\Rightarrow|2 \cos x+1|<\frac{\sqrt{2}+1}{(1+\sqrt{2-\sqrt{2}})^{n+1}}(n \in \mathbf{N})$.
Let $n \rightarrow+\infty$, we get $\cos x=-\frac{1}{2}$, i.e., $x=2 k \pi \pm \frac{2 \pi}{3}(k \in \mathbf{Z})$.
In summary, the required real numbers are $x=2 k \pi \pm \frac{2 \pi}{3}(k \in \mathbf{Z})$.