Final answer:
A tax decreases consumer surplus and producer surplus, while increasing government revenue. A subsidy increases consumer surplus and producer surplus, while decreasing government revenue. Both tax and subsidy affect welfare and can result in deadweight loss.
Step-by-step explanation:
When a tax or subsidy is implemented, it affects consumer surplus, producer surplus, government revenue, welfare, and deadweight loss.
A tax decreases consumer surplus as it increases the price that consumers have to pay, reducing the quantity demanded. Producer surplus also decreases as producers receive a lower price for their goods. The government, however, collects revenue from the tax. Welfare is reduced due to the decrease in consumer and producer surplus.
On the other hand, a subsidy increases consumer surplus as it lowers the price consumers have to pay, increasing the quantity demanded. Producer surplus also increases as producers receive a higher price. The government pays the subsidy, leading to a decrease in government revenue. Welfare increases due to the increase in consumer and producer surplus.