Let $C$ be a non-empty, convex and closed subset of $\mathbb{R}^d$ and $x \in \mathbb{R}^d$. Let $y \in \mathbb{R}^d$, show that
$$y = \operatorname{proj}_C(x) \Longleftrightarrow y \in C \text{ and } (x - y) \cdot (z - y) \leqslant 0, \forall z \in C.$$