The standard gravity model predicts that trade flows increase in proportion to importer and exporter total income, regardless of how income is divided into income per capita and population. Bilateral trade data, however, show that trade grows strongly with income per capita and is largely unresponsive to population. I develop a general equilibrium Ricardian model of trade that allows the elasticity of trade with respect to income per capita and with respect to population to diverge. Goods are of various types, which differ in their income elasticity of demand and in the extent to which there is heterogeneity in their production technologies. I estimate the model using bilateral trade data of 162 countries and compare it to a special case that delivers the gravity equation. The general model improves the restricted model's predictions regarding variations in trade due to size and income. I experiment with counterfactuals. A positive technology shock in China makes poor and rich countries better off and middle-income countries worse off.