Let $H$ be a Hilbert space with real inner product $\langle \cdot, \cdot \rangle : H \times H \rightarrow \mathbb{R}$.
Let $T$ be an affine operator.
Show that $T$ is nonexpansive, i.e., $\left\| T(x) - T(y) \right\| \leq \left\| x-y\right\|$ for all $x,y \in H$, if and only if $$ \langle T(x) - T(y), \ x-y\rangle \leq \left\| x-y\right\|^2.$$
Comments.
I started with finite-dimensional $H$: $T(x) = Ax+b$. So $\langle T(x) - T(y), \ x-y\rangle = (x-y)^\top A (x-y) \leq \left\| x-y\right\|^2$ if and only if $A \preccurlyeq I$. Hence $A \preccurlyeq I$ implies $T$ being nonexpansive. I am not sure about the other implication, that is, $T$ nonexpansive implies $A \preccurlyeq I$. Once the finite-dimensional case is proven, perhaps the general case has a similar proof.
In fact if $T$ is non-expansive then the proposed inequality follow from the Cauchy-Schwarz inequality, since with notation of the proposer we have $$ \langle T(x)-T(y),x-y\rangle= \langle A(x-y),x-y\rangle\leq\Vert A(x-y)\Vert\,\vert x-y\Vert\leq\Vert x-y\Vert^2. $$
Now, the converse is not correct in general without supplementary assumptions, for instance, If $T(x)=-2x$ then the proposed inequality becomes trivial: $-3\Vert x-y\Vert^2\leq \Vert x-y\Vert^2$, while clearly $T$ is expansive.
A less trivial example is given on $\Bbb{R}^2$ by the matrix $A=\left[\matrix{0&5\cr-5&0}\right]$.