If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Field due to straight wire carrying current (Outside)

Let's find the expression for the magnetic field outside a straight long wire carrying current. Since the magnetic field is symmetric around the conductor, we can use Ampere's circuital law. Created by Mahesh Shenoy.

Want to join the conversation?

  • blobby green style avatar for user Kavin
    At you say ''only magnitude of the magnetic field matters'' ,but while calculating 'magnetic field on the axis of current loop' you took in consideration of direction of the magnetic field. Can you explain why you considered direction in that case and didn't in this case. Thanks
    (1 vote)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Apoorv Gupta
      "only magnitude of the magnetic field matters" is being said ONLY for B vector and dl vector. Do not confuse dl vector with the length vector of the wire, here the dl vector is for the length vector(with direction) of the amperian loop and NOT the direction of length of the wire.
      As the angle between B and dl is 0, cos0 will be 1 and B.dl(B.dl = B*dl*cos0) will be equal to B* dl. As for the current I, one direction is positive and other is negative and it will depend on the direction of dl vector.
      (1 vote)

Video transcript

say we are given a long thick wire whose radius is r and the current through it is i imagine this is a very long infinitely long wire if you want our goal is to figure out the magnetic field everywhere in space in this video we'll focus on calculating the magnetic field outside the wire and in the next video we'll calculate the magnetic field inside the wire so let's say we want to calculate the magnetic field at some distance r at this point the question is how do we do this well we have seen two laws that help us calculate magnetic field due to current one is called the bosavar law and the other one is ampere's circuit law to use bo savar we have to take this entire conductor and divide into tiny tiny pieces and calculate the magnetic field due to each piece because that's what bo server does and that's and then we have to add all of that up and this is a very long conductor meaning we have to integrate this is going to be a nightmare so not going to use biosavar at all but instead we'll use ampere circular law what does this say just a quick refresher it says choose a closed loop and walk along that loop and calculate this integral and that should always always equal mu naught times the current enclosed by the loop and we've talked more about that in our previous videos on ampere circuit law if you need a more refresher feel free to go back and check that out but at this point you might say hold on a second mahesh even this has an integral so what's the point the point is in certain situations like this one as we will see we can choose very specific closed loops very special closed loops and if you do that then this interval becomes super easy really really easy you don't even actually have to integrate and then we can use this in a few steps we can calculate what the magnitude what the value of magnetic field is that's the whole idea so the question is what closed loop should i choose over here well before we do that let's look at how the magnetic field looks like then i can think about what the closed loop would what loop should i choose so what would the magnetic field look like over here well we have seen before i mean in earthstats experiment that magnetic field through due to a wire will always be in concentric circles so the magnetic field over here would be in a circular shape so maybe somewhat like this goes from behind comes from here and guala and what's the direction of that field well we use right hand thumb rule if the thumb points in the direction of the current the encircling fingers will give us the direction of the field and so our direction of the field would be this way let me get rid of the term now let me show you what's special about this situation because every single point is at the same distance from the center this is a circle right the magnetic field everywhere should have the same value so the magnetic field over here for example it's tangential so it's going to be in this direction and if the value over here is 100 the magnetic field over here should also be 100 because the same distance this also a distance r this is also a distance r so over here again it's going to be tangent and maybe it's into the screen but the value should stay the same 100. even here the magnetic field said value should stay the same it's hundred and we're gonna take the advantage of that because the magnetic field everywhere has the same value if you choose a very specific closed loop maybe b over that loop becomes a constant and when i take that integral that b can come out and the integral can become very very easy so can you pause the video and think about what closed loop would you choose so that the integral would become easy so pause and give it a try it's okay if if you're wrong but it's just just give it a shot try it okay let me start by choosing a rectangle just like that so what will happen if i choose a rectangle can i use ampere's law yes ampere's law works for any closed loop i can walk along that rectangle calculate that b dot dl integral and i should get mu naught times the current and cost the problem is because every point is not at the same distance from the center that means the magnetic field everywhere over on this is not the same and so now that integral becomes really really complicated even the direction of the b and the direction of dl will also be like not the same so calculating dot product will also be really complicated so don't choose a rectangle it's not a good loop amperes will work but it's not going to help us so to take advantage maybe you have guessed it let's choose a circular loop itself and we call this an amperian loop whatever loop we are choosing so let's choose a circular loop of the same radius r okay here we go now notice as i walk around that loop the magnetic field value everywhere is going to be the same and so b can come out but another interesting thing is remember we have to do a dot product so we need to also know the direction of dl and the direction of dl everywhere is in the same direction as b because both are circles so over here dl is in this direction same direction as b over here dl is in same direction here also dl is in same direction and so now the dot product also becomes easier to calculate because b and d l everywhere are in the in the same direction so why don't you pause the video now and try yourself okay i'm hopefully you're all pumped up to try yourself what the left-hand side eventually simplifies to so pause and give it a shot okay let's do this let's do this together so what happens when i simplify the left-hand side let's only consider on the left-hand side b and d l are in the same direction so what happens to b dot d l remember dot dot product b dot d l would be so b dot d l would be b d l cos theta where theta is the angle between b and dl but since the angle between b and dl is 0 cos 0 is 1 so this will just be bdl so i'll just get magnitude of b times magnitude of dl so i only have to worry about magnitudes now don't have to worry about direction anymore okay what is that equal well notice because the magnetic field is the same everywhere the magnitude is all that matters now the magnitude of the magnitude of the field is the same i can pull this b outside so this is a constant this is a constant so i can pull that b outside the integral and now i just have to do integral of dl now what is integral of dl well logically d integrating dl means adding up all so adding up all these pieces tiny tiny pieces of dl adding all of them up tiny links what happens when you add all these tiny links you get the total length right and do we know what the total length of this loop is yes it's a circle we know the total length of a circle that's the circumference yay so we don't have to do an integral and that's what we meant this is the circumference this is circumference and therefore what happens let me write that down over here now um let me write it over here yeah so what what happens we get b times what's the circumference of the circle it's 2 pi r it is 2 pi times r which are small r or capital r well we are taking circumference of this circle right that's why it's smaller so always think about what we are doing and you will not have any confusion and that's our left hand side like i promised no integral at all okay now let's look at the right hand side what is the right hand side we get mu naught times i enclosed what is i enclosed it is the current that is enclosed by the loop and you can see that the entire current eye is enclosed by the loop but i'll do what ampere suggests us in general ampere tells us to attach a surface to it and then find what the current passing through that surface and the way i imagine attaching a surface is imagine i dip this entire loop in a soap solution and then there will be a film attached let me draw that there you go and i enclosed is the current punching through that film and you can now see that the entire current eye is punching through that film and so the entire current i would be our iron closed and now we can calculate what b is then let me write that over here b equals mu naught i divide by if we rearrange that we get divided by 2 pi r and what we see is that the magnetic field depends on the current which makes sense more current more magnetic field and we also see it's inversely proportional to the distance from the center the farther i go the magnetic field drops as 1 over r which also sort of makes sense what's interesting to see is that capital r is not in the picture at all which means the thickness of the conductor doesn't matter so whether this was a thick conductor or it was a thin wire as long as the current punching through was the same the magnetic field remains the same incredible isn't it uh is this obvious not at all but ampere's law helps us understand that because in ampere's law we say that it doesn't matter how thick that current wire is as long all that matters is how much current is penetrating and therefore whether it's a thick wire or a thin wire you get the same result and finally look at the number of steps involved not much right so you don't even have to i don't even remember this equation whenever i have to think about the magnetic field you do long straight wires i go back to ampere's law and derive it