4. As shown in Figure 1, in the Cartesian coordinate system $x O y$, $A$ and $B$ are two points on the graph of $y=\frac{1}{x}$ in the first quadrant. If $\triangle A O B$ is an equilateral triangle, then its area $S$ is ( ).
(A) $2 \sqrt{3}$
(B) 3
(C) $\sqrt{3}$
(D) $\frac{\sqrt{3}}{2}$
4. C.

Let $A\left(a, \frac{1}{a}\right), B\left(b, \frac{1}{b}\right)(0<a<b)$.
From $O A=O B$, we get
$$
a^{2}+\frac{1}{a^{2}}=b^{2}+\frac{1}{b^{2}} \Rightarrow a b=1 \Rightarrow b=\frac{1}{a} \text {. }
$$

From $A O=A B$, we get
$$
a^{2}+\frac{1}{a^{2}}=2\left(a-\frac{1}{a}\right)^{2} \Rightarrow a^{2}+\frac{1}{a^{2}}=4 \Rightarrow O A^{2}=4 \text {. }
$$

Therefore, $S=\frac{\sqrt{3}}{4} O A^{2}=\frac{\sqrt{3}}{4} \times 4=\sqrt{3}$.