Consider the following setting: $n$ firms simultaneously choose their individual output level $q_i$. The market clearing price is determined by the total sum of outputs and the firms aim to maximize their profit which is given by revenue minus total costs. (Think of the market price being determined through an auction.) What is the Nash equilibrium of outputs if marginal costs are not necessarily equal?

In this note, I will present a matrix formulation for this problem. This note shows how matrices can be used to find solutions to otherwise tenacious optimization problems in economics.

Let aggregate demand be given by

$$p^{D}(\pmb{q}) = A-b\sum_{i} q_{i},$$

where $A, b > 0$ and $\pmb{q}$ is a $n\times1$ vector of quantities. Each firm $i$ maximizes its profit

$$ \pi_{i} = \underbrace{p^{D}(\pmb{q}) q_{i}}_{\text{revenue}} - \underbrace{c_{i}q_{i}}_{\text{total costs}}, $$

where $c_i$ is the firm's marginal cost of production. There are no fixed costs of production.

Each firm can only choose $q_i$, but it has to take all the other quantities as given. The simultaneous maximum of profits is the Nash equilibrium of the Cournot oligopoly. This gives rise to the following set of $n$ first order conditions:

\begin{align*} 0 &= \frac{\partial p^{D}(\pmb{q})}{\partial q_{i}}q_{i} + p^{D}(\pmb{q}) - c_{i} \hspace{0.5cm}&\forall i\\ &= A-b\sum_{i} q_{i} - b q_{i} - c_{i} &\forall i \end{align*}Let us now investigate these first order conditions more closely. Each firm's quantity, $q_i$, appears twice in *its* first order condition, but only once in all of the other firm's FOCs. Thus, the full set of FOCs is as follows:

or, equivalently,

\begin{align*} \begin{array}{rcrcrcrrrr} b(2q_{1}&+&q_{2}&+&\cdots&+&q_{n}) &= A-c_{1}\\ b(q_{1}&+&2q_{2}&+&\cdots&+&q_{n}) &= A-c_{2}\\ &&&&\vdots\\ b(q_{1}&+&q_{2}&+&\cdots&+&2q_{n}) &= A-c_{n} \end{array} \end{align*}By recognizing the sums and products, we can assemble these FOCs in matrix form:

\begin{align*} \underbrace{b \begin{pmatrix} 2 & 1 & \cdots & 1\\ 1 & 2 & \ddots & \vdots\\ \vdots & \ddots & \ddots & 1\\ 1 & \cdots & 1 & 2 \end{pmatrix}}_{\pmb{M}} \underbrace{\begin{bmatrix} q_{1}\\ q_{2}\\ \vdots\\ q_{n}\\ \end{bmatrix}}_{\pmb{q}} &= \underbrace{\begin{bmatrix} A-c_{1}\\ A-c_{2}\\ \vdots\\ A-c_{n}\\ \end{bmatrix}}_{\pmb{R}} \end{align*}Note that our aim is to find $\pmb{q}$. Now that our FOCs can be expressed in matrix form,

$$ \pmb{M} \pmb{q} = \pmb{R}, $$we may use matrix operations to solve for $\pmb{q}$ (which is then the Cournot-Nash equilibrium, denoted by $\pmb{q}^C$). What immediately comes to mind is to pre-multiply the inverse of $\pmb{M}$. It would then follow that

\begin{align*} \pmb{M}^{-1}\pmb{M}\pmb{q} &= \pmb{M}^{-1}\pmb{R},\\ \pmb{q}^{C} &= \pmb{M}^{-1}\pmb{R}. \end{align*} Using the fact that the inverse of a scalar times an invertible matrix is just the reciprocal of the scalar times the inverse of the matrix, we have \begin{align*} \pmb{M}^{-1} &= \dfrac{1}{b} \begin{pmatrix} 2 & 1 & \cdots & 1\\ 1 & 2 & \ddots & \vdots\\ \vdots & \ddots & \ddots & 1\\ 1 & \cdots & 1 & 2 \end{pmatrix}^{-1}. \end{align*}It can be shown that

\begin{align*} \pmb{M}^{-1} &= \frac{1}{b(n+1)}\begin{pmatrix} n & -1 & \cdots & -1\\ -1 & n & \ddots & \vdots\\ \vdots & \ddots & \ddots & -1\\ -1 & \cdots & -1 & n \end{pmatrix} \end{align*}is the required inverse. (I found this matrix by thinking about the structure of $\pmb{M}$ and experimenting a little bit. However, it is trivial to directly prove that the inverse is correct, and therefore the proof is left to you, the reader.)

Now that we have found $\pmb{M}^{-1}$, the Cournot-Nash equilibrium follows as

