Explain the theory of determination of income

Explain the theory of determination of income and employment with the help of Aggregate Demand and Aggregate Supply curves.
or
Why must Aggregate Demand be equal to Aggregate Supply at the equilibrium level of income and output? Explain with the help of a diagram.

In an economy, equilibrium level of income and employment is determined when AD (Aggregate Demand) is equal to AS (Aggregate Supply). According to Keynes, AS may be assumed to be elastic in an economy where full employment (of resources) is yet to be achieved. Accordingly, AD becomes the principal determinant of equilibrium level of income.

In the following figure, AD represents Aggregate Demand curve and 45° line is the line of reference, where AS =Y. Equilibrium level of income Y is determined at point E, where AD = AS. Prior to point E, Aggregate Demand exceeds Aggregate Supply, leading to an increase in level of income up to point E. Beyond point E, Aggregate Supply exceeds Aggregate Demand leading to a fall in income back towards point E.
It is only when AS = AD, that the equilibrium is struck. Because the equality between AS and AD implies that the desired level of output in the economy (as indicated by AS) is exactly equal to the desired level of expenditure (indicated by AD) in the economy. So that, the entire output as planned by the producers (during an accounting year) is purchased by the buyers. There are no undesired or unwanted inventories (stock of goods) with the producers.