This is the toolbox page for the Law of Definite Proportions. The parent note throws around words like compound, ratio by mass, atomic mass, molecule, and a formula full of nA, mA, mAatom. If any of those made you pause — good. We build every one from zero, in an order where each idea leans on the one before it.
Before we can talk about "a compound," we need to know where a compound sits in the family tree of all stuff. Look at the sorting picture:
A pure substance is made of only one kind of building block all the way through.
A mixture is two or more pure substances just sitting together, not chemically joined — like sand stirred into salt. You can, in principle, pick them apart.
The word chemically bonded is doing all the work. In a mixture the pieces just touch; in a compound the atoms are snapped together like Lego and cannot be separated by stirring or filtering — only by a chemical reaction.
The key property we borrow from Dalton: atoms of one element are identical and cannot be split into fractions. You cannot have half a hydrogen atom in a molecule. This "no fractions" rule is the secret engine behind the whole law.
The reason the parent note can promise a fixed mass ratio is that atomic mass never changes — an oxygen atom in a raindrop weighs the same as one in a lab beaker.
This is why the parent note keeps saying "you cannot have 2.3 H atoms." The whole-number-ness of nA and nB is what quantizes (locks into fixed steps) the composition.
Here is how these foundations stack up to produce the law:
Read it top to bottom: matter splits into pure/mixture; pure gives us elements and compounds; elements are made of atoms; atoms group into molecules with whole-number counts; combine that with fixed atomic masses through a ratio, and out pops the fixed mass ratio — the law.