While the principle of the unit formation is the basis of ancient warfare, the way of organizing said formations changed over history. We’ve talked about the Greek phalanx and how they would interlock shields and then push on the enemy. Since reaching the shield pushing stage could turn the tide of a battle easily, the phalanx formation evolved until spears became pikes, or two-handed spears.
This is how the Macedonians were able to conquer Greece, with the length of their 9 feet pikes, and using cavalry to harass the enemy rear and flank. Cavalry couldn’t do a full-on charge like we see the Rohirim do in Lord of the Rings for example, for several reasons that I will explain soon enough.
What brought down the phalanx formation was a new type of formation brought on by the most inventive and the most influential civilization on Europe: Rome. Romans preferred a formation of soldiers using big rectangular shields with short swords, but more flexible than a phalanx since the shields weren’t interlocked.
Rome bid a lot on the discipline of their soldiers to be able to maintain such a loose formation, but were successful in defeating the Macedonian phalanx, because of their flanking power.
The shield wall came back in usage with the Vikings and Saxons, however it was only used in specific situations and not all the time. Units still fought in formation, but shield walls were used to protect against missile attacks. A famous example is from the Bayeux tapestry, where the Saxons form a shield wall to protect against the javelins that the Norman knights threw at them.
Just like the Romans brought down the Greek phalanx formation by being flexible and surrounding the phalanx, the shield wall had the same problem of being highly vulnerable at the flanks. The warriors on the flanks could have turned their shields outwards, thus creating a formation where no flank is exposed, but this would have greatly affected their movement and would have made them weak against a new tactic: the couched lance cavalry charge.