Battle of Cannae
Strategic background: Shortly after the start of the Second Punic War, Hannibal crossed into Italy by traversing the Pyrenees and the Alps during the summer and early autumn of 218 BC. He quickly won major victories over the Romans at Trebia and at Lake Trasimene. After these losses, the Romans appointed Quintus Fabius Maximus Verrucosus as dictator to deal with the threat. 
Fabius used attrition warfare against Hannibal, cutting off his supply lines and avoiding pitched battles. These tactics proved unpopular with the Romans who, as they recovered from the shock of Hannibal's victories, began to question the wisdom of the Fabian strategy, which had given the Carthaginian army a chance to regroup. The majority of Romans were eager to see a quick conclusion to the war. It was feared that, if Hannibal continued plundering Italy unopposed, Rome's allies might defect to the Carthaginian side for self-preservation.

Therefore, when Fabius came to the end of his term, the Senate did not renew his dictatorial powers and command was given to consuls Gnaeus Servilius Geminus and Marcus Atilius Regulus. In 216 BC, when elections resumed, Gaius Terentius Varro and Lucius Aemilius Paullus were elected as consuls, placed in command of a newly raised army of unprecedented size and directed to engage Hannibal. Polybius wrote:

The Senate determined to bring eight legions into the field, which had never been done at Rome before, each legion consisting of five thousand men besides allies. ...Most of their wars are decided by one consul and two legions, with their quota of allies; and they rarely employ all four at one time and on one service. But on this occasion, so great was the alarm and terror of what would happen, they resolved to bring not only four but eight legions into the field.

Estimates of Roman troop numbers: Rome typically employed four legions each year, each consisting of 4,000 foot soldiers and 200 cavalry. Per contemporary Roman sources, for the first time ever the Senate introduced eight legions, each consisting of 5,000 foot soldiers and 300 cavalry, with allied troops numbering the same number of foot soldiers but 900 cavalry per legion—more than triple the legion numbers. Eight legions—some 40,000 Roman soldiers and an estimated 2,400 cavalry—formed the core of this massive new army. Livy quotes one source stating the Romans added only 10,000 men to their usual army.

Roman command: The two consuls were each assigned two of the four legions to command, unusually employing all four legions at once on the same assignment. However, the Senate feared a real threat, and deployed not just four legions to the field but all eight, including allies. Ordinarily, each of the two consuls would command his own portion of the army, but since the two armies were combined into one, Roman law required them to alternate their command on a daily basis.
The traditional account puts Varro in command on the day of the battle, and much of the blame for the defeat has been laid on his shoulders. His low origins seem to be exaggerated in the sources, and Varro may have been made a scapegoat by the aristocratic establishment. He lacked the powerful descendants that Paullus had, descendants who were willing and able to protect his reputation—most notably his grandson Scipio Aemilianus, the patron of Polybius, one of the main sources of this history.

Prelude: In the spring of 216 BC Hannibal took the initiative and seized the large supply depot at Cannae, in the Apulian plain, placing himself between the Romans and their crucial source of supply. As Polybius noted, the capture of Cannae "caused great commotion in the Roman army; for it was not only the loss of the place and the stores in it that distressed them, but the fact that it commanded the surrounding district". The consuls, resolving to confront Hannibal, marched southward in search of him. After two days' march, they found him on the left bank of the river Aufidus, and encamped 8 km (5 miles) away.
Varro, in command on the first day, is presented by contemporary sources as a man of reckless nature and hubris, who was determined to defeat Hannibal. As the Romans approached Cannae, some of Hannibal's light infantry and cavalry ambushed them. Varro repelled the attack and continued slowly on his way to Cannae. This victory, though essentially a mere skirmish with no lasting strategic value, greatly bolstered the confidence of the Roman army, perhaps leading to overconfidence on Varro's part.
Paullus was opposed to the engagement as it was taking shape. Unlike Varro, he was prudent and cautious, and he believed it was foolish to fight on open ground, despite the Romans' numerical strength. This was especially true since Hannibal held the advantage in cavalry, in both quality and quantity. Despite these misgivings, Paullus thought it unwise to withdraw the army after the initial success, and camped two-thirds of the army east of the river Aufidus, sending the remainder to fortify a position on the opposite side, 2 km (1.2 mi) away from the main camp. The purpose of this second camp was to cover the foraging parties from the main camp and harass those of the enemy.
The two armies stayed in their respective locations for two days. During the second day (August 1) Hannibal, aware that Varro would be in command the following day, left his camp and offered battle, but Paullus refused. When his request was rejected, Hannibal, recognizing the importance of water from the Aufidus to the Roman troops, sent his cavalry to the smaller Roman camp to harass water-bearing soldiers that were found outside the camp fortifications. According to Polybius, Hannibal's cavalry boldly rode up to the edge of the Roman encampment, causing havoc and thoroughly disrupting the supply of water to the Roman camp.
On the morning of the battle, as the forces drew up, a Carthaginian officer named Gisgo reportedly remarked to Hannibal that the size of the Roman army was astonishing. "There is one thing, Gisgo, yet more astonishing", Hannibal coolly replied, "which you take no notice of." He then explained, "In all those great numbers before us, there is not one man called Gisgo", provoking laughter that spread through the Carthaginian ranks.
Appian and Livy say Hannibal sent a small contingent of 500–600 mercenaries to pretend to desert to the Roman side. Those men, Celtiberians according to Appian and Numidians according to Livy, handed their weapons to the Romans as a sign of good will while retaining hidden short swords in their clothes. Once the battle started, following Hannibal's plans, the mercenaries attacked, stealing weapons and shields from their victims and causing chaos and confusion in the Roman camp. However, the veracity of this part is disputed.

Date: Ancient historians rarely provide the precise dates for the events they describe. For example, Livy provides no explicit dates for any of the battles of the Second Punic War. Macrobius, citing the Roman annalist Quintus Claudius Quadrigarius, states the battle was fought ante diem iiii nones Sextilis, or 2 August.
The months of the pre-Julian Roman calendar are known not to correspond to its namesake Julian day. For example, Livy records a lunar eclipse in 168 BC as occurring on 4 September, when astronomical calculations show it happened on Julian day 21 June of that year. This discrepancy arose from the failure of the pontifices to properly perform intercalations, either by accident or for political advantage. A review of the evidence led P.S. Derow to identify the equivalent Julian date as 1 July 216 BC. Other authorities have suggested other Julian dates.

Armies: Figures for troops involved in ancient battles are often unreliable, and Cannae is no exception. They should be treated with caution, especially those for the Carthaginian side. The Carthaginian army was a combination of warriors from numerous regions, and may have numbered between 40,000 and 50,000. Their infantry comprised an estimated 8,000 Libyans, 5,500 Gaetulian, 16,000 Gauls, mainly Boii and Insubres (8,000 were left at camp the day of battle) and 8,000 of several tribes of Hispania, including Iberians, Celtiberians and Lusitanians. 
Hannibal's cavalry also came from diverse backgrounds. He commanded 4,000 Numidian, 2,000 Iberian peninsular, 4,000 Gallic and 450 Libyan-Phoenician cavalry. Hannibal had an auxiliary skirmisher contingent consisting of 1,000–2,000 Balearic slingers and 6,000 mixed-nationality javelinmen, possibly including Lusitanians among them. The uniting factor for the Carthaginian army was the personal tie each group had with Hannibal.

Equipment: Rome's forces used typical Roman equipment including pila (heavy javelins) and hastae (thrusting spears) as weapons as well as traditional bronze helmets, bodyshields and body armor.