Molarity is defined as the number of moles of solute per liter of solution. An example problem calculates the molarity of a solution made by dissolving 40 grams of Epsom salts (MgSO4) in 8 liters of water. The molarity is found to be 0.042M by first calculating the moles of MgSO4 dissolved and then dividing by the total liters of solution.