The Sun is a giant magnetic star, made of material that moves in concert with the laws of electromagnetism. Its magnetic field is responsible for everything from the solar explosions that cause space weather on Earth - such as auroras - to the interplanetary magnetic field and radiation through which our spacecraft journeying around the solar system must travel.

"We are not sure exactly where in the Sun the magnetic field is created," said Dean Pesnell, a space scientist at NASA's Goddard Space Flight Centre in Greenbelt, Maryland.

"It could be close to the solar surface or deep inside the Sun - or over a wide range of depths," Pesnell said. To see these invisible fields, scientists observed the material on the Sun. The Sun is made of plasma, a gas-like state of matter in which electrons and ions have separated, creating a super-hot mix of charged particles.

When charged particles move, they naturally create magnetic fields, which in turn have an additional effect on how the particles move.

The plasma in the Sun sets up a complicated system of cause and effect in which plasma flows inside the Sun - churned up by the enormous heat produced by nuclear fusion at the centre of the Sun – create the Sun's magnetic fields. This system is known as the solar dynamo, scientists said.