Summary
Highlights
Electromagnetism is the process by which electric currents generate their own magnetic fields. When current flows through a straight wire, it produces concentric circular magnetic field lines around the wire, strongest nearest to it.
The direction of the magnetic field depends on the current's direction. The right-hand rule states that if your thumb points in the direction of current flow, your curled fingers indicate the magnetic field's direction.
When a wire is formed into a circular coil, the individual magnetic fields combine to form a single field running through the coil's center. Further coiling the wire creates a solenoid, which produces a strong, uniform magnetic field inside, similar to a bar magnet.
Electromagnets are created using electricity and are only magnetic when current flows. Their magnetic field can be turned on and off, and its direction can be reversed by changing the current's direction.
To enhance an electromagnet's strength, one can increase the current, increase the number of turns in the coil, decrease the coil's length (making turns more densely packed), or add an iron core, which becomes an induced magnet when the current is on.