So let's start by writing down the Robertson-Walker solution for a universe of uniform matter distribution. where is a function of . And and They constructed this as a model in such a way that the matter distribution around an observer would look the same from his vantage point, no matter where he was located in that universe. Despite clumping of matter as we observe as galaxies etc... it is a small variation from the statistical behavior of the overall matter, including especially cosmic microwave background radiation, so they expected this to be a good model for the average behavior of the universe. Calculation from that spacetime yields the following Einstein tensor elements, all other elements are zero. Now Einstein's field equations are where So the first equation I wrote for the element calculated for the spacetime's Einstein tensor given that element for his field equations results in which can be rewritten as This is one of the two Friedmann equations, where a lot of folk define Next take the second equation I wrote for the element calculated for the spacetime's Einstein tensor given that element for his field equations results in Define for pressure as Now insert this and the result for to arrive at This can be rewritten which is the other of Friedmann's equations.