Besides chemical functionalisation, the use of surfactants can be applied to debundle and disperse carbon nanotubes before further application in polymer nanocomposites. In this work we present a theoretical analysis of the interaction between single-walled carbon nanotubes and sodium dodecyl sulfate as surfactant and/or polystyrene as polymer matrix using semi-empirical AM1 calculations. Results indicate that the use of short potassium sulfate-terminated polystyrene chains as an extra component can help to remove the surfactant from the nanotube surface within the matrix, resulting in improved electronic properties of the nanocomposite.