Here we extend a semianalytical method to compute thermoelastic properties of materials (Wu & Wentzcovitch, ) to monoclinic systems and apply it to diopside (MgCaSi2O6), a mineral with monoclinic symmetry and an end‐member of clinopyroxene. Using ab initio results for structural and vibrational properties, we obtain the density, the elastic tensor, single crystal elastic anisotropies, and seismic wave velocities of diopside over a wide pressure and temperature range. Our results agree well with previous available experimental results. Compared with other minerals in the upper mantle, clinopyroxene has the lowest P wave velocity (VP) and S wave velocity (VS) at depths greater than 240 km. Combining our results with elastic properties of other major upper‐mantle minerals obtained by previous studies, we estimate the density and wave velocity profiles of a pyrolitic mantle in the depth range of 220–400 km, where pyroxene is gradually dissolved into garnet. The obtained profiles agree well with seismic models (PREM and AK135) supporting the notion of a pyrolitic upper mantle.