Elements form Compounds to achieve stable arrangement of the electrons in their outer shells.
All atoms seek an outer shell that is full. That means if an element has only one or two elements in their outer shell it will seek to get rid of those extra electrons.
If an element has space for one or two electrons it will seek other spare electrons from other elements in total
Ratio of elements in compounds can be worked out from their Valencys
In order to work out valency
use the periodic table
fill in the valency squares
cut to the
Ionic Bonding occurs when one element gives another element an electron (or two) and then the 2 elements are satisified. It means that there is a one to one ratio between the elements in the compound.
Covalent compounds occur when elements share their electrons