Analytical expressions are derived for the photothermal signal, as the probe beam explores the thermal wave generated by the pump beam in the sample, grazing along its surface at a distance x from the heating spot. The relation between the phase of the signal and the thermal wavelength lambda(th) is pointed out, providing an analytical foundation to a refined photothermal technique for measuring the thermal diffusivity alpha. In particular, the analysis shows that both lambda(th) and alpha can be measured using arbitrary phase shifts relative to the heating spot center, which improves the measurement accuracy and the resolution in the application of this technique to imaging.