2. Given an integer $n>1$, let $a_{1}, a_{2}, \cdots, a_{n}$ be distinct non-negative real numbers, and define the sets
$$
A=\left\{a_{i}+a_{j} \mid 1 \leqslant i \leqslant j \leqslant n\right\}, B=\left\{a_{i} a_{j} \mid 1 \leqslant i \leqslant j \leqslant n\right\} .
$$

Find the minimum value of $\frac{|A|}{|B|}$. Here $|X|$ denotes the number of elements in the set $X$.
Suppose $a_{1}<a_{2}<\cdots<a_{n}$, then $2 a_{1}<a_{1}+a_{2}<2 a_{2}<a_{2}+a_{3}<2 a_{3}<\cdots<a_{n-1}+$ $a_{n}<2 a_{n}$, which means the set $A$ contains at least $2 a_{1}, 2 a_{2}, \cdots, 2 a_{n}, a_{1}+a_{2}, a_{2}+a_{3}, \cdots, a_{n-1}+a_{n}$, these $2 n-1$ numbers, thus $|A| \geqslant 2 n-1$.

Also, $B=\left\{a_{i}^{2} \mid 1 \leqslant i \leqslant n\right\} \bigcup\left\{a_{i} a_{j} \mid 1 \leqslant i<j \leqslant n\right\}$, the former has $n$ elements, and the latter has at most $C_{n}^{2}$ elements, so $|B| \leqslant n+C_{n}^{2}=n+\frac{n(n-1)}{2}=\frac{n(n+1)}{2}$.
Therefore, $\frac{|A|}{|B|} \geqslant \frac{2 n-1}{\frac{n(n+1)}{2}}=\frac{2(2 n-1)}{n(n+1)}$.
When $\left\{a_{1}, a_{2}, \cdots, a_{n}\right\}=\left\{n^{2}+1, n^{2}+2, \cdots, n^{2}+n\right\}$, the equality holds. In fact, $2 n^{2}+2 \leqslant$ $a_{i}+a_{j} \leqslant 2 n^{2}+2 n(1 \leqslant i \leqslant j \leqslant n)$, and $2 a_{1}, a_{1}+a_{2}, 2 a_{2}, a_{2}+a_{3}, 2 a_{3}, \cdots, a_{n-1}+a_{n}$, $2 a_{n}$ exactly cover the $2 n-1$ numbers from $2 n^{2}+2$ to $2 n^{2}+2 n$, thus $|A|=2 n-1$;
On the other hand, if there is $a_{i} a_{j}=a_{k} a_{l} \Rightarrow\left(n^{2}+i\right)\left(n^{2}+j\right)=\left(n^{2}+k\right)\left(n^{2}+l\right)$
$\Rightarrow n^{2}(i+j)+i j=n^{2}(k+l)+k l \Rightarrow n^{2}(i+j-k-l)=k l-i j$, obviously $|k l-i j|<n^{2}$, thus $\left\{\begin{array}{l}i+j-k-l=0, \\ k l-i j=0\end{array} \Rightarrow\left\{\begin{array}{l}i+j=k+l, \\ i j=k l\end{array} \Rightarrow i, j\right.\right.$ are the two roots of the equation $x^{2}-(k+l) x+k l=0$ $\Rightarrow\{i, j\}=\{k, l\}$, thus $|B|=\frac{n(n+1)}{2}$.
In summary, the minimum value of $\frac{|A|}{|B|}$ is $\frac{2(2 n-1)}{n(n+1)}$.