Deriving the supply curve
Cvarza, the supply curve is theoretically derived. 

The supply curve of the industry is the horizontal sum of the curves of firms. The supply curve of a firm is the portion of the marginal cost curve with a positive slope. That is, firms act to equal marginal cost to marginal revenue. If the marginal cost is decreasing, that means the firm can increase (marginally) the production (and its profits) till the equilibrium point.

As reference, i recommend the chapter about firms supply in Varian's undergradute book.
As a graduate reference, MasCollel is strongly recomended.