Perfect competition is a market structure in which thousands of identical firms compete to sell identical products, and in which no one firm has any control over the market price. Demand for and supply of the product in the market determines the price that each individual firm faces, and each firm can sell as much or as little output as it desires at the market price.
With these assumptions in mind, we will derive a demand curve for an individual perfect competitor’s output, which we will see is perfectly elastic. Facing the demand determined by the market, an individual firm must decide at what quantity its profits will be maximized. Using the profit maximization rule, any firm should be able to optimize its output to earn the highest per unit profit possible.
This video explains how an individual firm in a perfectly competitive market should decide the best quantity to produce to maximize profits.