# In perfect competition, why is there economic loss if marginal cost > marginal revenue?

Here's a graph for reference:

In the left graph, I read from a book (CFA L1 notes) that

At any output above the quantity where $$MR = MC$$, the firm will be generating losses on its marginal production and will maximize profits by reducing output to where $$MR = MC$$."

But now consider this:

$$Q'$$ is an output level above the one at which $$MC=MR$$. Shouldn't the yellow region represent a positive economic profit in this case? I can understand that at any output level above the one at which $$ATC=MR$$, the firm would start making losses. But isn't the quote above incorrect, or am I missing something? Sure, you might be making a suboptimal profit at output $$= Q’$$, but you’re certainly not making an outright loss.

In perfect competition, $$MR=P$$.
When $$MC>P$$, marginally you're generating losses but you may still be profitable overall. This is represented by your (positive) yellow area, which is smaller than the blue area (the optimal one).