As when forming a hydroxide the ion OH is used in this manner

Metal(OH)valence of metal
does that mean that if my valence is 2 as with calcium,i have 2 molecules of oxygen and two of hydrogen??

actually, no.

M(OH)2

it means you have two hydroxide ions, consisting of 2 O atoms, and 2 H atoms, which are bonded as OH- in a covalent bond, a rather strong bond.

Also, sum of valence values must = 0... Ca^+2 + 2(OH^-) => 1(Calcium Ion Valence) + 2(Hydroxide Valence, or net charge) = 1(+2) + 2(-1) = 0 and combination of elements constitute a correct formula ratio.

When forming a hydroxide compound, the hydroxide ion (OH-) is combined with a metal ion. The valence of the metal ion determines how many hydroxide ions are needed to form a stable compound.

In the case of calcium (Ca) with a valence of 2, it means that two hydroxide ions (OH-) are needed to balance the charge of the calcium ion. However, it does not mean that there are two molecules of oxygen (O) and two molecules of hydrogen (H) involved.

The hydroxide ion is composed of one oxygen atom and one hydrogen atom: OH- (Oxygen + Hydrogen). So, in the case of calcium hydroxide (Ca(OH)2), there is one calcium ion (Ca2+) combining with two hydroxide ions (OH-) to maintain charge neutrality.

To understand the composition of chemical compounds, it's important to consider the valence of the metal ion and the charges of the ions involved. In this case, the valence of calcium is 2, which indicates that two hydroxide ions are needed to form a stable compound.