Pro 🔒~15 min

Magnets and Electromagnets

Explore permanent magnets and electromagnets

How it works

A moving electric charge creates a magnetic field. In a coil (solenoid), each turn contributes to a net magnetic field inside, analogous to a bar magnet. The field strength is proportional to current and turns per unit length. Reversing current direction reverses field polarity. Permanent magnets have aligned electron spins that act like many tiny current loops.

Upgrade to Pro to access this experiment

Step-by-step

  1. Toggle between bar magnet mode and coil mode.
  2. Use the compass to probe field direction anywhere in space.
  3. Increase current to strengthen the electromagnet.
  4. Switch to the field line view to see the full pattern.
  5. Compare the coil field to the bar magnet field — they look identical far from the source.

Key formulas

  • Bsolenoid=μ0NLIB_{solenoid} = \mu_0 \frac{N}{L} IMagnetic field inside solenoid
  • F=qv×B\vec{F} = q\vec{v} \times \vec{B}Force on moving charge

Frequently asked questions

What happens to the electromagnet field when you reverse current direction?
Field reverses — north and south poles swap.
A solenoid with 100 turns, 10cm long, carries 2A. What is B inside?
B = μ₀(N/L)I = 4π×10⁻⁷ × (100/0.1) × 2.
Why is an iron core placed inside an electromagnet?
Iron has high magnetic permeability — it amplifies the field by hundreds of times.