9. Let $x, y$ be real numbers. Then the minimum value of $(x y-1)^{2}+(x+y)^{2}$ is ( ).
(A) 0
(B) $\frac{1}{4}$
(C) $\frac{1}{2}$
(D) 1
(E) 2
9. D.
$$
\begin{array}{l}
(x y-1)^{2}+(x+y)^{2} \\
=x^{2} y^{2}-2 x y+1+x^{2}+2 x y+y^{2} \\
=x^{2} y^{2}+x^{2}+y^{2}+1 \\
\geqslant 1,
\end{array}
$$

The equality holds if and only if $x=y=0$.