Investopedia defines a firm as a business organization, such as a corporation or a partnership, with different levels of legal protection. However, the Ludwig Von Mises Institute states that a firm in economics plays an important role in markets regardless of its legal definition. Firms represent a division of labor and production costs. Small firms may retain one general manager, whereas larger firms have many levels of management and laborers.
According to Wikipedia, a firm exists as an alternative to a market price mechanism. In comparison to the market, the theory of the firm also deals with different combinations of labor and capital to lower costs. In economics the theory of the firm considers five factors: existence, boundaries, organization, heterogeneity and evidence.
After WW1, economists shifted the focus away from overall markets to the organizational structure of firms. In 1937, economist Ronald Coase focused on the formation of firms as a result of transaction costs of production and exchange. In a market, these costs would be driven by price discovery and contract negotiations and costly renegotiations. He noted that although the external environment of a firm is uncontrollable, the entrepreneur's internal allocation of production is preferable.
According to the Mises Institute, markets also provide a less efficient division of labor than firms: In 1776 Adam Smith wrote, "the division of labor is limited by the extent of the market." Sociologist Emile Durkheim addressed this limitation in his 1892 treatise. He found that this "extent" could be measured by market density, and he concluded that markets with denser participants find it easier to trade.