 Let's talk about magnetic field energy, how much energy is stored in a magnetic field and also let's derive an expression for that. And I'll also talk about why this concept is truly, truly special. Alright, I want to keep the math simple. So let's start off with a familiar setter and that of a charged inductor. Let's say that there is a current I flowing through this inductor. Now we can ask ourselves, what is the energy stored in this inductor? We have actually derived that expression and the expression looks like this. The energy stored in the inductor is half into the self-inductance of this solenoid into I square, current square. We can also think about where is this energy really stored in the inductor? Why don't you pause the video and think about it? Alright, since we know that there is current flowing in the inductor and this is current flowing in the coils, it will produce a magnetic field and the magnetic field would look like this. So the energy in an inductor is actually stored in the magnetic field, magnetic field within the coil. Just as the energy of a capacitor is stored in the electric field between the plates. Now because we are interested in figuring out the magnetic field energy, we need to bring in that factor somehow in this equation. So maybe pause the video and think about how we can include or insert the factor of magnetic field in this expression. Alright, we know that inductor is basically a solenoid and it has current going through it so it produces its magnetic field lines. So this magnetic field line, this must have a strength of its own and that could be a way of inserting the factor of B in our expression. Now magnetic field due to solenoid, this is given by, this is given by this expression right here, mu naught n i divided by L. Here L, L is the length of the solenoid. Alright so we can write i in terms of B and maybe put that here. But we also have this self-inductance and we did learn one expression about self-inductance for a solenoid which looked like this, mu naught n square A divided by L. Now it has some common terms, it has L, it has N, so maybe in place of L, let's write this expression and see what we arrive at. But firstly let's keep i on one side and everything is on the other side to figure out what can we substitute. Let's write current in the form of B, so this will be i equals to capital B into L divided by mu naught into N. So let's put in this i, this i right over here and let's put in this L, the self-inductance right over here. That will make the energy as half into mu naught N square A divided by L and into i square, this is not just i, this is i square, so all of this gets squared and when we do that that becomes B square into L square divided by mu naught square into N square. Now we can see that couple of things get cancelled right away. This N square just gets cancelled and one power of mu naught also goes away, one power of L also goes away. So let's rearrange this and when we do that this becomes half into B square divided by mu naught into A into L. Now A into L is nothing but the volume of this solenoid. This is the volume where the magnetic field is present in or residing it. One assumption goes here, that assumption is that we are assuming that the magnetic field is zero outside the volume of the solenoid or extremely extremely weak outside the volume of the solenoid and all the magnetic field that there is is just inside the solenoid. We can think of this magnetic field energy as residing in the volume that is enclosed by the windings which is AL. So this factor right here is that is the volume and when we take this factor to the left hand side what do we get? We get the magnetic field energy U divided by the volume and this is equal to half into B square divided by mu naught. Now energy divided by volume what can we call this? We know we used to write mass divided by volume and that give us density that is the density of matter. Here energy divided by volume would be energy density. So this we can write this as energy density and this is particularly magnetic field energy density which is given by half into B square divided by mu naught. The units of this would be joules per meter cube and we have done something similar before but for electric fields so for that we used we used a capacitor and we try to figure out the energy of electric field, the energy density of electric field which came out to be as epsilon naught E square by 2. If we try and compare these two energy densities there is some interesting things that come up. So firstly we can see that there is there is a factor of half common and we can also see that both the energy field densities they depend on the square of the field. This one depends on E square and this one depends on B square. We can also see that the constants epsilon naught usually in all the relations in electric field usually it comes in the denominator it comes below but here it is upwards and over here mu naught in magnetic field like we can see over here and here usually it comes in the numerator but this is in the denominator. Also in the case of electric field this represents the work that the battery does to arrange the charges in some way and in this case it represents the work done by the battery to get a current of I going through an inductor and it takes work because the inductor opposes the building up of current it opposes any change. So there is some sort of a parallel between them even from the lens of work done and when you study electromagnetic waves you will realize that one is just the other. These two energy densities are exactly equal to each other. Lastly why I feel this relation is truly special because have a look at this. This is this is half into B square divided by mu naught. There is no self inductance there is no current. So this is a general expression of the magnetic field energy density. It doesn't matter if you take an inductor or a wire or just a bar magnet and you try to measure the magnetic field energy density created due to that you can still rely on the same expression. It does not really depend on any source. For instance if you had a ball if you had a ball moving to the right with a velocity V and it had a kinetic energy of half mv square it wouldn't matter whether this ball got this kinetic energy from someone who kicked this ball or the ball rolled down the hill. If you see this at one instant it has a kinetic energy of half mv square. You do not really know what the source is but you can still calculate the kinetic energy using this regardless of what the source is just like over here. Also it completely blows my mind that the energy is in the fields energy is in vacuum. There is nothing in the air but there is energy present in the air because of magnetic field lines which is just truly special for me.