Given a sequence of integers $\sigma = a_1 a_2 a_3 \ldots a_n$, let's define an inversion of $\sigma$ to be a pair $(a_i,a_j)$ of entries of $\sigma$ such that $a_i < a_k$ and $i > k$. For example, in the sequence $21345$, the pair $(1,2)$ is an inversion, since $1<2$ but $2$ comes before $1$ in the sequence. The inversion set of $\sigma$ is just the set of all inversions of $\sigma$. (This may not be the usual definition of inversion, but I didn't know what else to call it.) Now my question is this:
What are the possible inversion sets of permutations of $123\ldots n$?
Clearly, not all subsets of $\{(a,b) \in \mathbb{Z}^2 \mid 1 \leq a < b \leq n \}$ can occur as inversion sets; for example, if the inversions $(3,4)$ and $(1,3)$ occur, then so too must $(1,4)$. More generally, if $a < b < c$, any inversion set containing $(a,b)$ and $(b,c)$ must contain $(a,c)$. But I'm not sure if this fact alone is enough to characterize all inversion sets. How do I proceed?