  We consider a supersymmetric U(N) gauge theory with matter fields in the
adjoint, fundamental and anti-fundamental representations. As in the framework
which was put forward by Dijkgraaf and Vafa, this theory can be described by a
matrix model. We analyze this theory along the lines of [F. Cachazo, M.
Douglas, N.S. and E. Witten, ``Chiral Rings and Anomalies in Supersymmetric
Gauge Theory'' hep-th/0211170] and show the equivalence of the gauge theory and
the matrix model. In particular, the anomaly equations in the gauge theory is
identified with the loop equations in the matrix model.
