In this work, we calculate the contribution of dipole-dipole interactions to the optical nonlinearity of the two-dimensional random ensemble of nanoparticles that possess a set of exciton levels, for example, quantum dots. The analytical expressions for the contributions in the cases of TM and TE-polarized light waves propagating along the plane are obtained. It is shown that the optical nonlinearity, caused by the dipole-dipole interactions in the planar ensemble of the nanoparticles, is several times smaller than the similar nonlinearity of the bulk nanocomposite. This type of optical nonlinearity is expected to be observed at timescales much larger than the quantum dot exciton rise time. The proposed method may be applied to various types of the nanocomposite shapes.The final publication (Andrey V Panov, 2013, J. Opt. 15, 055201) is available at