<p>The profit of a firm <span class="math-container">$i$</span> is given by:
<span class="math-container">$$
\pi_i(p) = p q_i - C_i(q_i)
$$</span>
where <span class="math-container">$p$</span> is the price, <span class="math-container">$q$</span>_i is the output of firm <span class="math-container">$i$</span> and <span class="math-container">$C_i(.)$</span> is the cost function which differs across firms.</p>
<p>The first order condition gives:
<span class="math-container">$$
p = \frac{\partial C_i(q_i)}{\partial q_i} = MC_i(q_i^\ast)
$$</span>
This shows how to obtain the optimal supply of firm <span class="math-container">$i$</span>, i.e. where <span class="math-container">$MC(q_i^\ast)$</span> is equal to <span class="math-container">$p$</span> (see figures a,b and c in the question).</p>
<p>Total profits for the firm is then:
<span class="math-container">$$
\begin{align*}
\pi_i(p) &amp;= pq_i^\ast - C_i(q_i^\ast),\\
&amp;= \left(p - \frac{C_i(q_i^\ast)}{q_i^\ast}\right)q_i^\ast,\\
&amp;= \left(MC(q_i^\ast) - AC(q_i^\ast)\right) q_i^\ast.
\end{align*}
$$</span>
This corresponds to the shaded areas in figures a,b and c in the question: the areas equal the difference between <span class="math-container">$MC(q_i^\ast)$</span> and <span class="math-container">$AC(q_i^\ast)$</span> multiplied by <span class="math-container">$q_i^\ast$</span>.</p>
<p>Now, consider the first order condition:
<span class="math-container">$$
p = MC_i(q_i^\ast). 
$$</span>
We can invert this function to obtain the supply curve of firm <span class="math-container">$i$</span>:
<span class="math-container">$$
q_i(p) = q \text{ whenever } p = MC_i(q).
$$</span>
The total supply in the market at price <span class="math-container">$p$</span> is determined by adding the supply curves of over all firms.
<span class="math-container">$$
Q(p) = \sum_i q_i(p).
$$</span>
Notice that, as usual in economics, figure d in the question draws the supply and demand curves wrong, as they put <span class="math-container">$p$</span> on the vertical axis and <span class="math-container">$q$</span> on the horizontal. Mathematically, the two should be switched.</p>
<p>If we would do it correctly, it should look something like this:
<a href="https://i.sstatic.net/bmlZg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bmlZg.png" alt="producer surplus" /></a></p>
<p>If <span class="math-container">$p^\ast$</span> is the equilibrium price, then the producer surplus is given by:
<span class="math-container">$$
PS = \int_0^{p^\ast} Q(p) dp = \sum_i \int_0^{p^\ast} q_i(p) dp
$$</span>
Now let us make a change of variables <span class="math-container">$p \to q$</span>, where <span class="math-container">$p = MC_i(q)$</span>. Then <span class="math-container">$dp = \frac{\partial MC_i(q)}{\partial q} dq$</span>  so:
<span class="math-container">$$
\int_0^{p^\ast} q_i(p) dp = \int_0^{q_i^\ast} q \frac{\partial MC_i(q)}{\partial q} dq.
$$</span>
Then use integration by parts to get:
<span class="math-container">$$
\begin{align*}
\int_0^{q_i^\ast} q \frac{\partial MC_i(q)}{\partial q} dq &amp;= \left[q MC_i(q)\right]^{q_i^\ast}_0 - \int_0^{q_i^\ast} MC_i(q) dq,\\
&amp;= q_i^\ast MC_i(q_i^\ast) - C_i(q_i^\ast),\\
&amp;= p^\ast q_i^\ast - C_i(q_i^\ast) = \pi_i^\ast.
\end{align*}
$$</span>
Here we assume <span class="math-container">$C_i(0) = 0$</span> and we used the first order condition to substitute <span class="math-container">$MC_i(q_i^\ast) = p^\ast$</span>. We also used <span class="math-container">$\pi_i^\ast$</span> to denote the profit of firm <span class="math-container">$i$</span> at price <span class="math-container">$p^\ast$</span>. From this:
<span class="math-container">$$
CS = \sum_i \int_0^{p^\ast} q_i(p) dp = \sum_i \pi_i^\ast,
$$</span>
which shows that the consumer surplus indeed equals the sum of all profits in the industry.</p>

