Say I have this function: $$z=f(ax, ay)$$ I know how to take this partial derivative by defining $u=ax$ and $v=ay$: $$\frac{\partial z}{\partial x}=\frac{\partial f(ax, ay)}{\partial x}=\frac{\partial f(u, v)}{\partial x}$$
$$\frac{\partial z}{\partial x}=\frac{\partial f}{\partial u}\frac{\partial u}{\partial x}+ \frac{\partial f}{\partial v}\frac{\partial v}{\partial x}$$ Which in this case is: $$\frac{\partial z}{\partial x}=\frac{\partial f}{\partial u} a+ \frac{\partial f}{\partial v}0$$ Let's say $f(u, v)=u^2v$. In that case: $$\frac{\partial z}{\partial x}=(2uv)a+ (u^2)0=2uva$$ Returning to the original variables: $$\frac{\partial z}{\partial x}=2a^3xy$$
So here I thought of $f(ax, ay)$ as a composition made like this $f(u(x, y), v(x, y))$.
However, is it possible to think it like this?
$f(g(x, y))$ where $g(x, y) = (ax, ay)$?
The reason why this seems weird to me is that $f$ seems to only have one "slot". However, I suppose that because $g(x, y)$ outputs two numbers, that this a valid composition. In that case: $$\frac{\partial z}{\partial x}=\frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$ Where $\frac{\partial g}{\partial x} = (a, 0)$, but what is $\frac{\partial f(g(x))}{\partial g(x)}$? This could be rewrriten as $\frac{\partial ((ax)^2(ay))}{\partial (ax, ay)}$, but what does differentiating with respect to a vector mean? Is it a gradient in which $$\left(\frac{\partial ((ax)^2(ay))}{\partial (ax)}, \frac{\partial ((ax)^2(ay))}{\partial (ay)}\right) ?$$ Which makes the final result be $$\left(\frac{\partial ((ax)^2(ay))}{\partial (ax)}, \frac{\partial ((ax)^2(ay))}{\partial (ay)}\right)(a, 0) = a2(ax)(ay)=2a^3xy ?$$ I get to the right result by assuming this, but I have no idea why it works (or if it is even right). Not a maths student so simple explanations are appreciated. Tyvm.