Is there a difference between oxidation state and valency?

I just looked up peroxide on Google, and I saw that the oxidation state of oxygen in $$\ce{R-O-O-R}$$ is $$–1$$, and not $$–2$$ (like $$\ce{H2O}$$), when I could clearly see that each O atom forms two bonds. Did I get either of the concepts wrong?

I think that's probably the case but, can someone explain where I went wrong? To me, Valency dictates the no of bonds that an element can have. In the structure, I can clearly see that each oxygen forms $$2$$ bonds so, if I remove the other atoms, won't the imaginary charge left still be $$-2$$? Then how, does $$-1$$ come into play?

• Does this answer your question? An introduction to "oxidation state"/"oxidation number" Aug 20, 2020 at 15:33
• The valency is the number of bonds. The degree of oxidation is the number of charges that are left on an atom once all valence bonds between different elements are replaced by an ionic bond. Oxygen has two valences in the molecule H-O-O-H. But if you don't touch O-O bonds, and replace OH bonds by charges, it produces a positive charge on H, and a negative charge on Oxygen. The oxidation state of Oxygen is $-1$. Aug 20, 2020 at 15:57
• See, where does the imaginary charge come from? It must be electrons stolen from some other atoms. What atoms? Aug 20, 2020 at 15:59
• @ Ivan. The imaginary charge comes from the bond. A bond between two atoms A and B is made of 2 electrons coming each from one atom (A and B). If the two electrons are not used for making a bond, but are fixed on the most electronegative atom (let's say it is B), A looses one electron, the valence bond disappears, and is transformed into a positive charge on A, and a supplementary negative charge on B. Aug 20, 2020 at 16:24
• @Maurice Sorry for not pointing out that my question was not for you, but for the OP. Aug 20, 2020 at 18:43

I think it will help you understand if you know the historical context. The concept of valency existed well before chemical bond, electrons, protons, etc. were known. It is a primitive concept from late 1860s. It referred to the capacity of an element to bind with hydrogen or any other element.

For example, if we say carbon has a valency of four, all it means that it can combine with 4 hydrogen atoms. If we have say oxygen has a valency of 2, it means it will combine with two hydrogen, the famous H$$_2$$O! Does this make it clear? One would determine valency by pure elemental analysis. If I have FeCl$$_3$$, iron has a valency (=combining power) of 3, because it can combine with three chlorine atoms. I am avoiding the word ion, because ions did not exist then! The valency of oxygen in peroxide is still 2 because each oxygen atom is combining with two atoms via single bonds. In this case, the other atom is another oxygen itself. Now read the Wikipedia article Valence. Note that I did not assign any sign to valency

Oxidation number or state is a newer notion which came about when electrons were very well recognized to play a role in bonding and the atomic structure become relatively well understood. I quote it's definition from the OED

a number representing the degree of oxidation of an element in a particular ion, molecule, or substance, being a notional electric charge equal to the number of electrons lost (or gained, if the number is negative) by an atom of the element in forming the species or substance, all bonding being assumed to be completely ionic

Oxidation state/ number has a sign associated with it. Sometimes, valency and oxidation number can match in terms of their absolute values.

NH$$_3$$

Valency of nitrogen= 3

Oxidation state of nitrogen = -3