We show that any total preorder on a set with $\binom{n}{2}$ elements coincides with the order on pairwise distances of some point collection of size $n$ in $\mathbb{R}^{n-1}$. For linear orders, a collection of $n$ points in $\mathbb{R}^{n-2}$ suffices. These bounds turn out to be optimal. We also find an optimal bound in a bipartite version for total preorders and a near-optimal bound for a bipartite version for linear orders. Our arguments include tools from convexity and positive semidefinite quadratic forms.