On April 21, 1820, Hans Christian Oersted was delivering a lecture when he first noticed that a compass needle deflected from magnetic north when the electric current of the battery was switched on and off. This confirmed a direct relationship between electricity and magnetism. Oersted first thought that magnetic effect radiate from all sides of a wire carrying electric current but later when he did his research, he found out that electric current produces a circular magnetic field as it passes through the wire.