A mathematical approach to GDP

The concept of a nation's GDP is very intriguing, as it is just the sum of expenditures, such that this sum is earned by everyone in the nation.[br][br]It is simply calculated as[br][math]GDP=C+I+G+NX[/math], where C represents Household Consumption, I represents Private Firms' Investment, G represents Government Purchases, and NX stands for Net Exports (which is the difference between exports and imports).[br][br]Yet, I think that this formula for GDP can be 'refined', using the matrix notions.
Introducing Aggregate Expenditure
I argue that GDP is easily calculated as the expenditure of all entities in the economy.[br]If every entity expends, then every entity earns. They earn as much as the sum of revenues from commerce, so we have that:[br][math]AE=\sum\left(price_i\right)\cdot\left(quantity_i\right)[/math], where [i]i[/i] stands for every item traded in the economy. This equation says that Aggregate Expenditure is the sum of the product the price and the quantity of each item.[br]This implies that GDP also has the same form as Aggregate Expenditure.[br][br]Letting price be represented as a row matrix, and quantity as a column matrix, we see their product is the equation given for [i]AE.[/i]
Using Matrices to simplify Multiplication
Aggregate Expenditure is not GDP
Aggregate Expenditure in an economy consists of the trade of imported goods and/or services. But, this expenditure flows out to foreign firms, so it must be deducted from AE.[br][br]We can accomplish this by assuming the expenditure on imported goods and/or services is a fraction of Aggregate Expenditure. So that we'll have that:[br][math]M_i=AE\cdot f_i[/math], for each item [i]i[/i], where M represents imports.[br][br]We also know that local private firms are exporting, and earning revenue in the same form as AE.[br]So, we have that GDP is the sum of Non-Imported Aggregate Expenditure and Exports:[br][math]GDP=\left(1-M\right)AE+X[/math]
What if we don't want to lump all expenditures together?
I understand that the Expenditure formula's purpose for GDP is to distinguish household consumption from expenditures from firms and government. To refine the approach, we can write:[br]
A (3 by n) dimensional AE matrix
Then we could add the net exports matrix.[br][br]This is how to calculate GDP using the matrices notion.

Information: A mathematical approach to GDP