In sharp contrast to molecular synthesis, materials synthesis is generally presumed to lack selectivity. The few known methods of designing selectivity in solid-state reactions have limited scope, such as topotactic reactions or strain stabilization. This contribution describes a general approach for searching large chemical spaces to identify selective reactions. This novel approach explains the ability of a nominally "innocent" Na 2 CO 3 precursor to enable the metathesis synthesis of single-phase Y 2 Mn 2 O 7 -an outcome that was previously only accomplished at extreme pressures and which cannot be achieved with closely related precursors of Li 2 CO 3 and K 2 CO 3 . By calculating the required change in chemical potential across all possible reactant-product interfaces in an expanded chemical space including Y, Mn, O, alkali metals, and halogens, using thermodynamic parameters obtained from density functional theory calculations, we identify reactions that minimize the thermodynamic competition from intermediates. In this manner, only the Na-based intermediates minimize the distance in the hyperdimensional chemical potential space to Y 2 Mn 2 O 7 , thus providing selective access to a phase which was previously thought to be metastable. Experimental evidence validating this mechanism for pathway-dependent selectivity is provided by intermediates identified from in situ synchrotron-based crystallographic analysis. This approach of calculating chemical potential distances in hyperdimensional compositional spaces provides a general method for designing selective solid-state syntheses that will be useful for gaining access to metastable phases and for identifying reaction pathways that can reduce the synthesis temperature, and cost, of technological materials.