What has the magnetic properties of a solid magnet, but the mechanical properties of a liquid? If you answered 'nothing,' you're wrong - because engineers have just created just such a substance, by using a modified 3D printer.

Yes, ferrofluid is already a thing, but this is different. Unlike the ferrofluid you may know and love (because come on, it is awesome), the new magnetic liquid retains its magnetism even in the absence of an external magnetic field.

"We wondered, 'If a ferrofluid can become temporarily magnetic, what could we do to make it permanently magnetic, and behave like a solid magnet but still look and feel like a liquid?'" said materials scientist and engineer Tom Russell of the University of Massachusetts.

"We've made a new material that is both liquid and magnetic. No one has ever observed this before."

It's pretty similar to ferrofluid, actually. Both consist of ferromagnetic nanoparticles suspended in a fluid. The new magnetic liquid uses iron oxide nanoparticles, which is also a popular choice for ferrofluid, so there are no surprises there.

But last year, the team developed a technique for 3D-printing structures out of liquid. It used two liquids: water injected into a tube of silicone oil mixed with a nanoparticle surfactant that forms an elastic film, essentially holding the water in place.

This is what the team decided to use for their nanoparticle suspension, printing droplets just one millimetre in diameter. The iron oxide nanoparticles crowded towards the surface of the droplet, forming a shell at the interface between the water droplets and the oil suspension. This is called interfacial jamming, and it's a well-known nanoparticle behaviour.

Then they placed the droplets near a magnetic coil to magnetise them. Just like ferrofluid, the iron oxide particles were attracted to the magnet. So far, so normal.

But when the researchers moved the magnetic coil away, it got less normal. When ferrofluid is removed from the presence of a magnetic field, the nanoparticles fall into disarray, and the fluid just becomes sort of blobby.

But with this new liquid, the nanoparticles started spinning towards each other in unison, like synchronised swimmers, or "little dancing droplets," according to engineer Xubo Liu of the Beijing University of Chemical Technology. They had retained their magnetism.

"We almost couldn't believe it," Russell said. "Before our study, people always assumed that permanent magnets could only be made from solids."

Upon further investigation, the team found that exposing the liquid to a magnetic field causes the magnetic poles of the nanoparticles to align in the same direction. But when the magnetic field is taken away, there's no room for the surface particles to drift because they're jammed so closely together, and thus stay that way.

The mysterious part is that they somehow transfer their magnetism to the nanoparticles free-floating inside the droplet. The team doesn't yet know how that happens. But it does, and the entire droplet just stays magnetised.

"What began as a curious observation ended up opening a new area of science," Liu said.

And, even more curiously, the liquid can change shape - standing tall as a cylinder, flattening out like a pancake, round like a sphere, thinning out like a wire, or even more complex shapes, like… octopuses.

The invention can be controlled by an external magnetic field, which opens up possibilities in soft robotics, artificial cells, and perhaps even targeted drug delivery. Not to mention the things to be learnt from trying to figure out how the floating droplets magnetise.

"This opens the door," Russell said, "to a new area of science in magnetic soft matter."

The research has been published in Science.