This question occurred to me when thinking about differential geometry change of coordinates. Consider the system of equations:
\begin{align*} p(x, y) = x + y &\qquad x(p, q) = p - q \\ q(x, y) = y &\qquad y(p, q) = q \end{align*}
Now, if I wish to evaluate $\frac{dp}{dq}$, there are two evaluation strategies available for me:
\begin{align*} \frac{dp}{dq} = \frac{d(x+y)}{dy} = \frac{dx}{dy} + \frac{dy}{dy} = 0 + 1 = 1 \qquad (1) \end{align*}
One the other hand, consider this evaluation:
\begin{align*} \frac{dp}{dq} = \frac{dp}{dx}\frac{dx}{dq} + \frac{dp}{dy}\frac{dy}{dq} = 1 \cdot -1 + 1 \cdot 1 = 0 \qquad (2) \end{align*}
Indeed, one can prove something much stronger: Let $p_i = f_i(x_1, x_2, \dots x_n)$. Now, the evaluation \begin{align*} \frac{dp_i}{dp_j} = \sum_{k=0}^n \frac{dp_i}{dx_k} \frac{dx_k}{dp_j} = \left[\frac{dp_i}{dx_0} \dots \frac{dp_i}{dx_k} \dots \frac{dp_i}{dx_n} \right] \cdot \left[ \frac{dx_0}{dp_j} \dots \frac{dx_k}{dp_j} \dots \frac{dx_n}{dp_j} \right]^T = (J \cdot J^{-1})_{ij} = \delta_{ij} \end{align*}
where $J$ is the jacobian of the function $\vec p = f(\vec x)$, and $\delta_{ij}$ is the kronecker delta.
I'm puzzled as to which interpretation I should choose. Interpretation (2) is nice if I want to think of the sets of "co-ordinate systems" $\{ p_i \}$ as being linearly independent, just like the original $\{ x_i \}$ are, but I have no idea if this is legal.
I'd love an answer that explains to me when (1) is legal, when (2) is legal, and maybe go into more detail about the relationship with the Jacboian, and related geometric insights!