After reading this section you will be able to do the following:

  • Describe how a magnetic field is created.
  • Explain how the electromagnet and the solenoid work together.

In 1820, a Danish scientist named Hans Oersted discovered that a magnetic compass could be deflected from its resting position if a wire carrying electric current were placed near the compass. This deflection of the compass only occurred when current was flowing in the wire. When current was stopped, the compass returned to its resting position.

When electrons flow, a magnetic field that is perpendicular to the current flow is induced. For the case of current in a wire, the magnetic field circles around the wire getting weaker with distance away from the wire.

Magnetic Field

This graphic seems to indicate that any wire in which an electric current is flowing is surrounded by an invisible force field called a magnetic field. For this reason, any time we deal with current flowing in a circuit, we must also consider the effects of this magnetic field. We have all probably had experiences with magnets at one time or another. Magnets attract certain types of material like iron but almost nothing else. Magnets and magnetic fields will be discussed more in depth in the Magnetism module.


The term electromagnetism is defined as the production of a magnetic field by current flowing in a conductor. We will need to understand electromagnetism in greater detail to understand how it can be used to do work.

Coiling a current-carrying conductor around a core material that can be easily magnetized, such as iron, can form an electromagnet. The magnetic field will be concentrated in the core. This arrangement is called a solenoid. The more turns we wrap on this core, the stronger the electromagnet and the stronger the magnetic lines of force become.

When current is passed through a solenoid, the core of the solenoid becomes magnetized.


We have created an electromagnet, which behaves just like a regular permanent bar magnet when the current is flowing. Notice that all of the lines of force pass through the center of the core material, regardless of how they extend outside the coil of wire. The direction of magnetic polarity is determined by the direction of current flowing in the coil of wire. The direction that the wire is coiled around the core also determines the direction of magnetic polarity. This is important to know if we want to use the electromagnet to apply a force to another material.

In the next sub-unit you will learn how the electrostatic field and field intensity are related to electromagnetism.


  1. A magnetic field is generated anytime an electrical current flows through a conductor.
  2. The magnetic field around the conductor flows in closed loops.
  3. Wrapping the wire into a coil creates an electromagnet.
  4. Wrapping the wire around a piece of iron creates a solenoid.