When an electric current flows through a wire, it generates a magnetic field around it.
Strength of magnetic field
The magnetic field produced by a straight wire has concentric circles surrounding it, oriented perpendicular to the wire. The strength of the magnetic field increases with the current and proximity to the wire.
Solenoid
A solenoid is a straight wire carrying an electric current that produces a magnetic field. Shaping a wire into a solenoid increases the strength of the magnetic field created by a current. The magnetic field produced inside a solenoid is both strong and uniform. Placing an iron core inside a solenoid can increase its magnetic field strength.
Electromagnets
An electromagnet is a type of magnet that produces a magnetic field through an electric current passing through a coil of wire. It can be turned on and off by controlling the electric current. One can wrap a wire around an iron nail to create a basic electromagnet. The strength of an electromagnet can be altered by adjusting the current passing through it. This means the magnetic force can be increased or decreased depending on the electric current flowing through the wire. A compass can be used to map the magnetic field of an electromagnet.
Right-hand grip rule
This rule is used to remember the direction of the magnetic field. It can be helpful to recognise the direction of the magnetic field (where a compass needle points) when held near a wire. An easy way to do this is using the 'right-hand grip rule'. To use this rule, extend your right hand with your thumb tucked in and pointing upwards. The thumb indicates the direction of the current, and the fingers show the direction of the magnetic field.