This is the origin of the 21-gun salute
If you ever attend a military funeral or memorial ceremony, you may notice a group of men and women proudly holding rifles. Then, at a specific time, they aim their weapons up to the sky and fire, usually causing a slight stir in the crowd, even though everyone was expecting it to happen. Don't worry — those rounds are just blanks. This practice of a 21-gun salute is quite common throughout the world and, as with many traditions, it has a practical origin.
Back when ships carried cannons, it was universally understood that immediately after firing, these weapons were rendered ineffective for a period of time — after all, reloading took a while. So, in order to demonstrate peaceful intent, ships would turn their cannons to the sky and discharge, telling those ashore that a ship's weapons weren't live.
Nobody knows why ships were designed, at one point, to carry precisely seven cannon. Some theorize that it's related to the seven phases of the moon, others think it has to do with the biblical week, and some say it's simply because seven is a lucky freakin' number.
The cannon in shore batteries (with ample stores of dry, usable gunpowder) would fire three shots in return for every single shot they heard coming from the sea. For all you math geniuses out there, that equals 21 cannon shots. Upon hearing the return fire, ships at sea knew that the harbor was friendly — and the 21-gun salute was born.
It isn't always 21, though. During a funeral ceremony at Arlington National Cemetery, the POTUS, former presidents, and presidents elect receive the traditional 21-gun salute. Other high-ranking officials, however, like the Secretary of Defense, Chairman of the Joint Chiefs of Staff, and military officers in command over multiple branches, receive a 19-gun salute.
Although hearing the 21-gun salute typically means you're mourning the loss of a fellow patriot, know that this is a practice rooted in peace and history. With this salute, the fallen join those who gave us traditions so long ago.