Effective demand

GDP is measured by five elements.
They are “private consumption,” “gross investment,” “government spending,” “exports” and “imports,” that is, GDP=private consumption + gross investment + government spending + (exports − imports)
When economy goes into depression, consumption and investment would be decreasing.
Then GDP also goes down.
At that time, government spending would be expected to be used more and more.
A shortage of demand could be compensated only by government spending.