The Sun is a nearly perfect ball of hot plasma at the center of the Solar System. It radiates energy from nuclear fusion reactions in its core as light, ultraviolet, and infrared radiation, providing most of the energy for life on Earth. The Sun is about 109 times the radius of Earth and 330,000 times its mass, comprised mostly of hydrogen and helium. It formed approximately 4.6 billion years ago from the gravitational collapse of a molecular cloud and will continue fusing hydrogen for billions of years before expanding into a red giant and eventually shrinking into a white dwarf.