2. There are 20 teams participating in the national football championship finals. To ensure that in any group of three teams, at least two teams have played against each other, what is the minimum number of matches that need to be played?
2. Suppose after $S$ matches, in any 3 teams, there are 2 teams that have played against each other. Among them, team $A_{1}$ has played the fewest matches, only $k$ matches, against teams $A_{2}, A_{3}, \cdots, A_{k+1}$. The remaining $19-k$ teams are $B_{1}, \cdots, B_{19-k}$. Thus, $A_{1}, A_{2}, \cdots, A_{k+1}$ have all played at least $k$ matches. For any $B_{i}, B_{j} (1 \leqslant i, j \leqslant 19-k)$, in the group $A_{1}, B_{i}, B_{j}$, $A_{1}$ has not played against $B_{i}$ and $B_{j}$, so only $B_{i}$ and $B_{j}$ have played against each other. This means that each of $B_{1}, B_{2}, \cdots, B_{19-k}$ has played one match against the other $18-k$ teams. Therefore, the total number of matches played by all teams is at least $(k+1) k + (19-k)(18-k) = 2(k-90)^{2} + 180$. Since each match is counted twice in the above calculation, $S \geqslant (k-90)^{2} + 90 \geqslant 90$. On the other hand, if 20 teams are evenly divided into two groups, and every 2 teams within the same group play one match against each other, a total of $2 C_{10}^{2} = 90$ matches are played. For any 3 teams, there must be 2 teams in the same group who have played against each other, so the minimum number of matches is 90.