Why is GDP equal to the sum of revenues? National Income can be expressed in two ways :


In can be derived from the GDP, as, roughly, a sum of "money spent" : GDP is equal to C + G + I + NX, where C, G, I and NX are houshold consumption, government expenditures, investment, and net exports. National Income is then obtained by adding net income from abroad and removing consumption of fixed capital.
It can be calculated as the sum of incomes (details here) : mainly pre-tax employee compensation, pre-tax corporate profits, and taxes on production and imports.


The fact that the two ways give the same results (let alone the "statistical discrepancy") is usually taken for granted.

Of course the principle makes sense, but I am looking for a rigorous approach / mathematical proof.


One could say that whatever agents earn, they spend. But what if they spare some money ?
One could say that whatever is spent, is earned by some agent. But I tried this and couldn't get rid of the 'I' in the first formula.


Could somebody enlighten me ?
It is right that the whole savings are invested. 

You can use the (simplified) national income and the national output to show the equality. 

The national income is $NI=S+I$

The national product is equal to the national income: $NP=NI$

The national product is equal to the sum of consumption and investment: $NP=C+I$

By using this three equations it can be shown, that $I=S$.

This presumption is made for the IS-Curve at the IS-LM-Model.