A calcium atom has 20 electrons around its nucleus. There are 2 in the K shell, 8 in the L shell, 8 in the M shell and 2 in the N shell.
By giving up the two electrons in its outermost N shell, calcium becomes a doubly charged positive ion, \mathrm{Ca}^{2+}. Its outer shell lies one shell further out than that of magnesium, so calcium gives up its electrons more easily and is a more reactive metal than magnesium.
Calcium reacts with water without being heated, giving off hydrogen and forming calcium hydroxide.
\mathrm{Ca} + 2\mathrm{H_2O} \longrightarrow \mathrm{Ca(OH)_2} + \mathrm{H_2}
Calcium is denser than water, so unlike sodium it sinks, and it reacts at the bottom, giving off bubbles.
Calcium hydroxide dissolves only a little in water, so the part that cannot dissolve makes the water look cloudy and white. The solution is strongly basic and turns pink when phenolphthalein is added.
When a platinum wire dipped in a solution containing calcium is held in the flame of a gas burner, the flame turns orange-red. When the light of the flame is split into a spectrum, orange-red light with a wavelength of about 622 nm and green light of about 554 nm can be seen.
Fireworks also make use of flame colours: they contain strontium for red, barium for green and calcium for orange, among other elements.
The main component of limestone, marble and shells is calcium carbonate, \mathrm{CaCO_3}. When calcium carbonate is strongly heated, it gives off carbon dioxide and turns into calcium oxide, known as quicklime.
\mathrm{CaCO_3} \longrightarrow \mathrm{CaO} + \mathrm{CO_2}
When water is added to quicklime, it gives out a great deal of heat and turns into calcium hydroxide, known as slaked lime.
\mathrm{CaO} + \mathrm{H_2O} \longrightarrow \mathrm{Ca(OH)_2}
Quicklime absorbs water readily, so it is also used as the drying agent in packets of dried seaweed and rice crackers.
Slaked lime takes in carbon dioxide from the air and slowly turns back into calcium carbonate. This reaction is what makes lime plaster on walls harden.
A solution of calcium hydroxide in water is called limewater. When carbon dioxide is bubbled through limewater, calcium carbonate, which hardly dissolves in water, is formed and the limewater turns milky.
\mathrm{Ca(OH)_2} + \mathrm{CO_2} \longrightarrow \mathrm{CaCO_3} + \mathrm{H_2O}
This reaction is used to test whether a gas is carbon dioxide.
If more carbon dioxide is bubbled through, the calcium carbonate turns into calcium hydrogencarbonate, which dissolves, and the milkiness disappears.
\mathrm{CaCO_3} + \mathrm{CO_2} + \mathrm{H_2O} \longrightarrow \mathrm{Ca(HCO_3)_2}
Limestone caves form when groundwater containing carbon dioxide dissolves limestone and calcium carbonate later comes out of the water again.