Here's why:
* Barium (Ba) is an alkaline earth metal in group 2, meaning it has a +2 charge.
* Sulfur (S) is a non-metal in group 16, meaning it has a -2 charge.
To form a neutral compound, the charges must balance out. Therefore, one barium atom (Ba²⁺) combines with one sulfur atom (S²⁻) to form BaS.