The article highlights the role of heterogeneity in the formation of hedonic prices. The article distinguishes between continuous and groupwise heterogeneity. The distinction helps understanding two important points. First, the analysis of market equilibrium with groupwise heterogeneity makes explicit the role of participation and incentives compatibility constraints for groups of buyers. The case of continuous heterogeneity may be thought of as a limit case of groupwise heterogeneity when the number of groups goes to infinity and their masses go to zero. The hedonic price curve is then obtained as the solution of a differential equation resulting from a market clearing condition. Second, the article outlines that submarkets emerge from market equilibrium only in the case of groupwise heterogeneity. The existence of submarkets means that the hedonic price function is continuous but the implicit price of characteristics is discontinuous at endogenous threshold values separating submarkets. Major implications for the valuation of environmental quality follow on. Based on numerical simulations, the article gives some insights into the way significant biases and drawbacks in the estimation of the implicit price of environmental quality can arise if the usual two steps procedure is implemented.