Nanoparticles are microscopic particles less than 100 nm in diameter. Because of their small size, nanoparticles provide an excellent model of a quantum-mechanical “particle in a box”. The confinement of electron-hole pairs in semiconductor nanoparticles, at radii smaller than the Bohr radius, leads to the detectable quantization of energy levels. The optical band gap for these quantum dots can be adjusted by changing their size. This Demonstration shows the effect of radius on the band gap energy of CdSe in quantum dots that emit in the visible light range under excitation with UV. Once an electron is excited from the valence band to the conduction band, an electron hole is left behind. To simplify the calculation, the following truncated equation adjusted to the properties of CdSe quantum dots was used to relate the radius of the nanoparticle with the band gap energy from the electron-hole pair:
where is band gap energy, is Planck’s constant, is radius, is effective mass of the electron in CdSe, and is effective mass of the hole in CdSe.
This equation is an adaptation of the formula for the energy levels of a one-dimensional box, the difference being that the masses of the electron-hole pair are taken into account:
You can vary the radius of the CdSe nanoparticle to show the inverse relationship between energy and size in the particle-in-a-box model for nanoparticles.
 T. Kippeny, L. A. Swafford and S. J. Rosenthal, "Semiconductor Nanocrystals: A Powerful Visual Aid for Introducing the Particle in a Box," Journal of Chemical Education,79(9), 2002 pp. 1094–1100. doi:10.1021/ed079p1094.