# Closed Convex Set and convex combination with parameter $\frac{1}{2}$

I'm trying to show that given $C$, a closed set:

C is convex $\Leftrightarrow \forall \{x,y\} \subseteq C: \frac{1}{2}x + \frac{1}{2}y \in C$

But i'm stuck at the $\leftarrow$ part. I'm trying to prove by contradiction:

$C$ is closed, $\forall \{x,y\} \subseteq C: \frac{1}{2}x + \frac{1}{2}y \in C$ and $C$ is not convex.

If $C$ is not convex, $\exists \lambda \in [0,1], x,y \in C: \lambda x+(1-\lambda)y \notin C$

But can't see how to proceed. An alternative approach that i thought was saying that if i take the average point between $x$ and $y$, infinitely(since $\forall \{x,y\} \subseteq C: \frac{1}{2}x + \frac{1}{2}y \in C$) then the whole segment between $x$ and $y$ belongs to $C$, hence $C$ is convex. But i'm not sure this is true(i think that maybe there are gaps between $x$ and $y$).

What's the best approach? Thanks in advance.

• Take the alternative approach. By induction, show that $\lambda x + (1-\lambda)y \in C$ for all $\lambda$ of the form $k\cdot 2^{-n},\, 0 \leqslant k \leqslant 2^n$. Use closedness of $C$ to conclude, since the set of all such $\lambda$ is dense in $[0,1]$. Commented Oct 29, 2016 at 20:22

Hint: Let $(x,y) \in C^2$, $\tau \in [0,1]$. We want to show that $x + \tau(y-x) \in C$. Let $\epsilon > 0$. Given that $x + j\cdot 2^{-n}(y-x) \in C$ for all $n$ and $j \in \{0,\dots, 2^n\}$ (why ?), we're hoping to find $j_\epsilon$ and $n_\epsilon$ such that:
Such $j_\epsilon$ and $n_\epsilon$ exist as the bisection method reminds us, therefore given any $\epsilon >0$,$B(x + \tau(y-x), \epsilon) \bigcap C \neq \emptyset$, yielding that $x + \tau(y-x) \in \text{cl}(C) = C$