Example 8 There are 20 teams participating in the national football championship finals. To ensure that in any group of 3 teams, at least two teams have played against each other, how many matches must be played at minimum?
(1969, All-Soviet Union Mathematical Olympiad)
Analysis: The only possible competition schemes that meet the conditions are:
(1) No grouping, any two teams play a match.
(2) Divide into two groups, Group A and Group B, containing 1 team and 19 teams respectively, any two teams in Group B play a match.
(3) Divide into two groups, containing $k(2 \leqslant k \leqslant 18)$ teams and $20-k$ teams respectively, any two teams in each group play a match.

Obviously, the number of matches in schemes (1) and (2) is more than that in scheme (3), so we only need to consider scheme (3).
Solution: According to scheme (3), the total number of matches is
$$
C_{k}^{2}+C_{20-k}^{2}=(k-10)^{2}+90 \geqslant 90 .
$$

Therefore, at least 90 matches need to be played, and the number of matches is minimized when each group contains 10 teams.