9. Let the set of positive real numbers $A=\left\{a_{1}, a_{2}, \cdots, a_{100}\right\}$, and the set $S=\{(a, b) \mid a \in A, b \in A, a-b \in A\}$. Then the set $S$ can have at most $\qquad$ elements.
9.4950 .

The number of ordered pairs of real numbers $(a, b)$ formed by the elements of set $A$ is $100^{2}=10000$.
Since $a_{i}-a_{i}=0 \notin A$, we have $\left(a_{i}, a_{i}\right) \notin S(i=1,2, \cdots, 100)$.
When $\left(a_{i}, a_{j}\right) \in S$, then $\left(a_{j}, a_{i}\right) \notin S$.
Therefore, the maximum number of elements in set $S$ is
$$
\frac{1}{2}(10000-100)=4950 \text {. }
$$

When $a_{i}=i(i=1,2, \cdots, 100)$, the number of elements in $S$ is 4950 .