* Barium (Ba) is an alkaline earth metal, forming a +2 cation (Ba2+).
* Cyanide (CN) is a polyatomic anion with a -1 charge (CN-).
To balance the charges, the correct formula for the compound formed between barium and cyanide would be Ba(CN)2. This is called Barium cyanide.