The electrons in an atom reside in the energy shells or energy levels of the atom. These shells are called s, p, d, f, g, h and i, starting from the inner-most shell named s, which is adjacent to the nucleus. There are seven energy levels, just like the seven rows of elements in the periodic table. These energy levels are further divided into sublevels called 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p and further according to the Aufbau principle, Pauli's exclusion principle and Hund's rule of maximum multiplicity. Aluminum has 13 electrons occupying the energy levels up to 3p.
A maximum of two electrons can reside in the 1s energy level. In aluminum, the 1s energy shell has two electrons. After this level there are 11 electrons left to be filled in the energy orbitals.
In this energy level, aluminum has two electrons. There can also be a maximum of two electrons in this level. After this level, there are nine electrons left to be filled in the energy orbitals.
There are six electrons in the 2p energy level of the aluminum. The maximum numbers of electrons that can be in this level are six. After this level there are three electrons left to be filled in the energy orbitals.
There are two electrons in this energy level. This is the first sublevel of the third energy level. After this level, there is only one electron left to be filled in the energy orbitals.
The last electron is put in this energy level. The maximum number of electrons that can occupy this level is six, but since only one electron is left, it is put here.
The final electronic configuration is 1s2, 2s2, 2p6, 3s2 and 3p1.