The supply function in economics is used to show how much of a given product needs to be supplied given the price of a certain good. It's used in conjunction with what is called the demand function to determine equilibrium pricing for different markets.
Determine the price of goods related to the product whose supply function you're attempting to calculate.
Find out how many suppliers or producers of the given good there are.
Determine the function based on how the given quantities would affect the supply of a product. This will be different for any given product. However, it's always assumed that the price of related products and number of suppliers will be held constant. For example, take an imaginary economy where the amount of one good supplied is the price, minus 1/5 the price of related goods, plus the number of suppliers. In this case, the supply function would be "Qs = P - 1/5Prg-S."