The definition of a convex set $K$ is that: Whenever $x, y \in K$, the line connecting $x,y$ will also belong to $K$, meaning all the points of the form: $$ ax+(1-a)y,\space\space\space\space\space\space\space 0\le a \le 1 $$
My question is: Why do the points along the line joining $x,y$ have this formula?
(x-y) is a vector pointing from y to x. To find a point on the line interval xy, start from y, and move in a straight line towards x, i.e. along the vector (x-y). If 'a' is the proportion of the distance from y to x that you move, then you are at:
y + a(x - y) = y + ax - ay = ax + (1 - a)y
You can also interpret the equation more directly as the weighted average of x and y (where 'a' is the weight). That all weighted averages of x and y lie on a line between x and y may or may not be self apparent, but either way one will help you remember the other.