The area which is below the demand function
and above the equilibrium price
is your consumer surplus.
Now how does this consumer surplus arise?
Well, demand function is really measuring
the willingness to pay of a consumer.
So, if a consumer is willing to pay this price
say 250
but he only has to pay $200 which is the market price
then this difference between 
the maximum he's willing to pay
and the market price, is the consumer surplus
So that's true for the whole demand 
function which lies above the market price
Now the producer surplus is the area below the
equilibrium price and above the supply function
The supply function is measuring the 
minimum cost of producing the good
or minimum price at which the 
supplier is willing to supply the good
Now if at this point he's willing 
to supply the good at say 151
but he actually gets a price of $200 in the market
so this extra surplus that he gets
is the producer surplus
What happens when you 
impose a tax on the supplier is
that now when the producers think about
think about the price at which 
they're willing to supply the good at
they are going to include the taxes 
that have been imposed on them
So the $20 tax has been 
imposed on the supplier, then
he would be willing to sell 
let's assume we are at this point
Initially he was willing to sell this good at 190
but now because he has to pay $20 in taxes
he's going to be supplying this amount of good at 190
which is the cost of producing the good, plus $20
which he has to pay in taxes
So he's willing to supply the good at 210
So what happens is that
the supply function moves up by the amount of $20
Now what is the market equilibrium price
now that the taxes have been imposed?
It is where the demand function 
and the supply + tax function intersect
So the market price here is $210
So this is what the consumer is paying for the good
So what is the consumer surplus?
Well it's the area under the demand function
above the market price - this region
this green region is consumer surplus
As you can see the consumer surplus has now diminished
The market output has also gone down
There used to be 5000 MP3 players
 in the market
Now there are 4000 MP3 players in 
the market at this equilibrium price
Now what's happened to the producer surplus? Well
at this output
the cost of producing the good
is 190
So what is the price that the producers are getting?
Well they get 210
but they have to pay $20 out of this $210
so they're finally getting $190
So the producer surplus is
the area above the supply function below 190
I repeat
the market price is 210
so producers get 210, but they have
to pay a $20 tax to the government
So it's $210-$20, $190
This is the price the consumers get
So the producer surplus is
the area above the supply function
below the amount that they're receiving
which is $190
Now when does the tax [x] ? Well the tax revenue
put each unit that is sold
the taxes paid are $20
So it's $20 multiplied by the 
amount of goods that are sold
which is 4000
So it actually ends up being the 
height multiplied by the length
which is nothing but the area of this rectangle
which is the tax revenue
That in this case is $20 multiplied by
4000 of MP3 players
so [x]
with pure tax revenue
Now this little triangle that we see
is the amount that goes to no one
It is lost, and this is called the deadweight lost
Remember before the taxes were imposed
the consumer surplus was this whole triangle area
But now it has been diminished 
to this small triangle area
and this amount goes to
the tax revenue - to the government
But what happens to this small triangle?
Well that is your deadweight loss
from the consumption side
And this small triangle side is a deadweight loss
from the production side
So this complete
larger triangle area is your deadweight loss
The dead weight loss is arising
because look at this amount of output
this underproduction of the goods
in this case the MP3 player - 
this underproduction of this good
this underproduction, this level of output
The demand is above the supply function
the [value] that was attached
to this much of output was higher than
the cost of producing the good
[Or] the [social] benefit of this good
is higher in this region
than the cost of producing the good
So this is your deadweight loss
which accrues to no one but disappears
because of underproduction of this good
