 Our planet formed from planetesimals 4.5 billion years ago and this was a process of what they call accretion which is putting all of these bits and pieces of stuff together in such a way that it all became molten massive stuff. Once we started that we had significant bombardment by meteorites continuously coming in there and there was a lot of energy related to that process and we started to get a gravitational field which was pulling it all together. That energy helped to make sure we were entirely molten. So the earliest days 4.5 something billion years ago we imagined a giant molten blob interestingly very soon just when we're probably starting to form a cross cool a little bit to make cross we were hit by a very large impactor which spun off to make the moon. So looking at the moon tells us a lot about the earth and we had theories about the moon but then we went there in the 60s and got pieces of it it came back very much like earth and so it's still a problem of how much of the moon is the thing that hit us and how much is dragged out of us and people are still argue about that 50 years later but for the most part we know that the majority of the moon came from us. So we had a gravitational field we were mostly molten early on we were in an asteroid field so we were continuously bombarded. If we were in that asteroid field today we'd all be dead because we'd be hit by so many meteorites that it would make a complete mass. So the idea is we initially formed this big mass and it had a lot of iron and nickel metal in it. So if you look at most meteorites around the world it turns out that many of them are very rich in metals and in fact that's why we're considering that we might someday go out with rockets and round them up and drag them back so that we can stop mining our crossfield just mine them because they're so rich in metals that just a few of those would set us up for years but that's another subject. So these these metals eventually saturated in this giant magnum blob and those because we were developing gravity those were very dense and they started settling into the and they dragged all the metals out of this molten mass into the middle of the planet and started forming a core. So initially it was molten iron settling out of droplets and as they settled out they would drag all of the other metals into them because these metals all of the metals on earth prefer to go into molten metal if they could. They don't want to be in silicates they want to be in molten metal so they all went into the core and in fact it's an interesting thought that we wouldn't have had any metals to make a modern society had we just left it at that because we had dragged all the metals all the gold and silver and platinum and everything else we make all of our gadgets and our TVs and everything out of that all went into the core we would have been out of luck. Fortunately after we did that and we had what they call a magma ocean there was enough bombardment by more meteorites to put the metals back into the rest of the planet that wasn't in the core so that we could have little scraps to left over to fight over and so that's an interesting project in itself but what happened once we made the core it turned out that we were still extremely hot and so we have a lot of thermal energy left over from the formation of the planet and we've been cooling ever since and we probably would have cooled a lot more were it not for the fact that many of the elements in the core and mantle are radioactive so the decay to other elements for instance uranium to lead or uranium to thorium a whole series of elements potassium to argon there's a whole bunch of elements that aren't stable and so with time they will decay to another element plus put off energy so that that is what's been keeping us so hot for so long and it turns out that the core is mostly iron and nickel we're sure of that but when the geophysicists look at the planet and they think about the mass of the core given its size they realize that if it was just pure iron nickel it would be too dense so there must be lighter elements in the core now of course we can't go down there and sample it so we really don't know what's in there so people say maybe it's carbon maybe it's silica maybe it's sulfur certainly there's a potassium potassium is a key element because there's a lot of potassium in the earth and it decays