
In the heyday of the Sailing ship, every ship of the line had cannon for
protection. Cannon of the times shot round iron cannon balls. The ship's
master wanted to store the cannonballs such that they could be of instant
use when needed, yet not roll around the gun deck. The solution was to stack them in a square-based pyramid next to the cannon. The top level of the stack had one ball, the next level down had four, the next had nine, the next had sixteen. Thus, four levels would provide a stack of thirty cannonballs.
The only real problem was how to keep the bottom level from sliding out from
under the weight of the higher levels. To prevent this, they devised a small
plate with one rounded indentation for each cannonball in the bottom layer.
Unfortunately, however, when iron was used to make the initial plates, the
cannonballs would rust to the plate. As a result, these plates were made of
brass to prevent rust. Brass did, however, have a shortcoming of its own.
When the temperature falls, brass contracts in size faster than iron. As it
became cool on the gun decks, the indentations in the brass plate, called a
"monkey", would become smaller than the iron cannonballs they were holding.
If the temperature got cold enough, the bottom layer would pop out of the
indentations -- spilling the entire pyramid over the deck.
At that point it was, quite literally,
"COLD ENOUGH TO FREEZE THE BALLS OFF A BRASS MONKEY."
And all this time you thought they were talking dirty.