Dr Mellor explained on The Conversation that onions make us cry because they produce a chemical called propanthial s-oxide, which is a defense mechanism to ward off pests.
But the chemical is volatile, which apparently means that once it's released when it has been chopped up, it can quickly evaporate and dissolve in the water covering the surface of our eyes, he said.
The reaction with the water means that sulphuric acid is formed in a very small amount, which irritates our tear glands, he explained.
Dr Mellor explains that not all onions will make us cry, however.
There is plenty of scientific debate as to why this is the case, but one theory says that the pungency of an onion depends on how much sulphur the vegetable has absorbed from the soil it grew in.
The higher the sulphur content of the soil, the more likely to make us cry, the theory states.
Dr Mellor says that sweeter onions, such as red onions, don't tend to make us cry as much as other types, as they have less of the compounds that produce the tear-inducing propanthial s-oxide.
And he explained that other vegetables in the same family, such as garlic, don't make us cry because they contain different compounds that don't break down to produce the chemical that makes us tear up.
HOW CHEFS COMBAT ONION TEARS
via GIPHY
Chefs apparently stop themselves from tearing up when chopping onions but using a very sharp knife to cause less damage to the walls of the vegetable, chill the onions before cutting them and run the air conditioning.