Consider the following convex set:
$$S = \{m \in \mathbb{R}^N : m_i \geq 0 \text{ }\forall i=1, \ldots, N \wedge \sum_{i=1}^Nm_i = 1\}$$
and following function $f : S \rightarrow \mathbb{R}$:
$$f(m) = \sum_{j=1}^M \left(X_j - \sum_{i=1}^NY_{i,j}m_i\right)^2$$
I need to prove that $f(m)$ is convex on the set $S$. Some tips?
If I prove that $f(m)$ is convex and I know that another function $g(m)$ is convex, then can I say that $h(m) = f(m) + g(m)$ is convex too?