Given convex set $C$ and function $f \colon C \to \mathbb R$, I am told that $f$ is convex if and only if
$$\phi(\lambda) = f(\lambda c + (1-\lambda) c') : [0,1] \to \mathbb R$$
for $c, c' \in C$ is convex on $[0,1]$. I am done with the $\Rightarrow$ implication, but I am struggling with the $\Leftarrow$ one. Any hint would be helpful. Thanks!