Why is Earth's inner core so hot and dense?

The Earth's inner core is so hot and dense primarily due to the high pressure exerted on it by the weight of the overlying layers of the planet. Several factors contribute to this high pressure:

1. Compression: The Earth's inner core is located at the very center of the planet, which means it experiences enormous pressure from the weight of all the layers above it. This compression leads to an increase in density, as the atoms and molecules are squeezed closer together.

2. Gravitational force: The immense gravitational pull of the Earth compresses the inner core, causing it to be tightly packed. This gravitational force contributes to the high density of the inner core.

The high temperatures in the inner core can be attributed to the following reasons:

1. Radioactive decay: The Earth's core contains some radioactive materials, such as uranium, thorium, and potassium. These radioactive elements undergo decay, releasing heat in the process. This heat gradually accumulates and contributes to the overall temperature of the inner core.

2. Leftover heat from formation: When the Earth formed around 4.6 billion years ago, gravitational energy was converted into heat, causing the core to become incredibly hot. Over time, this residual heat has still not completely dissipated, leading to the ongoing high temperatures within the inner core.

It is important to note that the inner core is solid, despite its high temperature, due to the extreme pressure. The pressure prevents the core from melting, even at such high temperatures.