The dielectric function fundamentally determines the thermal radiative properties of nanomaterials. In this work, the first-principles method is applied to investigate the finite temperature dielectric function of isolated and bundled single-walled carbon nanotubes in the visible-ultraviolet spectral range without empirical models. The effects. of diameter, intertube interactions and temperature on dielectric functions are discussed. The calculated extraordinary dielectric functions of four isolated (5,5), (6,6), (7,7) and (8,8) armchair nanotubes with different diameters are compared to study the diameter effect. It shows that the locations of absorption peaks of dielectric functions consistently shift to lower energy with increasing diameter. To analyze the influence of non-local intertube interactions, the dielectric functions of bundled (6,6) armchair nanotubes with varying intertube distance are calculated within the van der Waals theory. As nanotubes bundle together, the intertube interactions become strong and the absorption peaks enhance. The temperature effect is included into computing dielectric function of isolated (5,0) zigzag nanotubes via first-principles molecular dynamics method. It observes that the dominant absorption peak shifts to lower energy as temperature increases from 0 to 600 K. To interpret the temperature influence, the temperature perturbed density of states is presented. (C) 2014 Elsevier Ltd. All rights reserved.