  We partition in classes the set of matroids of fixed dimension on a fixed
vertex set. In each class we identify two special matroids, respectively with
minimal and maximal h-vector in that class. Such extremal matroids also satisfy
a long-standing conjecture of Stanley. As a byproduct of this theory we
establish Stanley's conjecture in various cases, for example the case of
Cohen-Macaulay type less than or equal to 3.
