S U M M A R YSince centroid moment tensor (CMT) solution is not enough to describe the mechanism variations of large earthquakes, multiple CMTs were investigated in recent years by inverting seismic waveforms to retrieve the mechanism complexities. However, a problem in these waveform inversions is the trade-off between spatial mechanism variation and temporal rupture process, which may lead to ambiguous results. In this work, we propose a simple but practical approach to invert geodetic coseismic data for spatial mechanism variation. Because there is no need to solve for rupture velocity, geodetic inversion is generally more efficient and robust than waveform inversion. This approach was used to investigate the mechanism variation of the 2008 Wenchuan earthquake. In the case study, a line fault, whose position had been optimized through a 3-D grid search, was used to approximate the rupture fault, aiming to determine the mechanism variations along the strike direction. From the inversion results, there are thrustslips and strike-slips in the southwest and northeast, respectively. The mechanism change appears at 160-200 km to the northeast of the epicentre, where compensated linear vector dipoles (CLVDs) have a local maximum and also support a significant mechanism change. By testing eight line faults with different positions, it is found that the inversion results do not strongly depend on the fault position, suggesting that the mechanism and its variations are robustly constrained in coseismic data inversion with our approach. Compared to waveform inversions, this work provides a more effective way to explore the mechanism complexities, and lays a foundation for future joint inversion of seismic and geodetic data sets.