  The first order variation of the matter energy-momentum tensor $T_{\mu \nu}$
with respect to the metric tensor $g^{\alpha \beta}$ plays an important role in
modified gravity theories with geometry-matter coupling, and in particular in
the $f(R,T)$ modified gravity theory. We obtain the expression of the variation
$\delta T_{\mu \nu}/\delta g^{\alpha \beta}$ for the baryonic matter described
by an equation given in a parametric form, with the basic thermodynamic
variables represented by the particle number density, and by the specific
entropy, respectively. The first variation of the matter energy-momentum tensor
turns out to be independent on the matter Lagrangian, and can be expressed in
terms of the pressure, the energy-momentum tensor itself, and the matter fluid
four-velocity. We apply the obtained results for the case of the $f(R,T)$
gravity theory, where $R$ is the Ricci scalar, and $T$ is the trace of the
matter energy-momentum tensor, which thus becomes a unique theory, also
independent on the choice of the matter Lagrangian. A simple cosmological
model, in which the Hilbert-Einstein Lagrangian is generalized through the
addition of a term proportional to $T^n$ is considered in detail, and it is
shown that it gives a very good description of the observational values of the
Hubble parameter up to a redshift of $z\approx 2.5$.
