If electric current flows in a coil, it experiences a force and moves. Spinning a magnet in a coil of wire generates electricity. Transformers change the size of alternating voltages.
Magnets have a north pole and a south pole. Field line patterns show the direction and shape of a magnetic fieldAn area around a magnetic material or the moving electric charge through which the force of magnetism acts.. These diagrams are made using a plotting compassSmall magnetic compass used to detect magnetic fields.. In diagrams of a magnetic field the arrows on the lines show the direction from the north to the south poles.
A magnetic field is also created when an electric current moves through a coil of wire.
Plotting compasses can be used to show the shape and direction of the magnetic field created by a coil of wire.
Straight wire
Flat circular coil
Solenoid
A solenoid is a long thin spiral of wire used to produce a magnetic field.