A fundamental question in ecology is why plant communities have large trait space yet strong coordination among those traits across large scales, despite these patterns seeming contradictory. Answering this question requires quantitatively linking the geographic distribution of trait space and coordination with gross primary productivity (GPP). We leveraged an unprecedented large-scale dataset of nine leaf traits for 5718 species-site combinations with simultaneous field measurements of plant community composition in 64 naturally assembled communities to investigate trait spaces (hypervolume, quantity dimension) and trait compactness (coordination, efficiency dimension) and their influence on GPP. Trait space and compactness combined explained 72% of the variation of GPP. Interestingly, a larger trait space (more diverse trait combinations) drove higher GPP in resource-poor communities, while higher trait compactness (greater coordination of traits) determined higher GPP in resource-rich communities. Our findings provide a new perspective that natural plant communities increase both trait space and compactness to improve GPP, shedding light on the development of multidimensional functional ecology.