I don't know how the information was supplied to you, but the hardness typically is given in units of ppm as CaCO3. If that's the case it ought to mean that it's not as simple as subtracting 40 from 50 and getting 10. Instead you'd have 10 ppm as CaCO3 in Mg(OH)2 rather than 10 ppm Mg(OH)2, meaning that the Mg source in your water contributes as much hardness as 10ppm CaCO3 would. That's 0.1 mmol as CaCO3 per liter, or 0.1 mmol Mg(OH)2 per liter, or 0.1 mmol Mg2+ per liter, or about 2.4 ppm Mg ions.
I find it odd that they'd give the value for magnesium as a quantity of magnesium hydroxide. How do they know it's not magnesium carbonate and calcium hydroxide, for instance? They're all dissociated anyway; it just struck me as strange.
ETA: Note, if that's not the case and you actually do know for certain that you've got 10 ppm Mg(OH)2, then that's more like 4.1 ppm Mg ions. I don't know how much you're actually looking for.