From Life's Little Mysteries:
By Natalie Wolchover
Fires can't burn in the oxygen-free vacuum of space, but guns can shoot. Modern ammunition contains its own oxidizer, a chemical that will trigger the explosion of gunpowder, and thus the firing of a bullet, wherever you are in the universe. No atmospheric oxygen required.
The only difference between pulling the trigger on Earth and in space is the shape of the resulting smoke trail. In space, "it would be an expanding sphere of smoke from the tip of the barrel," said Peter Schultz an astronomer at Brown University who researches impact craters.
The possibility of gunfire in space allows for all kinds of absurd scenarios.
Imagine you're floating freely in the vacuum between galaxies — just you, your gun and a single bullet. You have two options. You either can spend all of eternity trying to figure out how you got there, or you can shoot the damn cosmos.
If you do the latter, Newton's third law dictates that the force exerted on the bullet will impart an equal and opposite force on the gun, and, because you're holding the gun, you. With very few intergalactic atoms against which to brace yourself, you'll start moving backward (not that you’d have any way of knowing). If the bullet leaves the gun barrel at 1,000 meters per second, you — because you're much more massive than it is — will head the other way at only a few centimeters per second.
Once shot, the bullet will keep going, quite literally, forever. "The bullet will never stop, because the universe is expanding faster than the bullet can catch up with any serious amount of mass" to slow it down, said Matija Cuk, an astronomer with joint appointments at Harvard University and the SETI Institute. (If the universe weren't expanding, then the one or two atoms per cubic centimeter encountered by the bullet in the near-vacuum of space would bring it to a standstill after 10 million light-years.)
Getting down to details, the universe expands at a rate of 73 kilometers per second per megaparsec (about 3 million light-years, or the average distance between galaxies). By Cuk's calculations, this means matter that is 40,000 to 50,000 light-years away from the bullet would move away from it at about the same speed at which it is travelling, and would thus be forever out of reach. In the entire future of the universe, the bullet will catch up only to atoms that are less than 40,000 or so light-years from the chamber of your gun.
Speaking of you, you'll be bobbing through space forever, too. [Album: Visualizations of Infinity]
Shooting giants from the hip
Guns do actually get carried to space, though not quite to the void between galaxies. For decades, the standard survival pack for Russian cosmonauts has included a gun. Until recently, it wasn't just any gun, but "a deluxe all-in-one weapon with three barrels and a folding stock that doubles as a shovel and contains a swing-out machete," according to space historian James Oberg...