Let $X$ be a set equipped with the [discrete metric](/page/Discrete%20Metric) $d_X$, so that $d_X(x,x')=0$ if $x=x'$ and $d_X(x,x')=1$ if $x\neq x'$. Let $(Y,d_Y)$ be a [metric space](/page/Metric%20Space), and let $f:X\to Y$ be a map. With the convention $\operatorname{diam}_Y(\varnothing)=0$, the map $f$ is Lipschitz if and only if the image $f(X)$ has finite diameter in $Y$.