Dikes are sheetlike intrusions of magma that cut at high angle across bedding or foliation in the country rock. It is commonly assumed that sheetlike intrusions form because country rock fractures most easily along a plane that is perpendicular to the axis of least compressive stress. However, sheetlike intrusions can occur only if the magma is sufficiently inviscid to flow into a sheetlike form. We show that sheetlike intrusions are favored for all but the most viscous granitic magmas. We propose that basaltic and low-viscosity granitic magmas form dikes and that high-viscosity granitic magmas form stocks and batholiths. Alternative explanations for stocks and batholiths are that they are emplaced either by ductile deformation or by stoping. We predict that even magmatic bodies migrating by ductile deformation will be sheetlike if they are sufficiently small.