I don't really understand why unit analysis works.

I found a simple example on a website (I can post the link in a comment if you want).

It says,
For example, convert 18 grams of water to moles. The molar mass of water is 18 g/mol; therefore :

18g H2O x 1 mol/18g H2O = 1 mol H2O

In 1 mol/18g H2O, I get that the denominator is molar mass, but how come the regular unit, g/mol, isn't used and just g is used? How come we're able to do that?

And what does this equation mean in words.. ?
There's 18g H2O for every 1mol of H2O (which weighs 18g)... So there's 1 mol of H2O...?

But I don't think division would mean "which" weighs 18g..

The molar mass is defined in simple terms as the mass of a mole plus the word "grams".

, but then would 1mol/18g H2O mean

1 mol per 18 grams per mol of H2O..? There's one mol for every 18g of H2O..? It's confusing

1 mol H2O is 18 grams. The factor used in dimensional analysis is 1 mol H2O/18 g H2O or 18g H2O/1 mol H2O.

1 mol/18 g H2O means 1 mol H2O/18 g H2O. I don't understand what's confusing about "There's one mol (of water) for every 18 g of H2O." Perhaps my (of water) addition helps clarify the statement.

Unit analysis, also known as dimensional analysis, is a method of converting between different units of measurement. It relies on the understanding that units can be treated as algebraic quantities and can be canceled out or manipulated just like any other algebraic variable.

In the example you provided, the goal is to convert 18 grams of water to moles. To do this, unit analysis uses conversion factors, which are ratios that relate different units of measurement.

The molar mass of water, H2O, is 18 grams per mole (g/mol). Using this information, the conversion factor is set up as follows:

(18g H2O) x (1 mol H2O/18g H2O)

In this equation, the numerator represents the given quantity in grams (18g H2O), while the denominator represents the conversion factor that allows us to cancel out the grams and obtain the desired unit, moles (1 mol H2O).

Now, regarding your specific question about why the unit g/mol is not used in the calculation: the g/mol unit is indeed used in the conversion factor, but when you multiply it to the given quantity of 18 grams, the grams in the numerator and the grams in the denominator cancel each other out. This cancellation leaves you with just the desired unit of moles. It's similar to how x/x equals 1 in algebra, and so the x terms cancel each other out.

So, in words, the equation (18g H2O) x (1 mol H2O/18g H2O) can be read as "There is 18 grams of water for every 1 mole of water." By multiplying the given quantity of 18 grams by this conversion factor, you are effectively canceling out the grams and obtaining the quantity in moles, which in this case is 1 mole of H2O.