If all the food in the world were shared out evenly, there would be enough to go around. That has been true for centuries now - if food was scarce, the problem was that it wasn't in the right place.
But there was no global shortage. However, that will not be true much longer.
The food riots began in Algeria more than a week ago, and they are going to spread. During the last global food shortage, in 2008, there was serious rioting in Mexico, Indonesia and Egypt. We may expect to see that again, only more widespread.
Most people in these countries live in a cash economy and a large proportion live in cities. They buy their food, they don't grow it. That makes them vulnerable, because they have to eat almost as much as people in rich countries do but their incomes are much lower.
The poor, urban multitudes in these countries (including China and India) spend up to half of their entire income on food, compared with only about 10 per cent in rich countries.
When food prices soar, these people quickly find that they simply lack the money to go on feeding themselves and their children properly - and food prices now are at an all-time high.
"We are entering a danger territory," said Abdolreza Abbassian, chief economist at the Food and Agriculture Organisation. The price of a basket of cereals, oils, dairy, meat and sugar that reflects global consumption patterns has risen steadily for six months, and has just broken through the previous record, set during the last food panic in June 2008.
"There is still room for prices to go up much higher," Abbassian said, "if, for example, the dry conditions in Argentina become a drought, and if we start having problems with winter kill in the Northern Hemisphere for the wheat crops."
After the loss of at least a third of the Russian and Ukrainian grain crop in last summer's heat wave and the devastating floods in Australia and Pakistan, there's no margin for error left. It was Russia and India banning grain exports in order to keep domestic prices down that set the food prices on the international market soaring.
Most countries cannot insulate themselves from this global price rise because they depend on imports for a lot of domestic consumption.
But that means that a lot of their population cannot buy enough food for their families, so they go hungry. Then they get angry, and the riots start. Is this food emergency a result of global warming? Maybe, but all these droughts, heat waves and floods could also just be a run of really bad luck. What is nearly certain is that the warming will continue, and that in the future there could be many more weather disasters because of climate change.
Global food prices are already spiking whenever there are a few local crop failures, because the supply barely meets demand even now. As the emerging economies grow, Chinese, Indian and Indonesian citizens eat more meat, which places a great strain on grain supplies. Moreover, the world population is now passing through 7 billion, on its way to 9 billion by 2050. We will need a lot more food.
Some short-term fixes are possible. If the United States Government ended the subsidies for growing maize (corn) for "bio-fuels", it would return about a quarter of US crop land to food production.
If people ate a little less meat, if more African land was brought into production, if more food was eaten and less was thrown away, then maybe we could buy ourselves another 15 or 20 years before demand really outstripped supply.
On the other hand, about a third of all the irrigated land in the world depends on pumping groundwater up from aquifers that are depleting rapidly. When the flow of irrigation water stops, the yield of that highly productive land will drop hugely. Desertification is spreading in many regions and a large amount of good agricultural land is simply being paved over each year. We have a serious problem here.
Climate change is going to make the situation immeasurably worse. The modest warming that we have experienced so far may not be the main cause of the floods, droughts and violent storms that have hurt this year's crops, but the rise in temperature will continue because we cannot find the political will to stop the greenhouse-gas emissions.
A rule of thumb is that we lose about 10 per cent of world food production for every rise of 1C in average global temperature. So the shortages will grow and the price of food will rise inexorably over the years. The riots will return.
In some places the rioting will turn into revolution. In others, the rioters will become refugees and push up against the borders of countries that don't want to let them in.
Or maybe we can get the warming under control before it does too much damage.
Gwynne Dyer is an independent journalist based in London.