We consider the hermitian random matrix model with external source and general polynomial potential, when the source has two distinct eigenvalues but is otherwise arbitrary. All such models studied so far have a common feature: an associated cubic equation (“spectral curve”), one of whose solutions can be expressed in terms of the Cauchy (a.k.a. Stieltjes) transform of the limiting eigenvalue distribution \(\lambda \). This is our starting point: we show that to any such a spectral curve (not necessarily given by a random matrix ensemble) it corresponds a unique vector-valued measure with three components on the complex plane, characterized as a solution of a variational problem stated in terms of their logarithmic energy. We describe all possible geometries of the supports of these measures: the third component, if non-trivial, lives on a contour on the plane and separates the supports of the other two measures, both on the real line. This general result is applied to the random matrix model with external source, under an additional assumption of uniform boundedness of the zeros of a sequence of average characteristic polynomials, when the size of the matrices goes to infinity (equivalently, uniform boundedness of certain recurrence coefficients). It is shown that any limiting zero distribution for such a sequence can be written in terms of a solution of a spectral curve, and thus admits the variational description obtained in the first part of the paper. As a consequence of our analysis, we obtain that the density of this limiting measure can have only a handful of local behaviors: sine, Airy and their higher order type behavior, Pearcey or yet the fifth power of the cubic (but no higher order cubics can appear). We also compare our findings with the most general results available in the literature, showing that once an additional symmetry is imposed, our vector critical measure contains enough information to recover the solutions to the constrained equilibrium problem that was known to describe the limiting eigenvalue distribution in this symmetric situation.