Hans Christian Oersted performed a simple experiment to demonstrate the magnetic effects of electric current.
(i) When current was allowed to pass through a wire AB placed along the axis of magnetic needle kept directly below and close to the wire that needle was found to deflect from its normal position.
(ii) The deflection of the needle was found to be in the opposite direction on reversing the direction of the current by reversing the polarity of the battery.
(iii) Deflection of the magnetic needle change with the strength of the electric current. The deflection of the needle increase with the increase in current and vice versa
He concluded that an electric current (i.e. Flow of electric charges) in a conductor produce magnetic field in the space around the conductor. In another words flow of electric charges is the source of magnetic field.
Ampere's swimming Rule :
Direction of the deflection of magnetic needle due to electric current in a conductor can be found by applying ampere swimming rule .
" Imagine a man who swims along the conductor in the direction of current facing the needle such that current enters his feet than north of needle with deflect towards his left hand."
Ampere's swimming rule is also known as SNOW rules - if the current flow from South to North in the wire kept over a magnetic needles the north of the needles will deflect towards west.