The Ampere's law states that the net magnetic field in a loop is proportional only to the current inside the loop. So if we calculate the net magnetic field in figure 1 and figure 2 we would obtain the same magnetic field. (the loop is the same in both the cases). But figure 2 has a larger number of currents going into the plain of paper. So would those outer currents have no effect on magnetic field of the loop?
2 Answers
More accurately, Ampere's Law states that:
for any closed loop path, the sum of the length elements (of the loop) times the magnetic field in the direction of the length element is equal to the permeability times the electric current enclosed in the loop.
If you add current sources external to the loop then they won't alter the total sum as described above. But they can alter the local value of the magnetic field at any point in the loop - only the sum of all elements remains unchanged.
Similarly, if you re-position the enclosed currents inside the loop then, so long as you don't move them outside the loop the total sum won't alter. But the local field at any point along the loop may change.
Yes, they would have no effect on the net magnetic field in a loop. Take a "pie slice" of an annulus centred on the current. If the loop is the boundary of this slice then you can calculate the net field to be zero, since the field along the arcs is inversely proportional to the radius. The same is true for any shape of loop which does not enclose the current. You could "prove" this by approximating the loop with tiny radial and arc segments. Or use a theorem of calculus (which can be proved the same way).