The phalanx was a rectangular mass military formation, usually composed entirely of heavy infantry armed with spears, pikes, sarissas, or similar polearms tightly packed together. The term is particularly used to describe the use of this formation in ancient Greek warfare, although the ancient Greek writers used it to also describe any massed infantry formation, regardless of its equipment. Arrian uses the term in his Array against the Alans when he refers to his legions. In Greek texts, the phalanx may be deployed for battle, on the march, or even camped, thus describing the mass of infantry or cavalry that would deploy in line during battle. They marched forward as one entity.
Sumerian phalanx-like formation c. 2400 BC, from detail of the victory stele of King Eannatum of Lagash over Umma, called the Stele of the Vultures