Extraction of sodium from molten sodium chloride

Sodium is also a reactive metal, and so can't be extracted by electrolysis of an aqueous solution.
The main ore of sodium is common salt, sodium chloride. Calcium chloride is added to the purified ore to lower the melting point from around 800oC to around 600oC, so that energy costs are lowered.

At the cathode (-)

Na-(aq) + e- à Na(l)

Reduction

Sodium ions are attracted and discharged

At the anode (+)

2Cl-(l) - 2e- à Cl2(g)

Oxidation

Chlorine ions are attracted and discharged
Once molten, the current keeps it molten
It is important to keep the Sodium and Chlorine products separate to stop them from reacting.
One large scale use for Sodium is for making the die for jeans, and another is making the element Titanium from its ore :
The principal ore of Titanium is called Rutile and the main Titanium containing compound is Titanium IV Oxide, TiO2
This is converted into Titanium for Chloride, by a reaction with Carbon and Chlorine

TiO2 + C + 2Cl2 à TiCl4 + CO2

This volatile liquid is heated with molten Sodium in a atmosphere of the noble gas Argon for 36 hours.

TiCl4 + 4Na à 4NaCl + Ti

This process produces small dark-grey lumps of Titanium metal embedded in salt crystals, which are coloured by traces of Titanium compounds
Sodium chloride is removed by dissolving in water. The Titanium granules are then dried before packing.

Titanium is a Transition Metal (see previous note), and so has coloured compounds. It is a hard, strong, low density metal, which is reasonably unreactive, and has uses as artificial hip joints, rotor blades in jet engines, and space capsule construction.

The electrolysis of aqueous Sodium Chloride (Brine)

This process is the basis of the Chlor-alkali industry and produces three useful products.

Particles Present:

Na+(aq) Cl-(aq) H+(aq) OH-(aq)

H2O(l) à H+(aq) + OH-(aq)

The Hydrogen ions and Hydroxide ions are present because at any given moment, 1 in 10 million water molecules will split up into ions. Although the proportion of Hydrogen ions is low, the number of Hydrogen and Hydroxide ions is significant.

At the cathode (-)

Both Na+ and H+ are attracted, but Sodium is above Hydrogen in the reactivity series, and so it is easier to give electrons to H+ than Na+. Thus, Na+ are not discharged.

2H+(aq) + 2e- à H2(aq)

Since Hydrogen ions are constantly being removed from the water, the OH- concentration around the cathode is constantly rising, i.e. the solution is becoming more alkaline, the pH paper turns blue purple. Sodium ions are also present in the solution around the cathode and so the important strong alkali Sodium Hydroxide can be extracted from the solution there.

At the anode (+)

2Cl-(aq) - 2e- à Cl 

Chloride ions are attracted and discharged.

THREE useful products are obtained by the electrolysis of Brine.

1) Hydrogen, H2

This is used as a fuel in some experimental cars, and is used in rockets.

2H2(g) + O2(g) à 2H2O(g)

This has 2 main advantages over other fuels. 

This is one main disadvantage, which is that Hydrogen is very explosive and so it is difficult to use and store safely.

2) Sodium Hydroxide, NaOH(aq), 'Caustic Soda', corrosive, 'Burning', damaging human tissue.

This is the cheapest strong alkali, and it is used in the home where grease removal is difficult. Ammonia solution, a weaker alkali is used to kill bacteria and germs on floors and kitchen surfaces.

 Sodium Hydroxide is also used to react with animal fats to make soap.

 3) Chlorine, Cl2

 Chlorine is a dense green poisonous gas

2) Used to make 'chlorinated solvents' including dry cleaning solvent

3) Chlorine is used to make PVC, a polymer long chain molecule with a repeating unit (floor coverings, clothing, upholstery, records, etc.) 

Chlorine reacts with Sodium Hydroxide and so there is a need to keep apart the Sodium Hydroxide produced at the anode. One of the ways that this is achieved in industries is that the electrolyte is kept higher than the anode side so that defusion of Hydroxide ions through a partition between the electrodes (Diaphragm) is minimised. The cell used in industries is call a "Diaphragm Cell."