The lower magnet is fixed and the upper magnet can move only up and down. Like poles face each other, so they repel, and the upper magnet floats at the height where this balances gravity (the yellow arrow is the force acting on the magnet). Select the upper magnet and set translation and rotation to "Free" in "Mechanics", and it flips over and the magnets attract. This shows that magnets alone cannot levitate stably.
Modify this scene in the simulator, then open the "Scene" tab and click "Publish Current Scene to Gallery" to share your remix!
·
In short
Two magnets push against each other when their matching poles face. The top magnet floats above the bottom one because magnetic repulsion pushes up with the same force that gravity pulls down.
On a vertical guide, the floating magnet stays steady. If you push it down, magnetic repulsion gets stronger and pushes it back up.
Without the guide, the magnet cannot float. In free 3D space, it flips upside-down instantly, turns into an attraction, and snaps onto the bottom magnet.
This rule is Earnshaw's theorem: permanent magnets alone cannot float stably in mid-air in all directions.
What you are looking at
Magnetic repulsion between two permanent magnets and the demonstration of Earnshaw's theorem:
Bottom magnet: A cylindrical permanent neodymium magnet (Brโ=1.2ย T, radius 1.2ย cm) fixed rigidly to the ground.
Top magnet: An identical permanent magnet placed directly above it, with like magnetic poles facing each other (North-to-North or South-to-South).
Constrained strictly along the vertical y-axis, the top magnet bounces momentarily before settling into stable mid-air levitation above the bottom magnet. Yellow vectors depict the real-time magnetic forces acting on the magnets.
However, if you release the mechanical constraints and allow the top magnet to move and rotate freely in 3D space, it instantly flips upside-down, attracts the bottom magnet, and slams into it.
Magnetic dipole repulsion vs. gravity
Two coaxial magnetic dipoles m1โ and m2โ oriented antiparallel along the vertical axis experience a repulsive magnetic force:
Fmagโ(y)โ2ฯy43ฮผ0โm1โm2โโ
where y is the center-to-center vertical separation.
The downward force of gravity acting on the upper magnet of mass M is:
Fgโ=Mg
At the vertical equilibrium height yeqโ, the upward magnetic repulsion exactly matches the downward gravitational weight:
Along the vertical axis, this equilibrium is restoring (stable against vertical displacement):
If the magnet is pushed downward (y<yeqโ), the rapid 1/y4 surge in magnetic repulsion pushes it back up.
If pulled upward (y>yeqโ), gravity exceeds repulsion and pulls it back down.
โyโFyโโ<0(verticallyย stable)
Earnshaw's theorem and 3D instability
While vertical motion can easily be stabilized, Earnshaw's theorem (proven by Samuel Earnshaw in 1842) establishes that:
Why static magnetic levitation is inherently unstable in 3D
In magnetostatics without free currents:
โโ B=0andโรB=0โนโ2ฮฆMโ=0
The magnetic potential energy U=โmโ B satisfies Laplace's equation:
โ2U=โx2โ2Uโ+โy2โ2Uโ+โz2โ2Uโ=0
For an equilibrium point to be truly stable in all three spatial dimensions, all second spatial derivatives must be strictly positive: โx2โ2Uโ>0, โy2โ2Uโ>0, and โz2โ2Uโ>0.
However, because their sum must equal zero (โ2U=0), it is mathematically impossible for all three eigenvalues to be positive simultaneously:
If the vertical axis is made stable (โy2โ2Uโ>0), at least one horizontal direction must be unstable:
โx2โ2Uโ+โz2โ2Uโ=โโy2โ2Uโ<0
Any horizontal displacement creates an outward force that pushes the magnet sideways off its cushion. Furthermore, the torque T=mรB creates a rotational instability that causes the upper magnet to flip 180โ into an attracting configuration.
Motion mode
Mechanical constraint
Stability
Physical outcome
Guided (1D)
Constrained to vertical axis (y)
Stable
Floats in equilibrium at yeqโ
Free (3D)
Unconstrained translation and rotation
Unstable
Flips over and snaps onto bottom magnet
Overcoming Earnshaw's theorem in engineering
To achieve true, unconstrained 3D levitation, practical systems must bypass the assumptions of Earnshaw's theorem:
Dynamic active feedback: Electromagnetic suspension (EMS) using fast optical sensors and electromagnets.
Diamagnetism and Superconductivity: Diamagnetic materials (ฮผrโ<1) and superconductors (Meissner effect and flux pinning) whose magnetization M is not fixed, but opposes the local field.
Rotation (Spin-stabilized levitation): The Levitron magnetic top, where gyroscopic precession counteracts the flipping torque.
Comments