The formation of an ionic compound sodium chloride from the elements sodium and chlorine is shown with the help of a diagrammatic representation of electronic configuration in fig.