  We introduce and study a new model that we call the {\em matching model}.
Items arrive one by one in a buffer and depart from it as soon as possible but
by pairs. The items of a departing pair are said to be {\em matched}. There is
a finite set of classes $\maV$ for the items, and the allowed matchings depend
on the classes, according to a {\em matching graph} on $\maV$. Upon arrival, an
item may find several possible matches in the buffer. This indeterminacy is
resolved by a {\em matching policy}. When the sequence of classes of the
arriving items is i.i.d., the sequence of buffer-contents is a Markov chain,
whose stability is investigated. In particular, we prove that the model may be
stable if and only if the matching graph is non-bipartite.
