The total spending by residents within a country, on either domestic or imported goods and services, is defined as:
where is consumption of domestic and imported goods and services by domestic residents, is the amount of investment and is government spending.
This implies that the total spending by residents within a country only on domestically produced goods and services is:
where is the spending on imports. As goods can also be exported, for the total spending on domestically produced goods and services produced within a country, we need to add exports such that:
Since GDP is defined as the market value of domestic production, we have
Which often is re-arranged such that:
as represents net exports.