We present the baryon fractions of 2MASS groups and clusters as a function of
cluster richness using total and gas masses measured from stacked ROSAT X-ray
data and stellar masses estimated from the infrared galaxy catalogs. We detect
X-ray emission even in the outskirts of clusters, beyond r_200 for richness
classes with X-ray temperatures above 1 keV. This enables us to more accurately
determine the total gas mass in these groups and clusters. We find that the
optically selected groups and clusters have flatter temperature profiles and
higher stellar-to-gas mass ratios than the individually studied, X-ray bright
clusters. We also find that the stellar mass in poor groups with temperatures
below 1 keV is comparable to the gas mass in these systems. Combining these
results with individual measurements for clusters, groups, and galaxies from
the literature, we find a break in the baryon fraction at ~1 keV. Above this
temperature, the baryon fraction scales with temperature as f_b \propto
T^0.20\pm0.03. We see significantly smaller baryon fractions below this
temperature, and the baryon fraction of poor groups joins smoothly onto that of
systems with still shallower potential wells such as normal and dwarf galaxies
where the baryon fraction scales with the inferred velocity dispersion as f_b
\propto \sigma^1.6. The small scatter in the baryon fraction at any given
potential well depth favors a universal baryon loss mechanism and a preheating
model for the baryon loss. The scatter is, however, larger for less massive
systems. Finally, we note that although the broken power-law relation can be
inferred from data points in the literature alone, the consistency between the
baryon fractions for poor groups and massive galaxies inspires us to fit the
two categories of objects (galaxies and clusters) with one relation.Comment: 21 pages, 5 figures, ApJ in pres