I'm doing some convex optimisation where I'm minimising sum function $f(x) = \sum g_i(x)$, where the $g$'s are convex (and hence so is $f$) and the sum is finite.
In doing so it turns out that $f$ is a linear function between any two (global) optima. Apparently $f$ being linear here implies that the $g$'s are also linear, why is this so?