Suppose for a material that the temperature is a function of position, so that
$T=T(x,y,z)$
.
Suppose we have a curve
$\mathbf{r}$
in the material. The curve is parametrized in terms of its distance from sme point, so that
$\mathbf{r}= \mathbf{r}(s)$
.
The change in
$T$
as it goes from
$(x,y,z)$
to
$(x+ \delta x , y+ \delta y , z+ \delta z )$
along the curve is
$\ delta T = \frac{\partial T}{\partial x} \delta x + \frac{\partial T}{\partial y} \delta y + \frac{\partial T}{\partial z} \delta z = (\frac{\partial T}{\partial x} , \frac{\partial T}{\partial y} , \frac{\partial T}{\partial z}) \cdot ( \delta x, \delta y \ \delta z = \mathbf{\nabla} \cdot \delta \mathbf{r}$

Hence
$\ \frac{\delta T}{\delta s} = \mathbf{\nabla} \cdot \frac{\delta \mathbf{r}}{\delta s}$

Let
$\delta \mathbf{r} \rightarrow \mathbf{0}$
then
$\ \frac{d T}{ds} = (\mathbf{\nabla} T) \cdot \frac{d \mathbf{r}}{ds}$