We consider the problem of nonparametric estimation of a d-dimensional probability density and its `principal directions' in the independent component analysis model. A new method of estimation based on diagonalization of nonparametric estimates of certain matrix functionals of the density is suggested. We show that the proposed estimators of principal directions are $\sqrt{n}$ -consistent and that the corresponding density estimators converge at the optimal rate.