We're going to go ahead and move on to Ampere's law. Ampere's law uses vector calculus like Gauss's law. It's Tom Cruise again, he's texted me. He says, "We did the B field at the center of a loop. Let's do it off axis." It's not easy, but for Mr. Cruise fine, we will do it off axis. We can do it because it's a symmetry problem really, so let's do the B of a current loop off axis, and maybe Mr. Cruise will come run across the campus like he does in all of his movies for us or something. What we're thinking then is current loop like this, and we calculated it in the center, the B field right here, but what if we come out here, I think I'm going to call it the Z direction. I don't have any notes about this. Before we got it right here, let's be more general. Can we do it? I don't know. We still have symmetry really, we do have symmetry. Even though we're not in the center, we're still symmetric with respect to the circle, so we will probably be able to do it. Let's write our dB is Mu_naught I over 4Pi ds cross r-hat over r squared. We'll assume the same thing, it has a current I, and radius, a. Let's imagine a ds right here on top, like that, ds is like that, we want to pick a position at some distance z from the thing. We're at a position z like that, and we have a radius, a, right there. Now, our r vector is from ds, this position to there, except the line should be straight. Ds to z, that's perfect. Then here is r, there's all of our vectors. All we got to do is add up the field we get here is we go around the circle. Let's say B is going to be, I'll go and pull out what constants we know we have Mu_naught I over 4Pi times the integral around a circle, we have ds cross r over r squared. Well, we know ds is ds and we know actually it's still true that ds is always perpendicular to r, it's hard to show in this drawing, that ds is this way. R even though it's pointing down, they're still at 90 degrees to each other and anywhere you go, they're actually going to be at 90 degrees to each other. Then we have to say that's fine. It's ds crossed with r-hat. R-hat is one, sine of 90 degrees is one, so it's just ds over that r squared. Now that r is this distance here, but we also have a right triangle here, so it's this little r, or the magnitude of the r vector is the square root of a squared plus z squared. But it's squared, so down here, we put a squared plus z squared. Then the last thing we need is the direction. We have a direction from this cross product. What is the direction? Well, we're going to cross dS with r-hat, which is like that going down. If r-hat were this way and we're just out and in it would be up, but our hand has to tilt down a little bit. It's ds cross r that way. The dB, it's created, is actually like that. It's perpendicular to r as it should be, like that. That's at a strange angle. Well, what I'm going to describe here as I'm going right angle, I don't know what angle it's at. Some angle we have to deal with. Now, how are we going to deal with that? Well, now let's think about symmetry. What about this ds down here? That ds is going into the board. It has its own r-hat, ds cross, let's see, so ds going into the board crossed with r, out down like that. That dB on that side is like that, and now you can see our old symmetry tricks. You can see that the vertical components of the b's are going to cancel. The horizontal components are going to add. This is another case of symmetry. We don't have to worry about this angle. We're only going to get the z component, so B only in the z direction. The other components cancel. Okay? How do we get that component? Well, what angle do we know? Let's see. Let's call this angle Theta. If that angle is Theta, then that angle is Theta, and if that angle is Theta, then that angle is Theta. If you stare at it long enough, you'll believe me. All those angles are Theta. So then we know that it's the cosine component, it's the adjacent over hypotenuse component. So we need a cosine on there. Let's go and write it, then. B equals Mu naught I over 4 Pi integral around the circle of ds over a squared plus z squared. Now we know we need this cosine component. Cosine of this angle is adjacent a over hypotenuse. A over the square root of a squared plus z squared. Now that we have that component, we know it's in the k hat direction. Looks like we're setting up a nasty integral. Or not. Because let's look at this B. Let's pull all the constants. Mu naught I over 4 Pi. We have an a here, well that's a constant. A is a constant. We pull that up, and down here, usually, this is this nasty integral thing we've created, but not this time. It's a constant. A is a constant and the position we're calculating out is a constant, we're not integrating along z, we're integrating around the loop. Anywhere you go around the loop, around the circle, z is the same. It's always z. So that's actually a constant, and it's to the 3/2, here it is to the 2/2 plus to the 1/2. So it's a squared plus z squared to the 3/2. What's left? Only ds. Ds is all that's left. Ds becomes the circumference. It becomes 2 Pi a, like I showed you just a minute ago. B then is Mu naught Pi, 2 Pi a. So 2 Pi is up here. The 2 Pi is going to cancel that 4 Pi and just leave you with a 2 down here that a is going to square that a. Mu naught I a squared over 2 times a squared plus z squared to the 3/2, all in the k hat direction. So there you go. Now, not only do we know the B field in the center of the loop, we know it for all distances along the axis of the loop. Whenever you do a problem like that, there's a way to check it. One way to check it is, does it match our answer here in the center of the loop? Well, that's simply the answer when z is zero. So let's let z be zero, z goes away. Square root of a squared is a cubed. A cubed in the bottom, a square in the top becomes MU naught I over 2 a. It worked. It's even in the right direction, in the k direction. What if you get far away? Let's think about far away from it. If we got far away, the problem would look a little bit like this. Here's a little current loop. We're way out here. It's almost like a little piece. It's a magnetic dipole. It's like a little source of magnetism. We talked about how loops are important. We've called the magnetic dipoles in terms of thinking about the torque on them. So this is another regime where you're so far you can think about it as a finite little magnetic thing, and you can figure out what its B field is. In this case, z is much bigger than a. What you can do then, anytime you have a sum of two parts, a sum of two terms, and one's bigger than the other, you just ignore the little one. We could write then, B is Mu naught I a squared. We don't ignore the a there because it's not being added to anything, it's by itself. Over 2. Now, this was supposed to be a squared plus z squared, but we're saying a is small compared to z. So z squared to the 3/2. Well, that's just z cubed. 2 z cubed. So there is what the magnetic field becomes, Mu naught I a squared over 2 z cubed, yeah, when you're far away from a magnetic dipole moment. You can even go a little further. Remember that we define the magnetic dipole moment as the current times the area. So if we just stick a Pi here like that, multiply by Pi over Pi, then we've got Mu naught over 2 pi. Pi a squared is the area times a, that's Mu, that's the magnetic dipole moment Mu over z cubed. We see that the magnetic field of a dipole moment, if we're along its axis, goes off as z cubed, goes off really fast. That's the same result you get if you did the calculation for an electric dipole moment, both of them have a field dropping off with the distance cubed. Thank you, Tom Cruise, for bringing that up. That was an important point to look at.