  We discuss the relation between matrix models and the Seiberg--Witten type
(SW) theories, recently proposed by Dijkgraaf and Vafa. In particular, we prove
that the partition function of the Hermitean one-matrix model in the planar
(large $N$) limit coincides with the prepotential of the corresponding SW
theory. This partition function is the logarithm of a Whitham $\tau$-function.
The corresponding Whitham hierarchy is explicitly constructed. The double-point
problem is solved.
