  We show how to represent a class of expressions involving discrete sums over
partitions as matrix models. We apply this technique to the partition functions
of 2* theories, i.e. Seiberg-Witten theories with the massive hypermultiplet in
the adjoint representation. We consider theories in four, five and six
dimensions, and obtain new matrix models respectively of rational,
trigonometric and elliptic type. The matrix models for five- and
six-dimensional U(1) theories are derived from the topological vertex
construction related to curves of genus one and two.
