# How do magnetic field lines cancel outside of a solenoid?

Please explain me briefly, how magnetic field lines cancel outside solenoid?

There is only one wire wrapping it and therefore only one direction of current so how can magnetic field cancel out? How can we use any rule to determine the direction of the magnetic field?

• What do you mean by the lines cancelling outside the solenoid? As far as I'm aware they do not cancel out and the magnetic field strength remains > 0 everywhere. Can you maybe draw a diagram to illustrate what you're asking? Commented Jun 9, 2015 at 10:12

## 6 Answers

A clarification first. If we are talking about a solenoid of infinite length, then indeed the magnetic field outside is equal to zero. But for a real world solenoid its just very weak compared to the inside of the solenoid.
Let's talk about the first case first. Consider a cross-section that cuts the solenoid with a plane parallel to it. So, if you visualize it, you will see (for example) in the upper side of the cross-section the current popping out and in the lower side the current in the opposite way. Because of the infinite length, each side(the upper and lower) will produce magnetic fields that are opposite to each other, will only have horizontal direction(as each wire's vertical component of its produced magnetic field cancels out with the vertical component of the produced magnetic field of the current in the neighboring loops) and will not be dependent on the distance from the center of the solenoid(you can show that with the Biot-Savart law). The last fact is a consequence of the infinite length(infinities tend to give such "nice" results). Keeping these things in mind, the produced magnetic field from the upper and lower sides of the cross section will add up on the inside, thus giving it double the intensity while they completely cancel out(due to opposite directions) on the outside of the solenoid(due to the fact that both fields are equal in size at each point in space).

Now, for a finite-length solenoid, the magnetic fields of the upper and lower part of the cross-section will be dependent on the distance from the center of the solenoid and thus will not completely cancel out. Now, the field inside will be close but not exactly equal to double the amount of each field's strength(if the radius of the solenoid is small. If not, then the field will again be the algebraic sum of the two magnetic fields, but now the fields will not have nearly identical values at each point due to the fact that the distance of the two fields from the center will have a big difference). With the same logic, the field outside is close to zero but not zero. Also, at some point in space outside the solenoid, there will also be vertical components of the magnetic field due to the fact that near and at the edges of the solenoid, the vertical components of the magnetic field will not cancel out because there are no loops that carry current(and thus produce magnetic field) after the edged.

NOTE: In my opinion, the argument that the magnetic field outside the solenoid is weak because the magnetic field lines spread out to a very large space(out to infinity) is wrong. The reason for this is because magnetic field lines are not like lines that are used to describe the motion of water because water has limited quantities. For the description of water, you can use this as an argument for water density, because if the limited amount of water spreads out(thus the lines will be spread out) it means that the density will be low. But here, the magnetic field lines describe a field which depends a great deal of the current, so in that respect there is no shortage of it. For example, if we measure the distance from the upper side of the cross-section(z=0 at the upper side), then at z=a and z=-a (where a

• I can't get why magnetic field lines are shown if they are 0 outside? Commented Sep 23, 2016 at 13:18
• @BEWARB because you have zero magnetic field outside in the case where the solenoid has infinite length. But, this is not physically possible. So, in the case where its length is much bigger that its diameter, you have APPROXIMATELY zero magnetic field outside. In this case, some magnetic field is "leaked" from the open sides of the solenoid but that magnetic field is way too weak compared to the field inside the solenoid. If the solenoid has small length, then the whole argument is not valid. Commented Sep 23, 2016 at 16:54
• Actually the field outside of an infinite solenoid with current I should be the same as an infinite long wire with current I. Same logic as for deriving the wire magnetic field applies here. Commented Sep 13, 2017 at 21:57
• Amazing answer. This cleared things up for me, as I came across this in Griffiths and wasn't satisfied with the Ampere's Law argument. It reminds me of the constant electric field due to an infinite plane charge distribution that he talked about in chapter 2. Commented May 12, 2022 at 19:47

Magnetic field lines in and around a solenoid do not cancel out. This can be easily tested using a plotting compass. If the solenoid is long ( length $l > 10\, d$ greater than 10 times diameter) then the strength inside can be constant and given by $$B = \mu_r\mu_0\cdot \frac{n}{l}\cdot I$$ where n is number of turns per unit length and I the current through the wire.

In the limit as the length of a continuous solenoid goes to infinity, the magnetic field outside the solenoid goes to zero. One visual way to think about this is to consider the magnetic field lines from opposite sides of the solenoid. Using the right hand rule, you can see that the magnetic fields originating from opposite sides of the solenoid point in opposite directions. Ultimately, the magnetic fields originating from all the wire segments in the solenoid cancel out to give zero field everywhere outside the solenoid.

The solenoid is housed within a metal sleeve that is grounded and acts as a Faraday Cage. If it didn't then your radio and other electronics would let you know it every time you energized the circuit. Never heard of a solenoid cancelling its field. All electronics have shields to prevent radiation outside and within the chassis.

Why choose a continuous solenoid that goes to infinity? The situation that you have described sounds like an simple alternating current. Without bridge circuits or capacitors it would be quite noisy. As the current began to fall the magnetic field would fall and the solenoid would spring open. As the current from the opposite direction began to rise the magnetic field would energize causing the solenoid to close. The opposing rising and falling fields, both electric and magnetic, would produce hysteresis and the whole thing would start to get really hot. Conclusion being to use direct current with one in-phase power source. Simpler is always better.

https://arxiv.org/abs/1610.07876

This explains it properly and logically.