Onions contains oil, which contains sulfur, both an irritant to both our nose and our eyes.Cutting the onion will produce a gas called propanethiol s-oxide.This gas will mix with the enzymes in the onions and will produce a sulfur compound.The sulfur compound will react with the water in our eyes to produce sulfuric acids.
Our eyes will automatically blink and produce tears which will flush out the sulfuric acids from our eyes.
One way to prevent crying when cutting onions is to cut it underwater.The water will dissolve the sulfur and will not be able to have contact with our eyes. The water will also draw out the juice.Another way is to cut it with a sharp knife.If you cut it with a blunt knife,you will crush the onion and not slicing it.Crushing the onion will produce more of the gas.You can also wear goggles and mask when cutting onions.Rubbing our eyes will only makes things worst. This is because your hand contains the onion juice and the sulfuric acids.