Here's how to figure that out:
* Barium (Ba) is in group 2 of the periodic table, meaning it forms a +2 ion (Ba²⁺).
* Carbonate (CO₃) is a polyatomic ion with a -2 charge (CO₃²⁻).
Since the charges are equal and opposite, they cancel each other out, resulting in the formula BaCO₃.