\begin{align*} \pmb{q}^{C} &= \pmb{M}^{-1}\pmb{R},\\ &= \frac{1}{b(n+1)}\begin{pmatrix} n & -1 & \cdots & -1\\ -1 & n & \ddots & \vdots\\ \vdots & \ddots & \ddots & -1\\ -1 & \cdots & -1 & n \end{pmatrix} \begin{bmatrix} A-c_{1}\\ A-c_{2}\\ \vdots\\ A-c_{n}\\ \end{bmatrix}\\ &= \frac{1}{b(n+1)}\begin{bmatrix} n(A-c_{1}) - (A-c_{2}) - (A-c_{3}) - \cdots - (A-c_{n})\\ n(A-c_{2}) - (A-c_{1}) - (A-c_{3}) - \cdots - (A-c_{n})\\ \vdots\\ n(A-c_{n}) - (A-c_{1}) - (A-c_{2}) - \cdots - (A-c_{n-1})\\ \end{bmatrix}\\ &= \frac{1}{b(n+1)}\begin{bmatrix} n(A-c_{1}) - (n-1)A + \sum_{j \neq 1} c_{j}\\ n(A-c_{2}) - (n-1)A + \sum_{j \neq 2} c_{j}\\ \vdots\\ n(A-c_{n}) - (n-1)A + \sum_{j \neq n} c_{j}\\ \end{bmatrix}\\ &= \frac{1}{b(n+1)}\begin{bmatrix} A -nc_{1} + \sum_{j \neq 1} c_{j}\\ A -nc_{2} + \sum_{j \neq 2} c_{j}\\ \vdots\\ A -nc_{n} + \sum_{j \neq n} c_{j}\\ \end{bmatrix}\\ &= \frac{1}{b(n+1)}\begin{bmatrix} A -(n+1)c_{1} + \sum_{i} c_{i}\\ A -(n+1)c_{2} + \sum_{i} c_{i}\\ \vdots\\ A -(n+1)c_{n} + \sum_{i} c_{i}\\ \end{bmatrix}\\ &= \frac{1}{b} \begin{bmatrix} \frac{A + \sum_{i} c_{i}}{n+1} - c_{1}\\ \frac{A + \sum_{i} c_{i}}{n+1} - c_{2}\\ \vdots\\ \frac{A + \sum_{i} c_{i}}{n+1} - c_{n}\\ \end{bmatrix} \end{align*}Thus, we find that for each firm $i = 1, \dots, n$ it is optimal to choose the following output level:

$$q_i = \frac{1}{b} \left( \frac{A + \sum_{j} c_{j}}{n+1} - c_i \right),$$which is equal to the (perhaps well known) solution to the asymmetric Cournot oligopoly.

Note that the firm will only produce a positive amount if $\frac{A + \sum_{i} c_{i}}{n+1} > c_i$; we will assume that this is the case. The firm may choose not to produce anything if its marginal cost is too high. But then again, the firm will have to rely on its competitors to follow the Nash equilibrium, as otherwise the price may be pushed so far down that losses are incurred after the good is auctioned off. But the other firms will follow the Nash equilibrium, as not doing so would not be profit-maximizing.

For example, for $n = 2$ and $c \equiv c_1 = c_2$, this reduces to

$$ q_i = \frac{1}{b} \left( \frac{A + 2 c}{3} - c \right) = \frac{A-c}{3b}, $$which is known to be the solution for the *symmetric* Cournot *duopoly*. It is, I am willing to posit, one of the few age-old adages of economics, known since time immemorial.

We can find total output by summing over all $q_i$,

\begin{align*} Q^C &= \sum_i q_i\\ &= \sum_i \frac{1}{b} \left( \frac{A + \sum_{j} c_{j}}{n+1} - c_i \right)\\ &= \frac{1}{b} \sum_i \left( \frac{A + \sum_{j} c_{j}}{n+1} - c_i \right)\\ &= \frac{1}{b} \left(\sum_i \frac{A + \sum_{j} c_{j}}{n+1} - \sum_i c_i \right)\\ &= \frac{1}{b} \left(\frac{n}{n+1} \left( A + \sum_{j} c_{j} \right) - \sum_i c_i \right)\\ &= \frac{1}{b} \left(\frac{n A - \sum_{j} c_{j}}{n+1}\right). \end{align*}The market clearing price is found by

\begin{align*} p^{D}(\pmb{q}^C) &= A-b\sum_{i} q_{i}^C\\ &= A - b Q^C\\ &= A-\frac{n A - \sum_{j} c_{j}}{n+1}\\ &= \frac{A + \sum_{i} c_{i}}{n+1}, \end{align*}which for large $n$ has a very nice approximate interpretation as $p \approx a + \overline{c}$ with $a = A/n$ and $\overline{c} = {\sum_{j} c_{j}}/n$, i.e. average marginal cost.