Saving identity
The saving identity or the saving-investment identity is a concept in national income accounting stating that the amount saved in an economy will be the amount invested in new physical machinery, new inventories, and the like. More specifically, in an open economy (an economy with foreign trade and capital flows), private saving plus governmental saving (the government budget surplus or the negative of the deficit) plus foreign investment domestically (capital inflows from abroad) must equal private physical investment. In other words, the flow variable investment must be financed by some combination of private domestic saving, government saving (surplus), and foreign saving (foreign capital inflows). This is an "identity", meaning it is true by definition. This identity only holds true because investment here is defined as including inventory accumulation, both deliberate and unintended. Thus, should consumers decide to save more and spend less, the fall in demand would lead to an increase in business inventories. The change in inventories brings saving and investment into balance without any intention by business to increase investment. Also, the identity holds true because saving is defined to include private saving and "public saving" (actually public saving is positive when there is budget surplus, that is, public debt reduction). As such, this does not imply that an increase in saving must lead directly to an increase in investment. Indeed, businesses may respond to increased inventories by decreasing both output and intended investment. Likewise, this reduction in output by business will reduce income, forcing an unintended reduction in saving. Even if the end result of this process is ultimately a lower level of investment, it will nonetheless remain true at any given point in time that the saving-investment identity holds. Algebraic statement

Closed economy identity 
In a closed economy with government, we have:

This means that the remainder of aggregate output (), after subtracting consumption by individuals () and government (), must equal investment (). However, it is also true that:

T is the amount of taxes levied. This equation says that saving () is equal to disposable income () minus consumption (). Combining both expressions (by solving for  on one side and equating), gives:

Investment as equal to savings is the basis of the investment-savings theory. Open economy identity 
In an open economy, a similar expression can be found. The national income identity is:

In this equation,  is the balance of trade (exports minus imports). Private saving is still , so again combining (by solving for  on one side and equating) gives:

Intended and unintended investment

In the above equations,  is total investment, both intended and unintended (with unintended investment being unintended accumulation of inventories). With this interpretation of , the above equations are identities: they automatically hold by definition regardless of the values of any exogenous variables. If  is redefined as only intended investment, then all of the above equations are no longer identities but rather are statements of equilibrium in the goods market. Views from classical macroeconomic theorists

Adam Smith 

Adam Smith notes this in The Wealth of Nations and it figures into the question of general equilibrium and the general glut controversy. In the general equilibrium model savings must equal investment for the economy to clear. The economy grows as division of labor increases productivity of laborers. This increased productivity in laborers creates a surplus that will be split between capitalists’ expenditure on goods for themselves and investment in other capital. The accumulation of saving and parsimony of capitalists leads to greater increases in capital which leads to a more productive state. Smith advocates this parsimony of profit as a virtue. Smith provides the example of the colonial United States for the positive relationship between the wage fund and investment in capital. He says that England is a much more wealthy economy than anywhere in America; however, he believes that the true wealth lies within the market for wage funds and the growth rate of the population. The colonies have a much higher wage rate than England due to a lower cost of provisions and necessities to survive, which result in a higher competition for human capital among the “masters” of the economy, which in turn raises the wage rate and increases the wage fund. The core of this phenomenon is why Adam Smith believes in the saving-investment identity. The reason why wages go up and there is competition between employers is the result of a constant influx of capital that is equal to or greater than the rate at which the amount of labor increases. David Ricardo 

To understand why Ricardo’s view of the saving-investment identity differed from Smith’s, one must first examine Ricardo’s definition of rent. This rent adds no new value to society, but since land-owners are profit seeking, and since population is increasing in this time of growth, land that yields beyond the value of sustenance for workers is sought out and the return on those pieces of land suffers and lower rent. This is the basis for what Ricardo believed about the saving-investment identity. He agreed with Smith that parsimony and saving was a virtue, and that saving and investment were equal, but he introduced the notion that returns diminish as population decreases. The diminished rate of return results in something Ricardo calls the stationary state, which is when eventually a minimum profit rate is reached at which new investment (i.e., additional capital accumulation) ceases. As long as profits are positive, the capital stock is increasing, and the increased demand for labor will temporarily increase the average wage rate. But when wage rates rise above subsistence population increases. A larger population requires a greater food supply, so that, barring imports, cultivation must be extended to inferior lands (lower rent). As this occurs, rents increase and profits fall, until ultimately the stationary state is reached. References 

National accounts