9 (16 points) Let the sequence $\left\{a_{n}\right\}$ have the sum of the first $n$ terms as $S_{n}$. If $a_{1}=\frac{1}{2}, a_{n}$ $-5 S_{n} S_{n-1}(n \geqslant 2)$, find the general term formula $a_{n}$ of the sequence $\left\{a_{n}\right\}$.
(9) Let $n \geqslant 2$. Since $a_{n}=S_{n}-S_{n-1}$, we have
$$
S_{n}-S_{n-1}=-5 S_{n} S_{n-1} .
$$

First, we prove that $S_{n} \neq 0$ for $n \geqslant 1$.
(1) $S_{1}=a_{1}=\frac{1}{2} \neq 0$.
(2) Assume $S_{n-1} \neq 0$.

If $S_{n}=0$, then from $S_{n}-S_{n-1}=-5 S_{n} S_{n-1}$ we get $S_{n-1}=0$, which is a contradiction.
By the principle of mathematical induction, we know that for all $n \geqslant 1$, $S_{n} \neq 0$.
Dividing both sides of the equation $S_{n}-S_{n-1}=-5 S_{n} S_{n-1}$ by $S_{n} S_{n-1}$, we get $\frac{1}{S_{n}}-\frac{1}{S_{n-1}}=5$, so $\left\{\frac{1}{S_{n}}\right\}$ is an arithmetic sequence with the first term 2 and common difference 5.
Therefore,
$$
\frac{1}{S_{n}}=2+5(n-1)=5 n-3,
$$

Thus, $S_{n}=\frac{1}{5 n-3}, n \geqslant 1$. Hence,
$$
\begin{aligned}
a_{n} & =S_{n}-S_{n-1}=\frac{1}{5 n-3}-\frac{1}{5 n-8} \\
& =-\frac{5}{(5 n-3)(5 n-8)}, n \geqslant 2,
\end{aligned}
$$

That is,
$$
a_{n}=\left\{\begin{array}{ll}
\frac{1}{2}, & n=1, \\
-\frac{5}{(5 n-3)(5 n-8)}, & n \geqslant 2 .
\end{array}\right.
$$