Sayyiduna Samurah (may Allah be pleased with him) said: the Messenger of Allah (peace and blessings be upon him) ordered us that when we are three, we should put one of us forward to be the imam, and when we are two, we should form a single row.
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6921