I have a collection of $ N$ ordered pairs,
$ $ \{\{x_{1},y_{1}\},\cdots,\{x_{N},y_{N}\}\}$ $
These ordered pairs can have at most one entry in common, i.e., if $ x_{i}=x_{j} \left(y_{i}=y_{j}\right)$ for some $ i$ and $ j$ , then $ y_{i}\neq y_{j} \left(x_{i}\neq x_{j}\right)$ . I want to sort this list of ordered pairs from smallest $ x$ value to largest, and in the case where several $ x$ values are equal, I want to arrange that portion of the list from smallest $ y$ value to largest. I can accomplish the first step by writing
Sort[,#1[[1]]<#2[[1]] &]
But as far as I can tell this doesn’t guarantee that the list will be sorted by $ y$ -value when the $ x$ values agree. What can I do to make it so?