The products formed when acids react with carbonates are a form of salt, carbon dioxide and water. In general, many alkali and alkaline earth metal carbonates will react with acids to create these products.
Some examples of alkali metal carbonates are sodium carbonate and lithium carbonate, while magnesium carbonate is an alkaline earth metal carbonate. Reacting an acid with a carbonate can be one way to identify carbonate ions.
Similarly, reacting specific metal carbonates with either hydrochloric acid or sulfuric acid forms chlorides and sulfates, respectively. Some examples of these types of reactions are the formation of the salts magnesium chloride and calcium sulfate.
The reaction that forms magnesium chloride involves the reactants hydrochloric acid and magnesium carbonate. Calcium carbonate reacts with sulfuric acid to produce calcium sulfate, water and carbon dioxide.