# Ampere's law for a loop with zero enclosed current [duplicate]

This question already has an answer here:

Imagine a wire with current I flowing through it. If we take a closed loop that doesnt contain the I the line integral will be zero. Does this means magnetic field is zero ? Also does Ampere law calculating the total magnetic field or only the sum of magnetic fields from the currents that are enclosed in the loop?

## marked as duplicate by Aaron Stevens, ZeroTheHero, John Rennie electromagnetism StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Feb 10 at 7:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• @AaronStevens nice catch; your memory is better than mine, or I’ve been here too long, or both. – ZeroTheHero Feb 10 at 1:33
• @ZeroTheHero Nah I just searched to see if there was a similar question. I can't remember things either :) – Aaron Stevens Feb 10 at 3:03

## 1 Answer

of course not. Unless you can argue that the magnetic field is constant over the loop so that $$\oint \vec B\cdot d\vec \ell= \vert\vec B \vert \oint d\ell$$ you cannot deduce anything about $$\vec B$$.

In the same way if a Gaussian surface encloses no charge it does not mean the field is 0 unless the magnitude of $$\vec E$$ is constant over the surface.