The rows of people for Salatul-Janazah should be in odd numbers preferably due to a few Ahadith of the Holy Prophet Sallallahu Alaihe Wa Sallam.
It is narrated by Malik Ibn-e Hubairah that he heard the Holy Prophet Sallallahu Alaihe Wa Sallam saying: No Muslim dies but three rows of Muslims offer Salatul- Janazah upon him that (forgiveness) becomes obligatory for him. Thereafter, whenever Malik would feel that the number of people attending Salatul-Janazah is little, he would divide them into three rows due to this Hadith. (Narrated by Abu Dawood)
The above is a clear proof in preference of odd number of rows over even number.
Nonetheless, it is not an obligatory act. Therefore, if people did not or were not able to observe this instruction then there is no harm.
And Allah knows best.
Mufti Ikram ul Haq
Fatwa Center of America