Line (formation)

The line formation is a standard tactical formation which was used by infantry in early modern warfare. 
It continued the phalanx formation or shield wall of infantry armed with polearms in use during antiquity and the Middle Ages. The line formation used soldiers standing or moving side by side forming a line.
Frederick the Great.
The line formation provided the best front for volley fire. However the line could not change direction easily and was open to attack by cavalry. Frederick the Great used the line formation, or “march by lines” as a part of his oblique order to fix this problem. The other part of the oblique order was the “attack in echelon” (change to column formation and angle slightly towards the enemy). This way his line of soldiers, usually two ranks deep, could easily change the direction they faced.
17th century line formation.
An infantry battalion would form "in line" by placing troops in several ranks. They could range in number from two to five, with two or three being the most common. During the 17th century lines thinned out and became longer. Using this line formation required greater discipline since the two opposing armies were often only apart.
American Civil War.
During the American Civil War the standard formation for both attacking and defending was the line formation. The line allowed the maximum number of soldiers to fire their weapons without hitting their own men. The line formation worked best in open fields. The line could not move well in wooded areas or in rough terrain. Both sides were still using tactics that were used in the American Revolutionary War. During earlier wars including the Napoleonic Wars, single-shot smoothbore muskets were used with fixed bayonets. A line would advance to about from the enemy line and fire in volley (all at the same time). Muskets were not very accurate and by all firing at the same time they were more likely to hit enemy soldiers. After firing their one shot the soldiers would all move the line forward for a bayonet charge.
The new weapons in use at the beginning of the war made the older tactic unnecessary. Newer rifles and rifle muskets were now available that could allow the defenders to start firing at to yards away. The development of the Minié ball (bullet) also increased the accuracy of rifles at longer ranges.
Modern warfare.
A loose line formation is also used by many modern forces during assaults. It allows the use of maximum firepower to concentrate in one direction at once. This is useful when attacking an enemy position. It also enables the use of fire and movement.