How come the charges of H*2O*2 (asterisk means subscript), which is hydrogen peroxide,don't equal? The charge of hydrogen is 2, and the charge of O is 4.

For an ionic compound you can figure out the formula by the charges(when the charges of the ions add up to zero) but does the method apply to molecular compounds too?
Thanks!

Not quite. The charges ARE equal.

H = +1 charge on each of 2 = 2 x 1 = +2
O = -1 charge on each of 2 = 2 x -1 = -2
Total = 0.
Why? Because oxygen has -2 oxidation state in OXIDES, in PEROXIDES the oxidation state is -1, In the free state oxygen is zero. Watch for hydrides. They have hydrogen of -1 and not +1 (NaH, LiH).

The charges of the atoms in a molecule do not directly determine the formula or structure of the molecule. In molecular compounds like hydrogen peroxide (H2O2), the charges do not add up to zero, unlike in ionic compounds.

Hydrogen peroxide is a covalent molecule, which means it consists of shared electron pairs between the atoms rather than a transfer of electrons from one atom to another, as in ionic compounds. In this case, the formula is determined by the number of atoms that can bond together to achieve a stable electron configuration.

In hydrogen peroxide, there are two hydrogen atoms (H) and two oxygen atoms (O). Oxygen typically forms two bonds in covalent compounds, while hydrogen typically forms one bond. Therefore, each oxygen atom in hydrogen peroxide shares electrons with one hydrogen atom, resulting in a chemical formula of H2O2.

So, when dealing with molecular compounds, it is the shared electron pairs and the octet rule (or stability of electron configuration) that determine the formula, rather than the individual charges of the atoms.

In the case of hydrogen peroxide (H2O2), the charge of hydrogen is +1 and the charge of oxygen is -2. This means that each hydrogen atom has a charge of +1 and each oxygen atom has a charge of -2.

The reason the charges don't equal is because H2O2 is a molecular compound, not an ionic compound. In molecular compounds, atoms share electrons to form bonds rather than transferring electrons to form ions. The sharing of electrons allows the atoms to achieve a stable electron configuration.

So, in hydrogen peroxide, each hydrogen atom shares one electron with one of the oxygen atoms. This sharing of electrons creates a covalent bond between each hydrogen atom and its corresponding oxygen atom. Since each oxygen atom has two hydrogen atoms bonded to it, it has a total charge of -2. Similarly, each hydrogen atom has a total charge of +1.

To determine the formula of a molecular compound, you would typically use the rules of chemical bonding, which involve sharing of electrons. In the case of hydrogen peroxide, each oxygen atom needs two electrons to achieve a stable electron configuration. Therefore, two hydrogen atoms bond with each oxygen atom to share their electrons, resulting in the formula H2O2.

In summary, the method of using charges to determine formulas applies primarily to ionic compounds, where the transfer of electrons leads to the formation of ions. For molecular compounds, the rules of electron sharing in chemical bonding are used to determine the formula.