CC BY-SA 4.0
2021-05-08T16:57:55.410Z
It is somewhat shady to use the invertability of $MC$, as that is not necessary :)
Giskard
CC BY-SA 4.0
2021-05-08T17:05:58.847Z
Interesting. I inverted the MC as I didn't see any other way to define aggregate supply?
tdm
CC BY-SA 4.0
2021-05-08T17:44:19.873Z
? Supply is defined as inverse of MC when price is above min of AVC and 0 otherwise.
Giskard
CC BY-SA 4.0
2021-05-08T18:11:22.977Z
Agree, I would have been more correct to restrict the supply curve to the region where the MC is above the AC. I just didn't want to make the argument too complicated. Feel free to adjust the answer if you feel like.
tdm
CC BY-SA 4.0
2021-05-12T19:43:19.663Z
What does this line from the book mean: "Equivalence of these areas can be shown by recognizing that each point in the supply curve in Figure 12.11d represents minimum average cost for some firm."?
reasonStore
CC BY-SA 4.0
2021-05-12T21:35:24.700Z
"If p∗ is the equilibrium price, then the producer surplus is given by" - This answer misses the point the author is trying to make. The author wants to derive the definition of producer surplus using Ricardian Rent instead of starting with the definition and then showing equivalence
reasonStore
CC BY-SA 4.0
2021-05-13T12:28:36.800Z
@reasonStore I guess for this you can simply follow the derivation in the reverse direction.
tdm
CC BY-SA 4.0
2021-05-08T16:46:00.360Z
2021-05-08T16:46:00.360Z
tdm
<p>I really can't understand how the sum of the rectangles leads to the sum of the triangle.
My <a href="https://rads.stackoverflow.com/amzn/click/com/938666805X" rel="nofollow noreferrer" rel="nofollow noreferrer">book's</a>(Chapter 12, page 430)  explanation is:</p>
<blockquote>
<p>Equivalence of these areas can be shown by recognizing that <strong>each point
in the supply curve in Figure 12.11d represents minimum average cost</strong>
for some firm. For each such firm, P - AC represents profits per unit
of output. Total longrun profits can then be computed by summing over
all units of output.</p>
</blockquote>
<p>The author doesn't explain how the bold part is valid and its not obvious from the graph as well.</p>
<p><a href="https://i.sstatic.net/V4MJz.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/V4MJz.png" alt="enter image description here" /></a></p>

<price><marginal><long-run>
Equivalence of producer surplus areas
reasonStore
# Equivalence of producer surplus areas

(Asked by: username_0 on 2021-05-08)

