**Competitive equilibrium is the situation that occurs when, under conditions of competition where there are enough buyers and sellersan equilibrium price and quantity are established. **

That is, competitive equilibrium is a situation where both buyers and sellers maximize their utility. This is because the sellers manage to sell at the highest price that the market allows, while the plaintiffs manage to buy at the lowest price that the market establishes.

Of course, for competitive equilibrium to be achieved in the market, the supply function must be equal to the demand function. Similarly, for the producer operating in a competitive situation to achieve competitive equilibrium, both his marginal cost and his marginal revenue must equalize. That means that growers manage to produce the optimal volume of production.

## How does competitive equilibrium occur?

So that we can understand how competitive equilibrium occurs, we will explain the following:

First of all, we have to say that the function of supply and demand are mathematical expressions. These expressions can be represented graphically. Also, with them you can calculate both the price and the equilibrium quantity.

Naturally, to be able to graphically represent the demand function, we have to know that the quantity demanded of a certain good is a function of the price that good has in the market.

Therefore, the demand function can be represented in this way:

QD = f(P)

For example, if we suppose that the demand for a good is represented by the following mathematical function:

QD = 800-200(P)

This means that every time the price increases by one unit, the quantity demanded decreases by 200 units. In order to represent the function graphically, we assign values to D and P.

If the price were 0, the quantity demanded is 800.

QD = 800-200(P)

QD = 800-200(0)

QD=800-0=800

The demand function starts at 0 and ends at 800 and its representation will be as shown in the following graph. Likewise, if we want to know what the highest price will be, we must set the quantity demanded equal to zero.

QD = 800-200(P) = 0

800 = 200(P)

P = 4

The highest price will be 4 (when the price is so high that people no longer demand the product).

On the other hand, the supply function can also be represented graphically in competitive equilibrium. Likewise, the quantity supplied of a certain good is a function of the price that good has in the market.

Now, the supply function can be represented in this way:

QS = f(P)

If we had a supply function for a good and we represented it with the following mathematical function:

QS = -100+200(P)

This implies that the quantity supplied increases by 200 units each time the price rises by one unit. In order to represent the function graphically, we assign values to D and P.

If the price were 0, the quantity supplied would be -100 units.

QS = -100+200(P)

QS = -100+200(0)

QS = -100+0= -100

With the highest price being 4, the quantity supplied would be 700 units.

QS = -100+200(P)

QS = -100+200(4)

QS = -100+800 = 700

The offer function starts at -100 and ends at 700 and its graphical representation will be as follows:

Second, with the graphic representation of the supply and demand curve, we can represent the competitive equilibrium. Thus, we can see that the equilibrium price is 2.25 and the equilibrium quantity is 350 units. In competitive equilibrium, the equilibrium price of 2.25 equals the quantity demanded and supplied by 350 units. QD=QS.

Third, we can equate the equations mathematically. By equating the equations we will first find the equilibrium price. Placing the quantities on the left side and the variations due to the price change on the right side. Do not forget that when you change a term of place you must change the sign.

See how it looks:

QD = 800-200(P) = QS = -100+200(P)

800+100 = 200+200P

900 = 400p

P = 2.25

Finally, we can get the equilibrium quantities by substituting the equilibrium price into the equation. And the equilibrium quantities would be:

QD = 800-200P = QS = -100+200P

800-200(2.25) = -100+200(2.25)

800- 450 = -100+450

350 = 350

Therefore, the equilibrium quantity is 350 and its graphical representation would be as follows:

To conclude, it can be said that the competitive equilibrium manages to establish an equilibrium price and quantity that maximizes the utility of buyers and sellers. Of course, this is achieved when there are enough buyers and sellers.