How does the electronic configuration work?
Very simple. Take a look at ur periodic table and look across the atomic numbers of every element. Hydrogen has an atomic number of 1 because it has one electron (mainly one proton but protons=electrons in atoms) and it increases by one across the periods. Each atom has an electronic configuration in which electrons are aligned into orbital ‘energy shells’ (circles) around the nucleus. The first shell from the nucleus can have a maximum of 2 electrons in it. The second shell can have a max of 8. The 3rd has a basic maximum of 8 electrons but it gets more complicated from there. Having said this u should look at the atomic number (the number below the Chemical symbol) and use the rule of electrons in shell. Mg has an atomic number of 12 hence it has 12 protons and 12 electrons overall. So the configuration of these electrons (electronic configuration) has to comply with the number of electrons it has. Mg has 12 electrons overall. The first shell- containing 2 electrons max- is fulfilled