Hello Rohannet,The ideal gas equation is found by two methods.One method is experimental and gives the equation you are familiar with and the second method is theoretical.With the second method certain simplifying assumptions are made and Newtons laws applied to gas atoms moving in a box.The derivation is quite lengthy but you could easily find it with a search.Neither equation is exactly correct but nevertheless they are still useful.