  The shape of dark matter haloes plays a critical role in constraining
cosmology with upcoming large-scale structure surveys. In this paper, we study
the correlations between the triaxial shapes and formation histories in dark
matter haloes in the MultiDark Planck 2 N-body cosmological simulation. We find
that halo ellipticity is strongly correlated with halo properties that serve as
proxies of halo formation history, such as halo concentration and the
peak-centroid offset. In particular, the correlation between halo ellipticity
and halo concentration is nearly independent of the halo density peak height.
We present a simple model for the correlation between halo ellipticity and
concentration using conditional abundance matching, and provide fitting
formulae for the multi-dimensional distributions of triaxial halo shape as a
function of halo peak height. We apply our halo shape model to gauge the
effects of halo ellipticity and orientation bias on the excess surface mass
density profiles in cluster-size halos. Our model should be useful for
exploring the impact of triaxial halo shape on cosmological constraints in
upcoming weak lensing surveys of galaxy clusters.
