Problem: Let $f_y:\mathbb{R}^n \rightarrow \mathbb{R}$ be defined by $f_y(x) = \vert x - y \vert^2$ for some $y \in \mathbb{R}^n$. Prove that $f_y$ is convex based on the convexity criterion $g(z) \ge g(x) + \nabla g(x) \cdot(z-x)$. Furthermore, show that if $x_0$ minimizes $f_y$ on some closed convex set $E$ ($y \notin E$), then $\nabla f_y(x_0) \cdot(z-x_0) \ge 0, \forall z \in E$.
Attempt: The question seems simple but I am having trouble seeing how to prove the two parts. For the first part, I observe that $\nabla f(x) = 2(x-y)$, so $\nabla f(x) \cdot (z - x) = 2(x - y)\cdot (z - x) = 2[(x - y)\cdot (z - y) - \vert x - y \vert^2 ]$, but this does not yield $\le f_y(z) - f_y(x) = \vert z - y \vert^2 - \vert x - y \vert^2$. So this approach seems wrong, suggestions would be welcomed.
For the second part, I know by Taylor expansion and minimality of $f_y(x_0)$ that $f_y(z) - f_y(x_0) = \nabla f_y(x_0) \cdot (z - x_0) + R(|z - x_0|) \ge 0$, but how could this lead to $\nabla f_y(x_0) \cdot(z-x) \ge 0$? I also cannot see how convexity of $f_y$ plays a role in this. Any help is appreciated!
Help for the first part:
So, note that $f_y(x)$ is just the function $f_0(x)$ translated in some direction, so it suffices to show that $f(x) =|x|^2$ is convex (for simplicity's sake).
Note that $f(z) = |z|^2, f(x) = |x|^2$, and $$\nabla f(x)\cdot (z - x) = 2x\cdot (z - x) = 2x\cdot z - 2|x|^2. $$ Thus, \begin{align*} f(z) - f(x) - \nabla f(x)\cdot (z - x) &= |z|^2 - 2(z \cdot x) + |x|^2 \\ &= \langle z - x, z - x \rangle \\ &= |z - x|^2 \geq 0. \end{align*} This last inequality is since the norm is nonnegative.