A trace element may substitute into a mineral by more than one substitution mechanism, complicating the thermodynamic description of its partition coefficients. In order to understand this phenomenon better, the mineral/melt partition coefficients for all 14 rare earth elements (REE) plus Y and Sc were measured experimentally for coexisting forsterite and protoenstatite in the system CaO–MgO–SiO2 ± Al2O3 ± TiO2 at 1406 °C and atmospheric pressure. For both phases, the results show these large trivalent cations (REE3+) replace Mg2+ on octahedral sites, but with charge-balance achieved by two different mechanisms: (1) cation vacancies (2 REE3+ + vacancy = 3 Mg2+); and (2) substitution of Al for Si (REE3+ + Al3+ = Mg2+ + Si4+). The overall REE partition coefficient is the sum of the partition coefficients for each substitution mechanism. Because the stoichiometric control is different for each mechanism, the relative importance of the mechanism varies with melt composition, including the activities of both silica and alumina in the melt ($${{a}}_{{{\text{SiO}}_{ 2} }}^{\text{melt}}$$ and $${{a}}_{{{\text{AlO}}_{ 1. 5} }}^{\text{melt}}$$). The coexistence of forsterite and protoenstatite fixes the silica activity, allowing the effect of $${{a}}_{{{\text{AlO}}_{ 1. 5} }}^{\text{melt}}$$ to be separated from that of $${{a}}_{{{\text{SiO}}_{ 2} }}^{\text{melt}}$$. The relative importance of the two mechanisms depends strongly on the identity of the REE for forsterite, but not for protoenstatite. The results are used to test the lattice strain model: the two substitution mechanisms in forsterite imply different values for the Young’s modulus in the Brice equation, despite the fact that the REE3+ cations likely occupy the same crystallographic site in both mechanisms, casting doubt on the physical basis of the lattice strain theory. Comparison with literature data confirms earlier observations that the activity coefficients of REE2O3 in silicate melts decrease with increasing SiO2 content of the melt, but the effect decreases with increasing atomic number, from La to Lu, and is almost negligible for Sc. The influence of melt composition should apply to the mineral/melt REE partition coefficients of all other minerals. Recognizing that observed mineral/melt partition coefficients are often the sums of contributions from multiple substitution mechanisms, each with its own dependence on both crystal composition and the stoichiometric control from the melt composition, will improve parameterizations of the mineral/melt partition coefficients of other rock-forming minerals. Partition coefficients for Na, Al, Ca, Ti, and Zr are also reported.