Barium carbonate , the other ore of barium , is dissolved in hydrochloric acid to make barium chloride and carbon dioxide . The barium chloride is melted and electrolyzed , making barium metal . The barium sulfide is then hydrolyzed or treated with acids to form other barium compounds , such as the chloride , nitrate , and carbonate .