Vector defined function is convex implies scalar defined function is convex Let $f:\mathbb{R}^n \to \mathbb{R}$ be convex.
Let $g:[0,1]\to \mathbb{R}, g(a)=f(a \cdot x+(1-a) \cdot y)$.
Why does $f$-convex on $\mathbb{R}^n$ imply that $g$-convex on $[0,1]$?
 A: Note that the points $x,y \in \mathbb{R}^n$ are fixed at the beginning of the problem. To really understand what is going on here, you need to recognize that the function $L(a) = a x + (1-a)y$ mapping  $\mathbb{R}$ to  $\mathbb{R}^n$ is a parametrization of the straight line passing through $x$ and $y$. If this isn't clear to you, you might begin by noting that $L(1) = x$ and $L(0) = y$ and $L(1/2) = (x+y)/2$, the halfway point between them. In any case, once you have recognized $L$ for what it is, the claim that $g = f \circ L$ is convex should seem quite reasonable. Imagine some convex function $\mathbb{R}^2 \to \mathbb{R}$ (I picture some vague hill drawn over then plane) and then imagine what happens when you restrict to some line in the plane. That's right, you get a 1D convex function!
Anyway, you don't need any of the above to solve the problem. However, it is a nice thing to notice because the line function $L$ has a nice property. It is affine, which means it preserves affine combinations. Given $a,b,t \in \mathbb{R}$, we call $ta + (1-t)b$ an affine combination of $a$ and $b$. Observe
$$ L(t a + (1-t)b) = \text{ ...some computation... } = t L(a) + (1-t) L(b).$$
With this noted, it is much easier to apply the definition of convexity and show that $g$ is convex. Given $a,b \in \mathbb{R}$ and given $t$ between $0$ and $1$, we have
$$g(ta + (1-t)b) = f(tL(a)  + (1-t)L(b)) \leq t f(L(a)) + (1-t) f(L(b)) = t g(a) + (1-t) g(b).$$
Hope this helps!
