I'm taking a course in real analysis. The formal definition of convexity is given as follows:
The subset $A \subset \mathbb R^k$ is convex if for all $x,y \in A$ if the whole line section between $x$ and $y$ also lies in $A$. The formal definition
$$\forall x,y \in A, \lambda \in (0,1) : \lambda x+(1-\lambda)y$$
I have no familiarity with convexity other than see some drawing of the concept in a $\mathbb R^2$ plane. I'm trying to figure out why the formal definition looks like that.
I have no understanding of this...
If $x,y\in\mathbb R^k$, then$$\{\lambda x+(1-\lambda)y\mid\lambda\in[0,1]\}$$is the line segment joining $x$ to $y$. Therefore, that definition simpliy means “if $x,y\in A$, then the line segment joining them is contained in $A$”.