A subsidy is a grant given by the government to producers to encourage the production of a good.
A subsidy lowers a producer’s costs and causes an increase in supply so the supply curve shifts right. A subsidy causes price to fall and output to rise. Prices do not fall by the full extent of the subsidy though because producers’ costs rise as output rises so some of the subsidy must be used to cover these higher costs.
A subsidy shifts the supply curve right, lowers price from P* to P’ and raises output from Q* to Q’. Consumers receive the red area in subsidies because price is lower. Producers receive the rest of the subsidy equal to the blue area. The total cost of the subsidy to the government is the red and blue areas combined.
A more elastic (inelastic) demand causes producers (consumers) to receive more of the subsidy.
When demand is elastic, producers receive the majority of the subsidy equal to the blue area, consumers receive a little bit of the subsidy equal to the red area.