In the above diagram we see that when the government imposes a tax, price will have to rise from Pe to Pt in order for the producer to be able to afford the tax. However, the producer being a rational actor doesnt want to have the excess supply caused by the reduced demand due to the higher price caused by the tax so he reduces production shifting the supply curve from S to S1. As a result there is loss in both producer and consumer surplus. Since demand is more elastic than supply and consumers are more sensitive to price changes the producer cant afford to make significant increases in price without losing market share and subsequently reducing his profits. Thus the greatest incidence of taxation will be paid by the producer which is illustrated by the yellow box whereas a smaller amount, illustrated by the blue box will be paid by the consumer. So the producer will pay Pp-Pe which is greater than Pe-Pt which is paid by the consumer. However the reduction in production will mean that there will be a d ead weight loss. This is a reduction in welfare due to the fact that a certain amount of the good isnt produced at all and is illustrated by the triangle ABC. The incidence of taxation is born by the producer is industries with elastic demand like the food industry or the clothing industry.
On the other hand if supply is more elastic than demand the results are presented in the following diagram.
In the above diagram we see that again the higher prices caused by the imposition of tax lead the producer to reducing supply so that he doesnt have to suffer from the lower prices brought by excess supply since demand at a higher price will, even if by a small margin, be reduced. Again we see the dead weight loss suffered in the economy due to the imposition of tax as well as the reduction of quantity produced from Qe to Qt. However, this time because consumers are more insensitive to price changes the producer makes them pay the greatest incidence of taxation illustrated by the blue box and they pay a significantly lower amount illustrated by the yellow box. So this time producer pays Pp-Pe which is smaller than Pt-Pe which is the proportion of the tax paid by the consumer.