In conformal field theory the operator dimension $\Delta$ determines how fields and thus correlation functions behave under rescaling. I am having trouble seeing how this number arises from a scale transformation of a field, namely, if we rescale
$$x^\mu \rightarrow \lambda x^\mu$$
how do we arrive at the fact that the field should transform as
$$\phi(x)\rightarrow\lambda^\Delta \phi(\lambda x)$$
This is usually stated as a fact in most CFT textbooks I have read (eg. Fradkin) but never shown explicitly. I'm sure it is a straightforward exercise but I cannot seem to do it. I know that a scalar field in 4 dimensions for example should have $\Delta=1$, so I begin by writing
$$\phi(x)=\int\dfrac{d^3p}{(2\pi)^3}\dfrac{1}{\sqrt{2E_p}}(a_pe^{ipx}+a_p^\dagger e^{-ipx})$$
But I cannot see how this would transform into $\lambda\phi(\lambda x)$ if I take $x\rightarrow \lambda x$. Can someone enlighten me?
Thanks!