For $x^\mu$ with $\mu_0=t, \mu_i = x^i$ and $\eta_{\mu v}$ the metric tensor with diagonal $(-1,1,1,1)$ and zeros elsewhere, the condition for equivalence of inertial frames is stated as for some "coordinate transformation" $x \to x'$, (1) $\eta_{\mu v} dx'^\mu dx'^v = \eta_{\mu v}dx^\mu dx^v$ or equivalently (2) $\eta_{\mu v} \frac{\partial x'^\mu}{\partial x^\rho}\frac{\partial x'^v}{\partial x^\sigma} = \eta_{\rho\sigma}$.
I can understand (1) as saying that the Lorentzian metric/spacetime interval is preserved. I don't understand how (2) says the same thing or what's going on there mathematically. It can't be partial derivatives of a function taking $x$ to $x'$ since then the equality obviously wouldn't hold in general, but then I'm not sure what they are partial derivatives of, if anything. Any clarification is appreciated