An equivalent statement is the law of constant compostion, which states that all samples of a given chemical compound have the same elemental composition.
This observation was first made by the French chemist Joseph Proust based on several experiments conducted between 1797 and 1804. In most of these experiments, Proust reacted several of the elements with oxygen and observed that the oxygen content of the product of these reactions was always fixed at one or two values, rather than displaying a broad range of possible values. For example, Proust measured that the product of iron and oxygen might contain 27% oxygen or 48% oxygen, but not an intermediate composition, or that the product of copper and oxygen might contain 18% oxygen or 25% oxygen, but not an intermediate composition.
Based on such observations, Proust made statements like this one, in 1797:
The law of definite proportions contributed to, and was placed on a firm theoretical basis by, the atomic theory that John Dalton promoted beginning in 1803, which explained matter as consisting of discrete atoms, that there was one type of atom for each element, and that the compounds were made of combinations of different types of atoms in fixed proportions.
It may be noted that although very useful in the foundation of modern chemistry, the law of definite proportions is not universally true. There exist nonstoichiometric compounds whose elemental composition can vary from sample to sample. An example is the iron oxide wüstite, which can contain between 0.83 and 0.95 iron atoms for every oxygen atom, and thus contain anywhere between 23% and 25% oxygen. In general, Proust's measurements were not accurate enough to detect such variations.