# Partial derivative paradox

Okay, perhaps not a paradox, but somewhat of a lack of understanding on my part.

Let $z$ equal some function of $x$ and $y$, i.e. $z = f(x, y)$ and take partial derivatives $\frac{\partial z}{\partial x} = f_x$ and $\frac{\partial z}{\partial y} = f_y$ all and good. But now say I do partial differentiation with respect to z. $\frac{\partial z}{\partial z} = f_z$ which equals $0$ because $f(x, y)$ is a function of $x$ and $y$, but not $z$, so all $x$ and $y$ are held constant and the derivative of a constant is zero. But that's not the right answer is it? $\frac{\partial z}{\partial z}$ should be equal to 1. Where did my logic go wrong?

The problem is that $f(x,y)$ is indeed a function of $z$, you have written it yourself: $f(x,y)=z$, when taking a partial derivative you must always look at the dependance of the function with respect to the variable.