quantum confinement
Pluck a guitar string and its pitch depends on its length: a long string gives a low note, a short one a high note. Electrons in matter behave a bit like standing waves on a string, and the same rule applies — pen an electron into a smaller space and its allowed energies rise. Quantum confinement is what happens when you shrink a piece of material until it is smaller than the natural size the electron waves want to occupy: the electron gets squeezed, and its energy levels shift and spread apart. Structure at the nanoscale therefore controls the electronic behaviour directly, just by controlling size.
The physics is captured by the simplest problem in quantum mechanics, a particle trapped in a box of width L. Its allowed energies are E_n proportional to n squared times h squared, divided by 8 times m times L squared, where n is a whole number (1, 2, 3, and so on), h is Planck's constant, and m the particle mass. The key feature is the L squared in the denominator: the spacing between energy levels grows as 1 over L squared, so it blows up as the box shrinks. In a semiconductor this widens the energy gap between the filled and empty electron states — and because that gap sets what light the material absorbs and emits, the colour shifts. Confinement matters once the crystal is smaller than the electron-hole pair's natural size (the exciton Bohr radius, a few nanometres in typical semiconductors).
So the same material can be tuned across a rainbow of colours purely by changing size, with no change of chemistry. This is why cadmium selenide dots glow blue when they are 2 nm and red when they are 6 nm, and it is the working principle behind quantum-dot displays, tunable lasers, and light-emitting nanocrystals. The honest framing for this field: quantum confinement is a size effect. The atoms are arranged the same way inside; what changes is that the box holding the electrons has become small enough for quantum mechanics to make the size itself visible.
Shine ultraviolet light on a row of vials holding CdSe nanocrystals graded from 2 to 6 nm and the vials fluoresce in a smooth sequence from blue through green and yellow to red. Nothing in the vials differs but the diameter of the dots. The colour ladder is a direct picture of the box getting bigger and its energy levels crowding closer together.
Particle-in-a-box: level spacing scales as 1/L^2, so smaller crystals emit bluer (higher-energy) light.
Quantum confinement is about electron energies, not about the crystal structure changing — the lattice is essentially the same as the bulk. Do not conflate it with melting-point depression or surface reconstruction, which are surface-energy effects; confinement can occur even with a perfect, unreconstructed interior.