 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 Biot-Sawar law and the other one is Ampere's circuit law. To use Biot-Sawar 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 Biot-Sawar does and that's and then you 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 Biot-Sawar at all but instead we'll use Ampere's circuit law. What does this say? It's 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. I have talked more about that in our previous videos on Ampere's circuit law. If you need 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 integral 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 with 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've seen before I mean in our earth stats 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 guava 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 thumb now let me show you what's special about this situation because every single point is at the same distance from the center 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 hundred the magnetic field over here should also be hundred because the same distance this also a distance r this 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 hundred even here the magnetic field should say value should say the same it's hundred and we're going to take the advantage of that because the magnetic field everywhere has the same value if we choose a very specific closed loop maybe b over that loop becomes a constant and then i take the integral that b can come out and the integral that 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 d l 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 d l 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 ampere's law work but it's not gonna help us so to take advantage maybe you have guessed it let's choose a circular loop itself and we call this an amperean loop whatever loop you 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 we 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 d l and the direction of d l everywhere is in the same direction as b because both are circles so over here d l is in this direction same direction as b over here d l is in same direction here also d l is in same direction and so now the dot product also becomes easier to calculate because b and d l everywhere are 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 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 d l but since the angle between b and d l is zero cos zero is one so this will just be b d l so i'll just get magnitude of b times magnitude of d l so i only have to worry about magnitudes now i 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 d l now what is integral of d l well logically integrating d l means adding up all so adding up all these pieces tiny tiny pieces of d l adding all of them up tiny lengths what happens when you add all these tiny lengths 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 over here yeah so what what happens we get b times what's the circumference of the circle it's two pi r it is two pi times r which are small r or capital r well we're taking circumference of this circle right that's why it's small r 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 i 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'll 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 i is punching through that film and so the entire current i would be our i enclosed and now we can calculate what b is let me write that over here b equals mu naught i divide by if we rearrange that we get divide by two 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 one 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 in the world 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 to long straight wires i go back to ampere's law and derive it