We have combined ROSAT PSPC and optical observations of a sample of groups and clusters of galaxies to determine the fundamental parameters of these systems (e.g., the dark matter distribution, gas mass fraction, baryon mass fraction, mass-to-light ratio, and the ratio of total-to-luminous mass). Imaging X-ray spectroscopy of groups and clusters show that the gas is essentially isothermal beyond the central region, indicating that the total mass density (mostly dark matter) scales as rho(dark) proportional to r(-2). The density profile of the hot X-ray-emitting gas is fairly flat in groups with rho(gas) proportional to r(-1.0) and becomes progressively steeper in hotter richer systems, with rho(gas) proportional to r(-2.0) in the richest clusters. These results show, that in general, the hot X-ray-emitting gas is the most extended mass component in groups and clusters, the galaxies are the most centrally concentrated component, and the dark matter is intermediate between the two. The flatter density profile of the hot gas compared to the dark matter produces a gas mass fraction that increases with radius within each object. There is also a clear trend of increasing gas mass fraction (from 2% to 30%) between elliptical galaxies and rich clusters due to the greater detectable extent of the X-ray emission in richer systems. For the few systems in which the X-ray emission can be traced to the viriaI radius (where the overdensity delta approximate to 200), the gas mass fraction (essentially the baryon mass fraction) approaches a roughly constant value of 30%, suggesting that this is the true primordial value. Based on standard big bang nucleosynthesis, the large baryon mass fraction implies that Omega = 0.1-0.2. The antibiased gas distribution suggests that feedback from galaxy formation and hydrodynamics play important roles in the formation of structure on the scale of galaxies to rich clusters. All the groups and clusters in our sample have mass-to-light ratios of M/L(v) similar to 100-150 M./L., which strongly contrasts with the traditional view that the mass-to-light ratio of rich clusters is significantly greater than individual galaxies or groups with M/L(v) similar to 250-300 M./L.. We also show that M/L(v) is essentially constant within the virial radius of clusters (where delta greater than or similar to 200), which is consistent with the peaks formalism of biased galaxy formation. While the mass-to-light ratios of groups and clusters are comparable (indicating a constant mass fraction of optically luminous material), the ratio of the total mass-to-luminous mass (gas plus stars) monotonically decreases between galaxies and clusters. The decrease in M(tot)/M(lum) arises from two factors: (1) the composition of baryonic matter varies from a predominance of optically luminous material (stars) on the scale of galaxies (similar to 10 kpc) to a predominance of X-ray luminous material (hot gas) on the scale of rich clusters (similar to 1 Mpc), and (2) the hot gas has a more extended spatial distribution than the gravitating matter. The observed decrease in M(tot)/M(lum) between galaxies and clusters indicates that the universe actually becomes ''brighter'' on mass scales between 10(12) and 10(15) M., in the sense that a greater fraction of the gravitating mass is observable.