Onions cells contain small amounts of propanethiol S-oxide. When you cut one open, this compound mixes with enzymes that release a sulfur compound which is itself not noxious. However, when it encounters the water in our tear ducts, it creates sulfuric acid which is a strong irritant. Rubbing ones eyes will only make things worse if some of the compound has adhered to the skin while cutting the onion.

Some people have noticed that running cold water on your wrists prior to cutting an onion can reduce the irritation. The explanation for this is related to putting cold keys on your back to reduce a nosebleed. The cold sensation makes blood vessels in the nasal passages constrict. The route to the tear glands is through the nose and constriction of the blood vessels may slow this process down.