This question is a continuation from the question: Show there exists a global minimum
In the accepted answer, the solution continued to:
$g(y):=\frac{1}{2}\sum_{i=1}^n\left(\left(\sqrt{\lambda_i}y_i -c_i\right)^2-c_i^2\right) $
I understand how to go from $g(y)$ convex $\implies g(y) $ has exactly one global minimum.
But how can I show that this function is convex? Do I apply the definition of convexity or should I take the second derivative of this function?