# 12.1 The “Inverse Demand” Curve Facing a Firm

In the last chapter, we derived the cost function for a firm: for *any* quantity of output $q$ we determined the total cost $c(q)$ of producing that quantity. From that function, in turn, we determined the firm’s average cost $AC(q) = c(q)/q$ and marginal cost $MC(q) = c’(q)$.

In this chapter, we’ll determine the firm’s *optimal* quantity $q^\star$ to produce. We’re going to assume that the firm is trying to maximize its **profit**, which we’ll write as $\pi(q)$, which is the revenue it receives from selling $q$ units, $r(q)$, minus the cost of producing those $q$ units, $c(q)$:
\(\pi(q) = r(q) - c(q)\)
We will assume that the firm sets a **single price** $p$, at which it sells all of its units. In particular, this means that we’re *not* thinking about a firm like an airline or movie theater that might sell the same product (a seat) to different customers for a different price. (That’s called “price discrimination,” and we’ll get to it much later.)

Furthermore, we will assume that the price the firm can charge may depend on the quantity of output it wants to sell: that is, if it produces $q$ units, the most it can charge is given by some function $p(q)$. Note that this is related to the notion of a “demand function,” but a demand function describes *consumers’ behavior* as a response to price: that is, $D(p)$ gives the quantity demanded by consumers when the price is $p$. Because we’re thinking of this from the firm’s perspective, we reverse the logic: we think of the price $p$ the firm could charge as a function of the number of units it wants to sell, $q$. For this reason we call it an “inverse demand function,” or, when plotted, an “inverse demand curve:”

In general, we might imagine that a firm faces a *downward-sloping* inverse demand curve: that is, if it wants to sell more units, it needs to lower its price. However, there’s an important special case to consider: the case of a “competitive” or “price taking” firm.