How does the developing brain, initially equipped only with elementary mathematical intuitions, acquire higher mathematical concepts? Through a longitudinal functional MRI study of children from preschool through first and second grade, we tracked how neural responses to mathematical and non-mathematical statements change in the first two years of formal schooling and use the data to evaluate several theories of developmental change. Before school, when listening to math statements, children already engage an adult-like cortical network, with partial specialization for geometry. Over the first two years of school, we observe an overall increase in math-related activation, a small recruitment of additional neural territory, reduced activation for facts that get better known, and a small overall increase in the dimensionality of representational space. fMRI responses to individual sentences suggest that these mechanisms, particularly in left inferior frontal gyrus and bilateral intraparietal sulcus, all contribute to children′s growing mastery of mathematical concepts. ### Competing Interest Statement The authors have declared no competing interest.