In a market economy, the price and the quantities of the goods are indirectly determined by the demand and supply: there is a competition among the suppliers, which is however constrained by their production costs, and the consumers choose the best options: the interplay of these two factors causes the prices to meet "in the middle", creating an equilibrium.