I'm studying thermodynamics I came across this definition
\begin{equation} p = \left( \frac{\partial u}{\partial x} \right)_{S} \end{equation}
where $p$ is a generalised pressure, $u$ is the energy of the system, $x$ is an extensive parameter and $S$ is the entropy. I know this page is not about physics but neither is my doubt, which is:
The text then proceeds to write this pressure in terms of a derivative of entropy and apply to it the chain rule
\begin{equation} p=\left( \frac{\partial u}{\partial x} \right)_{S}=-\left( \frac{\partial u}{\partial S} \right)_{x}\left( \frac{\partial S}{\partial x} \right)_{u} \end{equation}
Where does the minus sign come from? What is the rule here? If I was asked to write this pressure I would apply the chain rule without the minus sign, so what am I missing here?
Thank you very much.