2. let $M$ be a finite set of real numbers with the following property: From every three different elements of $M$, two can always be selected whose sum lies in $M$. What is the maximum number of elements $M$ can have?

## Solution
Answer: 7 .

Assume that $M$ contains more than three positive elements and denote the four largest with $a>b>c>d>0$. According to the prerequisite, you can choose two of the three elements $a, b, c$ whose sum lies in $M$. Because of $a+b>a$ and $a+c>a$ and the maximality of $a$, these two sums are not in $M$. Consequently, $b+c must be \in M$ and because $b+c>b$, $a=b+c$. The same argument with the three elements $a, b, d$ shows that $a=b+d$ also applies. However, this implies $c=d$, contradiction. Consequently, $M$ contains at most three positive elements. Similarly, we show that $M$ also only contains at most three negative elements. Therefore, $|M| \leq 7$ applies (the zero can also still be in $M$).

On the other hand, for $a>0$ the following 7-element set has the required property:

$$
M=\{-3 a,-2 a,-a, 0, a, 2 a, 3 a\}
$$

The only sums of two different elements that are not in $M$ are $3 a+a, 3 a+2 a,(-3 a)+(-a)$ and $(-3 a)+(-2 a)$. The only problematic three-element subsets of $M$ are therefore $\{3 a, b,-3 a\}$, where $b= \pm a$ or $\pm 2 a$. In the case
$b>0$, however, $(-3 a)+b \in M$ applies, in case $b<0$ analogously $3 a+b \in M$. This shows everything.