Independent variables in thermodynamics

When we are dealing with a gaseous thermodynamic system, in books it's written that state of the system can be described by only two independent variables from the three $$(p,V,T )$$. But it's not written why or how? Why we have to choose only two independent variables, why not more or less? I've gone through some answers but still unable to understand.

You can think of the state of a system as being some characteristics that determine that system uniquely. Properties of a system can be intensive (they don't depend on the mass of the system), or extensive (they depend on the mass of the system).

You could describe a gaseous system using its enthalpy $$h$$ and entropy $$s$$, for example, but it's more common to use pressure $$p$$, specific volume $$v$$ and temperature $$T$$ because they determine directly its molecular configuration.

Take an ideal gas for example, if you know its temperature $$T$$ and pressure $$p$$, you can calculate its specific mass using the ideal gas law

$$pv = RT$$

If only the pressure is known, you can think of the specific volume as a function of temperature (or vice-versa)

$$v = f(T) = \tfrac{R}{p}T$$

And there's no unique pair $$(v,T)$$ that satisfy the equation, but rather infinitely many (a piston under constant pressure can vary its temperature, varying therefore its specific volume as well).

If you choose all three $$p$$, $$v$$ and $$T$$, you might choose values that don't satisfy the ideal gas equation (in the case of ideal gases).

Why we have to choose only two independent variables, why not more or less?

Because there are only two independent ways to change the energy of your system: heat it or do pressure–volume work on it.

The first approach, heating, transfers energy as driven by a temperature difference; the system heats up, and the distribution of energy states broadens.

The second approach, pressure–volume work, transfers energy as driven by a pressure difference; volumes shift, and the energy states are raised in concert.

(We can also change a system's energy through other types of work and through mass transfer; if you specified the energy as a function of $$T$$, $$V$$, particle number $$N$$, surface area $$A$$, and electrical polarization $$P$$, for example, then we would work with five independent variables, involving heat transfer, mechanical work, mass transfer, surface area work, and electrical polarization work, respectively.)