On reducing the volume of gas at constant temperature,the pressure of the gas increases .Explain why?

Because P*V is constant at a given temperature.

The reason that is true is that the gas density increases when volume decreases, and so more molecules hit the wall per unit time. That is what causes the pressure.

It is a true answer for what it is given here

When the volume of a gas is reduced at constant temperature, the pressure of the gas increases. This phenomenon can be explained using the ideal gas law, which states that the pressure (P) of a gas is directly proportional to its temperature (T) and inversely proportional to its volume (V). The equation for the ideal gas law is:

PV = nRT

Where:
P = pressure of the gas
V = volume of the gas
n = number of moles of gas
R = the ideal gas constant
T = temperature of the gas (in Kelvin)

Now, let's consider the situation where the volume of a gas is reduced while keeping its temperature constant. Since the temperature remains constant (T), the equation can be simplified to:

P1V1 = P2V2

Where:
P1 = initial pressure of the gas
V1 = initial volume of the gas
P2 = final pressure of the gas (after volume reduction)
V2 = final volume of the gas (reduced volume)

Based on this equation, when the volume (V2) is reduced, the product of pressure (P2) and volume (V2) must remain constant, as indicated by the equation P1V1 = P2V2. Therefore, if the volume decreases (V2 < V1), the pressure (P2) must increase (P2 > P1) to maintain the equation balanced.

In simple terms, when the volume of a gas is reduced, the same number of gas particles are now confined in a smaller space. This leads to more frequent collisions between the gas particles and the walls of the container. As a result, the force exerted by the gas particles on the walls of the container increases, leading to an increase in pressure.

To summarize, when the volume of a gas is reduced at constant temperature, the pressure of the gas increases due to the relationship described by the ideal gas law.