Planets with magnetic fields

As a kid, I learned that the magnetic field of earth is caused by the molten iron inside the earth. Is that still true?

If so, it appears that almost all planets except jupiter and mars have magnetic fields and so should have molten metal cores. Is this correct?

Also - can you correlate magnetic field strength to planet size or rotation speed or distance from sun etc ?

Wait a minute. Jupiter’s magnetic field is actually the strongest of all the planets. According to magnetic dynamo theory the fields are created by the motion of liquid conducting material in the planet core. Any metallic material can contribute to this effect, including hydrogen as is believed to be the case on Jupiter and Saturn where the hydrogen is under such pressure that it forms a liquid.

Nitpick: It’s not conductive liquid that’s important, but conductive fluid. Gaseous material works fine, too. It also doesn’t matter why it’s conductive: Plasmas and metals both work. The Sun’s dynamo, for instance, is driven by gaseous hydrogen plasma (and yes, “plasma” is a subset of “gas”, not a completely separate thing).

A dynamo does depend critically on rotation (hence why Mercury, Venus, and the Moon have trivially-small magnetic fields), but that’s clearly not the only factor, as evidenced by Mars’ weak magnetic field (Mars rotates approximately at the same rate that Earth does).

Is it? That’s not what I was taught.

A gas is a fluid whose equation of state is governed by the Ideal Gas Law, PV = nk*T. Plasmas follow this law, therefore, plasmas are gasses.

It’s a convenient definition, but not one that I was taught either. I beleive charge carriers and other phenomena in various dimensions can also be modeled with the ideal gas law. I’ve also heard of them referred to as a gas, so perhaps this definition is used as literally as that.