I really can't understand how the sum of the rectangles leads to the sum of the triangle.
My [book's](https://rads.stackoverflow.com/amzn/click/com/938666805X)(Chapter 12, page 430) explanation is:

> Equivalence of these areas can be shown by recognizing that **each point
> in the supply curve in Figure 12.11d represents minimum average cost**
> for some firm. For each such firm, P - AC represents profits per unit
> of output. Total longrun profits can then be computed by summing over
> all units of output.

The author doesn't explain how the bold part is valid and its not obvious from the graph as well.

[![enter image description here](https://i.sstatic.net/V4MJz.png)](https://i.sstatic.net/V4MJz.png)

**Tags:** price, marginal, long-run


---

## 1 answers

### Answer by username_1 on 2021-05-08. Score: 4 | Accepted answer

The profit of a firm $i$ is given by:
$$
\pi\_i(p) = p q\_i - C\_i(q\_i)
$$
where $p$ is the price, $q$\_i is the output of firm $i$ and $C\_i(.)$ is the cost function which differs across firms.

The first order condition gives:
$$
p = \frac{\partial C\_i(q\_i)}{\partial q\_i} = MC\_i(q\_i^\ast)
$$
This shows how to obtain the optimal supply of firm $i$, i.e. where $MC(q\_i^\ast)$ is equal to $p$ (see figures a,b and c in the question).

Total profits for the firm is then:
$$
\begin{align\*}
\pi\_i(p) &= pq\_i^\ast - C\_i(q\_i^\ast),\\
&= \left(p - \frac{C\_i(q\_i^\ast)}{q\_i^\ast}\right)q\_i^\ast,\\
&= \left(MC(q\_i^\ast) - AC(q\_i^\ast)\right) q\_i^\ast.
\end{align\*}
$$
This corresponds to the shaded areas in figures a,b and c in the question: the areas equal the difference between $MC(q\_i^\ast)$ and $AC(q\_i^\ast)$ multiplied by $q\_i^\ast$.

Now, consider the first order condition:
$$
p = MC\_i(q\_i^\ast).
$$
We can invert this function to obtain the supply curve of firm $i$:
$$
q\_i(p) = q \text{ whenever } p = MC\_i(q).
$$
The total supply in the market at price $p$ is determined by adding the supply curves of over all firms.
$$
Q(p) = \sum\_i q\_i(p).
$$
Notice that, as usual in economics, figure d in the question draws the supply and demand curves wrong, as they put $p$ on the vertical axis and $q$ on the horizontal. Mathematically, the two should be switched.

If we would do it correctly, it should look something like this:
[![producer surplus](https://i.sstatic.net/bmlZg.png)](https://i.sstatic.net/bmlZg.png)

If $p^\ast$ is the equilibrium price, then the producer surplus is given by:
$$
PS = \int\_0^{p^\ast} Q(p) dp = \sum\_i \int\_0^{p^\ast} q\_i(p) dp
$$
Now let us make a change of variables $p \to q$, where $p = MC\_i(q)$. Then $dp = \frac{\partial MC\_i(q)}{\partial q} dq$ so:
$$
\int\_0^{p^\ast} q\_i(p) dp = \int\_0^{q\_i^\ast} q \frac{\partial MC\_i(q)}{\partial q} dq.
$$
Then use integration by parts to get:
$$
\begin{align\*}
\int\_0^{q\_i^\ast} q \frac{\partial MC\_i(q)}{\partial q} dq &= \left[q MC\_i(q)\right]^{q\_i^\ast}\_0 - \int\_0^{q\_i^\ast} MC\_i(q) dq,\\
&= q\_i^\ast MC\_i(q\_i^\ast) - C\_i(q\_i^\ast),\\
&= p^\ast q\_i^\ast - C\_i(q\_i^\ast) = \pi\_i^\ast.
\end{align\*}
$$
Here we assume $C\_i(0) = 0$ and we used the first order condition to substitute $MC\_i(q\_i^\ast) = p^\ast$. We also used $\pi\_i^\ast$ to denote the profit of firm $i$ at price $p^\ast$. From this:
$$
CS = \sum\_i \int\_0^{p^\ast} q\_i(p) dp = \sum\_i \pi\_i^\ast,
$$
which shows that the consumer surplus indeed equals the sum of all profits in the industry.

> **Comments:**
> **username_2**: It is somewhat shady to use the invertability of $MC$, as that is not necessary :)  
> **username_1**: Interesting. I inverted the MC as I didn't see any other way to define aggregate supply?  
> **username_2**: ? Supply is defined as inverse of MC when price is above min of AVC and 0 otherwise.  
> **username_1**: Agree, I would have been more correct to restrict the supply curve to the region where the MC is above the AC. I just didn't want to make the argument too complicated. Feel free to adjust the answer if you feel like.  
> **username_0**: What does this line from the book mean: "Equivalence of these areas can be shown by recognizing that each point in the supply curve in Figure 12.11d represents minimum average cost for some firm."?  
> **username_0**: "If p∗ is the equilibrium price, then the producer surplus is given by" - This answer misses the point the author is trying to make. The author wants to derive the definition of producer surplus using Ricardian Rent instead of starting with the definition and then showing equivalence  
> **username_1**: @username_0 I guess for this you can simply follow the derivation in the reverse direction.  

---

