Motivated by recent work of Dijkgraaf and Vafa, we study anomalies and the
chiral ring structure in a supersymmetric U(N) gauge theory with an adjoint
chiral superfield and an arbitrary superpotential. A certain generalization of
the Konishi anomaly leads to an equation which is identical to the loop
equation of a bosonic matrix model. This allows us to solve for the expectation
values of the chiral operators as functions of a finite number of ``integration
constants.'' From this, we can derive the Dijkgraaf-Vafa relation of the
effective superpotential to a matrix model. Some of our results are applicable
to more general theories. For example, we determine the classical relations and
quantum deformations of the chiral ring of N=1 super Yang-Mills theory with
SU(N) gauge group, showing, as one consequence, that all supersymmetric vacua
of this theory have a nonzero chiral condensate.Comment: 67 pages, minor change