When metals react with non-metals, electrons are transferred from the metal atoms to the non-metal atoms, forming ions. The electrons from the metal atoms will always transfer to the non-metal atoms. Although there are some exceptions depending on the periods, the resulting compound is called an ionic compound.