The Sun is the star at the center of the Solar System. It is almost perfectly spherical and consists of hot plasma interwoven with magnetic fields. It has a diameter of about 1,392,000 km, about 109 times that of Earth, and its mass (about 2×1030 kilograms, 330,000 times that of Earth) accounts for about 99.86% of the total mass of the Solar System. Chemically, about three quarters of the Sun's mass consists of hydrogen, while the rest is mostly helium. Less than 2% consists of heavier elements, including oxygen, carbon, neon, iron, and others.
The Sun's stellar classification, based on spectral class, is G2V, and is informally designated as a yellow dwarf, because its visible radiation is most intense in the yellow-green portion of the spectrum and although its color is white, from the surface of the Earth it may appear yellow because of atmospheric scattering of blue light. In the spectral class label, G2 indicates its surface temperature of approximately 5778 K (5505 °C), and V indicates that the Sun, like most stars, is a main sequence star, and thus generates its energy by nuclear fusion of hydrogen nuclei into helium. In its core, the Sun fuses 620 million metric tons of hydrogen each second. Once regarded by astronomers as a small and relatively insignificant star, the Sun is now thought to be brighter than about 85% of the stars in the Milky Way galaxy, most of which are red dwarfs. The absolute magnitude of the Sun is +4.83; however, as the star closest to Earth, the Sun is the brightest object in the sky with an apparent magnitude of −26.74. The Sun's hot corona continuously expands in space creating the solar wind, a stream of charged particles that extends to the heliopause at roughly 100 astronomical units. The bubble in the interstellar medium formed by the solar wind, the heliosphere, is the largest continuous structure in the Solar System.
The Sun is currently traveling through the Local Interstellar Cloud in the Local Bubble zone, within the inner rim of the Orion Arm of the Milky Way galaxy. Of the 50 nearest stellar systems within 17 light-years from Earth (the closest being a red dwarf named Proxima Centauri at approximately 4.2 light years away), the Sun ranks 4th in mass. The Sun orbits the center of the Milky Way at a distance of approximately 24,000–26,000 light years from the galactic center, completing one clockwise orbit, as viewed from the galactic north pole, in about 225–250 million years. Since our galaxy is moving with respect to the cosmic microwave background radiation (CMB) in the direction of constellation Hydra with a speed of 550 km/s, the sun's resultant velocity with respect to the CMB is about 370 km/s in the direction of Crater or Leo.
The mean distance of the Sun from the Earth is approximately 149.6 million kilometers (1 AU), though the distance varies as the Earth moves from perihelion in January to aphelion in July. At this average distance, light travels from the Sun to Earth in about 8 minutes and 19 seconds. The energy of this sunlight supports almost all life on Earth by photosynthesis, and drives Earth's climate and weather. The enormous effect of the Sun on the Earth has been recognized since prehistoric times, and the Sun has been regarded by some cultures as a deity. An accurate scientific understanding of the Sun developed slowly, and as recently as the 19th century prominent scientists had little knowledge of the Sun's physical composition and source of energy. This understanding is still developing; there are a number of present-day anomalies in the Sun's behavior that remain unexplained.
The Sun is a G-type main sequence star comprising about 99.8632% of the total mass of the Solar System. It is a near-perfect sphere, with an oblateness estimated at about 9 millionths, which means that its polar diameter differs from its equatorial diameter by only 10 km. As the Sun consists of a plasma and is not solid, it rotates faster at its equator than at its poles. This behavior is known as differential rotation, and is caused by convection in the Sun and the movement of mass, due to steep temperature gradients from the core outwards. This mass carries a portion of the Sun’s counter-clockwise angular momentum, as viewed from the ecliptic north pole, thus redistributing the angular velocity. The period of this actual rotation is approximately 25.6 days at the equator and 33.5 days at the poles. However, due to our constantly changing vantage point from the Earth as it orbits the Sun, the apparent rotation of the star at its equator is about 28 days. The centrifugal effect of this slow rotation is 18 million times weaker than the surface gravity at the Sun's equator. The tidal effect of the planets is even weaker, and does not significantly affect the shape of the Sun.
The Sun is a Population I, or heavy element-rich, star. The formation of the Sun may have been triggered by shockwaves from one or more nearby supernovae. This is suggested by a high abundance of heavy elements in the Solar System, such as gold and uranium, relative to the abundances of these elements in so-called Population II (heavy element-poor) stars. These elements could most plausibly have been produced by endergonic nuclear reactions during a supernova, or by transmutation through neutron absorption inside a massive second-generation star.
The Sun does not have a definite boundary as rocky planets do, and in its outer parts the density of its gases drops exponentially with increasing distance from its center. Nevertheless, it has a well-defined interior structure, described below. The Sun's radius is measured from its center to the edge of the photosphere. This is simply the layer above which the gases are too cool or too thin to radiate a significant amount of light, and is therefore the surface most readily visible to the naked eye.
The solar interior is not directly observable, and the Sun itself is opaque to electromagnetic radiation. However, just as seismology uses waves generated by earthquakes to reveal the interior structure of the Earth, the discipline of helioseismology makes use of pressure waves (infrasound) traversing the Sun's interior to measure and visualize the star's inner structure. Computer modeling of the Sun is also used as a theoretical tool to investigate its deeper layers.