  For 3-dimensional field theories with {\cal N}=2 supersymmetry the Euclidean
path integrals on the three-sphere can be calculated using the method of
localization; they reduce to certain matrix integrals that depend on the
R-charges of the matter fields. We solve a number of such large N matrix models
and calculate the free energy F as a function of the trial R-charges consistent
with the marginality of the superpotential. In all our {\cal N}=2
superconformal examples, the local maximization of F yields answers that scale
as N^{3/2} and agree with the dual M-theory backgrounds AdS_4 x Y, where Y are
7-dimensional Sasaki-Einstein spaces. We also find in toric examples that local
F-maximization is equivalent to the minimization of the volume of Y over the
space of Sasakian metrics, a procedure also referred to as Z-minimization.
Moreover, we find that the functions F and Z are related for any trial
R-charges. In the models we study F is positive and decreases along RG flows.
We therefore propose the "F-theorem" that we hope applies to all 3-d field
theories: the finite part of the free energy on the three-sphere decreases
along RG trajectories and is stationary at RG fixed points. We also show that
in an infinite class of Chern-Simons-matter gauge theories where the
Chern-Simons levels do not sum to zero, the free energy grows as N^{5/3} at
large N. This non-trivial scaling matches that of the free energy of the
gravity duals in type IIA string theory with Romans mass.
