We study the optimal nonlinear income tax problem with multidimensional individual characteristics on which taxes cannot be conditioned. We obtain an optimal tax formula that generalizes the standard one by averaging, with specific weights, the sufficient statistics of individuals who earn the same income. Our first main contribution consists in showing that multidimensional heterogeneity brings a new source of endogeneity to the sufficient statistics that we call composition effects. We highlight that composition effects may substantially affect optimal marginal tax rates. Our results put the stress on the need for empirical studies on sufficient statistics for different demographic groups e.g., according to gender, age, ethnicity. As a second main contribution, we show the equivalence between the tax perturbation and mechanism design approaches which bridges the gap between both methods that have, so far, been used separately in the literature.