Let $f\colon \mathbb{R}^2\rightarrow\mathbb{R}$ be a function such that $\frac{\partial f}{\partial x}$, $\frac{\partial f}{\partial y}$ exists. So we have that $$\nabla f=\left(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}\right).\tag{1}$$ If we want to change the system into polar coordinates, knowing that $x=\rho\cos(\theta ), \ y=\rho\sin(\theta )$, we have by the chain rule $$\nabla f=\left(\frac{\partial f}{\partial\rho}\frac{\partial\rho}{\partial x}+\frac{\partial f}{\partial\theta}\frac{\partial\theta}{\partial x},\frac{\partial f}{\partial\rho}\frac{\partial\rho}{\partial y}+\frac{\partial f}{\partial\theta}\frac{\partial\theta}{\partial y}\right).\tag{2}$$
I know the chain rule. For example, if I have a function $f(g(x))$, then $\frac{df}{dx}=\frac{df}{dg}\frac{dg}{dx}$.
My question is:
What are the steps that let me go from $(1)$ to $(2)$? I don't see that. Can someone help me? Thanks before!