3. Given non-negative real numbers $x, y, z$ satisfy $x+y+z=1$, then the range of $(z-x)(z-y)$ is

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
3. $\left[-\frac{1}{8}, 1\right]$.

On one hand
$$
\begin{aligned}
(z-x)(z-y) & =z^{2}-(x+y) z+x y=z^{2}-(1-z) z+x y=2 z^{2}-z+x y \\
& \geqslant 2 z^{2}-z=2\left(z-\frac{1}{4}\right)^{2}-\frac{1}{8} \geqslant-\frac{1}{8}
\end{aligned}
$$

The equality is achieved when $x=0, y=\frac{3}{4}, z=\frac{1}{4}$.
On the other hand
$$
\begin{aligned}
(z-x)(z-y) & =2 z^{2}-z+x y \leqslant 2 z^{2}-z+\left(\frac{x+y}{2}\right)^{2} \\
& =2 z^{2}-z+\left(\frac{1-z}{2}\right)^{2}=\frac{9}{4} z^{2}-\frac{3}{2} z+\frac{1}{4}=\frac{9}{4}\left(z-\frac{1}{3}\right)^{2} \leqslant 1
\end{aligned}
$$

The equality is achieved when $x=0, y=0, z=1$.
In conclusion, the range of $(z-x)(z-y)$ is $\left[-\frac{1}{8}, 1\right]$.