Who created the falanx and why was it so effective?
The phalanx is a military formation that originated in ancient Greece, where it was used by hoplite soldiers who were equipped with spears or pikes. It is believed to have been developed around 700 BCE as a means of achieving greater densities and cohesion on the battlefield.

The basic principle behind the phalanx was to form a wall of overlapping shields and interlocking ranks of men armed with long pikes. This formation made it difficult for enemy forces to penetrate, as each man protected not only himself but also his comrades to either side. By pressing forward together, the phalanx could create momentum and drive through opposing lines.

The effectiveness of the phalanx depended largely upon training and discipline, as well as the courage and determination of the individual soldiers. In experienced hands, it proved to be a potent force on the field of battle, allowing Greek armies to defeat larger opponents and helping to spread Greek influence throughout the Mediterranean world.

It's worth noting that while the phalanx played an important role in many famous victories such as those at Marathon and Leuctra, it also had some limitations in certain situations such as rough terrain or against highly mobile enemies like the Gauls or nomadic tribesmen. Overall however it remains one of the most successful military tactics of its time and beyond, inspiring similar formations in other cultures such as Rome's manipular system and even influencing modern infantry tactics today.
What were its weaknesses?
The phalanx formation had a number of weaknesses:

Mobility: The phalanx was relatively slow and lacked flexibility in terms of movement. The tightly packed formation made it challenging to maneuver quickly, especially in difficult terrain or uneven ground. This limited the phalanx's ability to adapt to rapidly changing battlefield situations.

Vulnerability to Flanking: The phalanx formation was susceptible to flanking maneuvers. The sides and rear of the phalanx were less protected due to the focus on frontal defense. Skilled enemy troops or cavalry units could exploit this vulnerability by attacking from the sides or rear, disrupting the formation and causing chaos among the hoplites.

Limited Range and Individual Initiative: While the phalanx excelled in close combat, it had limited range and individual initiative. The hoplites' long spears were effective within a specific range, but beyond that, they had limited offensive capability. Additionally, the dense formation restricted individual freedom of movement and limited the ability of soldiers to make independent decisions or engage in personal combat.

Dependence on Cohesion: The phalanx relied heavily on maintaining cohesion and unity within the formation. If the line was broken or disrupted, it could lead to disarray and vulnerability. A lack of coordination or discipline among the soldiers could undermine the effectiveness of the phalanx.

Challenged by Unconventional Tactics: The phalanx was designed for symmetrical, pitched battles against similarly equipped forces. It was less effective against unconventional tactics, such as guerrilla warfare, hit-and-run attacks, or skirmishes by lighter troops. These tactics exploited the phalanx's limitations and disrupted its formation, rendering it less effective.

It's important to note that the weaknesses of the phalanx were recognized by military strategists and opponents alike, and various tactics were developed to counter and exploit these vulnerabilities. Over time, the phalanx formation evolved and adapted to address some of its weaknesses, but it ultimately gave way to different military formations and strategies as warfare evolved.