When a current flows through a wire, a magnetic field is created around the wire. This field is made up of concentric circles perpendicular to the wire, with the wire in the centre.
This can be seen by placing a compass near a wire which is carrying a current. As you move the compass, it will trace the direction of the magnetic field
Changing the direction of the current changes the direction of the magnetic field
You can use the right-hand thumb rule to work out which way it goes.
The strength of the magnetic field produced changes with the current and the distance from the wire. The larger the current or smaller the distance, the stronger the field
Uses of electromagnets
Can be used in cranes to attract and pick up things made from magnetic materials