\[S(x,y,z)\]
and \[S'(x',y',z')\]
are related by the linear transformation \[T\]
so that \[\begin{pmatrix}x\\y\\z\end{pmatrix}=T \begin{pmatrix}x'\\y'\\z'\end{pmatrix}\]
In general
\[x', \: y', \: z'\]
are each functions of \[x , \: y, \: z\]
so we can write \[x'=x'(x,y,z), \: y'=y'(x,y,z), \: z'=z'(x,y,z)\]
\[\mathbf{\nabla} \begin{equation} \begin{aligned} f &=(\frac{\partial x'}{\partial x}\frac{\partial f}{\partial x'} + \frac{\partial y'}{\partial x}\frac{\partial f}{\partial y'} + \frac{\partial z'}{\partial x}\frac{\partial f}{\partial z'}) \mathbf{i} \\ &+ (\frac{\partial y'}{\partial y}\frac{\partial f}{\partial x'} + \frac{\partial y'}{\partial y}\frac{\partial f}{\partial y'} + \frac{\partial z'}{\partial z}\frac{\partial f}{\partial z'}) \mathbf{j} \\ &+ (\frac{\partial x'}{\partial z}\frac{\partial f}{\partial x'} + \frac{\partial y'}{\partial z}\frac{\partial f}{\partial y'} + \frac{\partial z'}{\partial z}\frac{\partial f}{\partial z'}) \mathbf{k}\end{aligned} \end{equation}\]
Hence
\[\begin{pmatrix}{\partial f}/{\partial x}\\ {\partial f}/{\partial y}\\ {\partial f}/{\partial y}\end{pmatrix} = \left( \begin{array}{ccc} \frac{\partial x}{\partial x'} & \frac{\partial x}{\partial y'} & \frac{\partial x}{\partial z'} \\ \frac{\partial y}{\partial x'} & \frac{\partial y}{\partial y'} & \frac{\partial y}{\partial z'} \\ \frac{\partial z}{\partial x'} & \frac{\partial z}{\partial y'} & \frac{\partial z}{\partial z'} \end{array} \right) \begin{pmatrix}{\partial f'}/{\partial x'}\\ {\partial f'}/{\partial y'}\\ {\partial f'}/{\partial y'}\end{pmatrix}\]
But
\[ \left( \begin{array}{ccc} \frac{\partial x}{\partial x'} & \frac{\partial x}{\partial y'} & \frac{\partial x}{\partial z'} \\ \frac{\partial y}{\partial x'} & \frac{\partial y}{\partial y'} & \frac{\partial y}{\partial z'} \\ \frac{\partial z}{\partial x'} & \frac{\partial z}{\partial y'} & \frac{\partial z}{\partial z'} \end{array} \right)\]
is just the matrix \[T\]
so\[\begin{pmatrix}{\partial f}/{\partial x}\\ {\partial f}/{\partial y}\\ {\partial f}/{\partial y}\end{pmatrix} = T \begin{pmatrix}{\partial f'}/{\partial x'}\\ {\partial f'}/{\partial y'}\\ {\partial f'}/{\partial y'}\end{pmatrix}\]