Textbook says for scale transformation: $$x^\mu\rightarrow x'^\mu=e^\sigma x^\mu$$ The field transforms like $$\phi^A(x)\rightarrow \phi'^A(x')=\left[e^{-\mathbf{D} \sigma} \right]^A_{\quad B} \phi^B(x)$$
where $\mathbf{D}=\frac{d-2}{2} \mathbb{I} $ for Bose field and $\mathbf{D}=\frac{d-1}{2} \mathbb{I} $ for Fermi field.
But why is there such matrix $\mathbf{D}$ for field? From the definition of scalar, vector or tensor field in differential geometry.
For scaler field $\phi(x)$, it's a map $\phi: \mathcal{M} \rightarrow \mathbb{R}$. It should be invariant under coordinate transformation. So under scale transformation $x^\mu\rightarrow x'^\mu=e^\sigma x^\mu$, $\phi(x)\rightarrow \phi'(x')=\phi(x)$.
For vector field $A^\mu(x)$, $A^\mu(x)\rightarrow A'^\mu(x')=\frac{\partial x'^\mu}{\partial x^\nu}A^\nu(x)=e^\sigma A^\mu(x)$