Physics is a challenging academic pursuit in which university students regularly struggle to achieve success. Female students tend to perform negatively on introductory physics conceptual assessments compared to their male peers; however, active-learning classroom curricula are known to broadly improve performance on these tests. Here, we used fMRI to delineate physics-related brain activity in 107 students and probed for changes following a semester of active-learning or lecture-based physics instruction. Large-scale reorganization of brain activity accompanying learning occurred in a mixed frontoparietal and default mode network. Sex differences were observed in frontoparietal, default mode, and primary visual areas before and after instruction. Regions showing significant pedagogy, sex, and time interactions were revealed during physics retrieval, suggesting the type of class students complete may influence sex differences in how students retrieve information. These results reveal potentially elucidating sex and pedagogy differences underlying the neural mechanisms supporting physics learning.