Why/How is $PV=k$ true in an ideal gas? So, I'm pretty noobish when it comes to physics or math, but this thing came into my head.
We have our ideal gas equation: $PV=nRT$. So under constant temperature and amount of particles $PV=k$. So $P \sim 1/V$. What else is directly proportional to $P$?
Well, one over the surface area of the container: $P \sim 1/A$. So $P \sim 1/V \sim 1/A$. So the area of the container is then directly proportional to the volume of the container $A \sim V$. So this is probably generally not the case, but even for a sphere we can see that this is not the case, as the constant of proportionality chances with the radius: $V = r/3 * A$, for a given radius $r$.
Given that all this makes sense, what I'm wondering is: How can $P \sim 1/V$?
 A: There are probably several ways to approach this, but I think a nice simple way is to consider the microscopic mechanism that produces pressure.
Imagine a spherical container of some radius $r$ with just one gas particle in it. Our gas particle has a mass $m$ and a velocity $v$.

When the gas particle hits the walls of the vessel and bounces back it exerts a force on the walls of the vessel. This is just the same as if I throw a heavy object at you so the object exerts a force on you when it hits you. To calculate this force you need to know that force is the same as rate of change of momentum.
At each collision the particle velocity changes from $v$ to $-v$, so the momentum changes from $mv$ to $-mv$, so the momentum change is $\Delta p = 2mv$.
The time the particle takes to cross the sphere is $\tau = 2r/v$, so the number of collisions per second is $f = 1/\tau = v/2r$.
And the rate iof change of momentum, i.e. the force' is just the momentum change per collision $\Delta p$ times the number of collisions per second $f$:
$$ F = \Delta p f = 2mv \frac{v}{2r} = \frac{mv^2}{r} $$
And finally, pressure is force per unit area and the area of the sphere is $4\pi r^2$, so we end up with the equation for the pressure:
$$ P = \frac{F}{A} = \frac{mv^2}{4\pi r^3} \tag{1} $$
Now you asked how come the pressure is inversely proportional to the volume? Well the volume of a sphere is:
$$ V = \tfrac{4}{3}\pi r^3 $$
And we can substitute this into our equation (1) to get:
$$ P = \frac{F}{A} = \frac{mv^2}{3V} \tag{2} $$
So we find that $P \propto 1/V$.
If you're interested we can do better than this because the equipartition of energy tells that the kinetic energy of the particle at a temperature $T$ will be about $\tfrac{3}{2}kT$. So we get:
$$ \tfrac{1}{2}mv^2 = \tfrac{3}{2}kT $$
and we can use this substitute for $mv^2$ in equation (2) to get:
$$ P = \frac{kT}{V} \tag{3} $$
So we've also got Guy-Lussac's law $P \propto T$. 
And there's one last step. All this was for just one particle. If we have one mole of gas then that's $N_a$ particles, where $N_a$ is Avagadro's number. Each particle contributes the same momentum change, so the total force from all those particles is just:
$$ P = \frac{N_a kT}{V} $$
And the product $N_a k$ is just the ideal gas constant $R$ so our final equation is:
$$ P = \frac{RT}{V} $$
which you should immediately recognise as the ideal gas law.
Now I've played a pretty fast and loose with this derivation and there all sorts of objections. For example the gas molecules have a range of velocities and they don't all hit the walls straight on. However the spirit of the derivation is fine even if the detail isn't, and hopefully this helps explain exactly why the ideal gas law has the form that it does.
A: In 1/A you assumed fixed F and 1/V fixed n and T. You can't do both.
A: So let's think about what you've discovered because it is obviously not as simple as "the surface area must be proportional to the volume" and that's a good clue that you oversimplified somewhere. So we found, in words, that if we increase the size of a sphere by adding a thin surface of width $dr$ we increase the volume by $A~dr$ and thereby the gas bounded by that sphere does a work $P ~ A~dr$ which we know goes like $$ \frac{nRT}{4\pi r^3/3}~4\pi r^2 ~ dr = 3nRT \frac{dr}r.$$In fact we have discovered a family of different ways to compress the object depending on how you vary $T(r)$, where if you hold it constant (isothermal compression) then the energy to compress the thing diverges logarithmically.
