Here's why:
* Barium (Ba) is an alkaline earth metal in group 2, meaning it has a +2 charge when it forms an ionic bond.
* Hydrogen (H) is a nonmetal and usually has a -1 charge when it forms an ionic bond.
To balance the charges and create a neutral compound, you need two hydrogen atoms (2 x -1 = -2) to combine with one barium atom (+2).