When a magnetic needle is brought nearer to a bar magnet it gives deflection. As the needle approaches nearer and nearer, the deflection also increases gradually. Again, if it is taken away from the magnet, deflection also starts decreasing. Hans Christian Oersted was a Danish scientist who explored the relationship between electric current and magnetism. Current is the flow of electrons, and is how we hardness electricity. Currents create their own magnetic fields in closed loops, which magnets are known to induce, or create current, in wires. In Oersted’s experiment, it is seen that magnetic needles deflection if they are kept near a current-carrying wire. Deflection is more near the wire and less at far point and no deflection are seen at long distance. From the above discussion it is clear that there exists the influence of a bar magnet or a wire carrying current at nearby space. This space is called magnetic field. So magnetic field may be defined in the following way.
Definition: The space or region around a magnet or a wire carrying current whereby the magnetic needle shows deflection, that space or region is called the magnetic field of that magnet or wire carrying current.