[3.6] Let \( S \) be a nonempty convex set in \( R^{n} \), and let \( f: S \rightarrow R \). Show that \( f \) is convex if and only if for any integer \( k \geq 2 \), the following holds true: \( \mathbf{x}_{1}, \ldots, \mathbf{x}_{k} \in S \) implies that \( f\left(\sum_{j=1}^{k} \lambda_{j} \mathbf{x}_{j}\right) \leq \sum_{j=1}^{k} \lambda_{j} f\left(\mathbf{x}_{j}\right) \), where \( \sum_{j=1}^{k} \lambda_{j}=1, \lambda_{j} \geq 0 \) for \( j=1, \ldots \), \( k \)