# Derivation of pressure of a gas from mean sqaured speed of molecules

I understand that the pressure exerted by a molecule on the walls of a container, in the $$x$$ direction is given by $$P=n m v_x^2$$ Where $$v_x$$ is the mean $$x$$ component of velocity, $$m$$ is mass and $$n$$ is the number of molecules.

I also understand that $$\mathbf{v_x^2=v_y^2=v_z^2}$$

What I'm unable to understand is this: $$\mathbf{\frac{1}{3}(v_x^2+v_y^2+v_z^2)=\frac{1}{3}v^2}$$
Why exactly are we multiplying the equation by $$\frac{1}{3}$$ ? Apparently it is to find the average. But $$(v_x^2+v_y^2+v_z^2)$$ gives us the resultant velocity sqaured in magnitude. Dividing it by $$3$$ would just be reducing its value by one-third. How do we get the average by multiplying by $$\frac{1}{3}$$ ?

It's to do with how the total velocity is worked out from the components, with Pythagoras theorem. $$v^2 = {v_x}^2+{v_y}^2+{v_z}^2$$
If the components are equal on average then $$v^2 = 3{v_x}^2$$ and $${v_x}^2 = \frac{1}{3}{v}^2$$
The second formula in bold in the question is best written omitting the $$\frac{1}{3}$$ from each side and your first formula for P becomes $$P=\frac{1}{3}mnv^2$$