If you are reading this article, you might already know how an electromagnet functions. If not, let me introduce you to this beautiful concept.

Hans Christien Oersted proved that a current carrying conductor produces a magnetic field around it. The field lines are circular In shape and is formed throughout the entire conductor.

A solenoid is a wire wound in the shape of a cylindrical coil or a helical spring. If we use Oersted's findings, and pass current through the solenoid, it starts behaving like the bar magnet since the magnetic field lines produced in it are akin to the bar magnet. 

                                                                           Solenoid

To increase the strength of the 'magnet', we might insert a soft iron core inside it. Due to soft iron's low retentivity and low coercivity, it serves its purpose. 

Now you might have a very common enquiry- Why a magnetic field is generated around a current carrying conductor - like in an electromagnet?

Let's choose a section of the wire as the core of our thought experiment.





In this above diagram, we have placed a positive test charge near the conductor wire. Inside the wire the negative charges(electrons) are in motion. Also, for every positive charge there is a negative charge hence the conductor can be said to be neutral.

If the test charge is made to move in the direction of the negatively charged particles such that these particles(electrons) appear to be at rest, then- for the test charge, only the positively charged particles are in motion.

Before proceeding further, let's look at the effect of speed on objects.  When objects are raced at a speed close to that of light, there's an alteration in its length. At higher speeds the body contracts, and that is known as Lorentz contraction. If we go by the definition of Lorentz contraction (src: Wikipedia) Length contraction is the phenomenon that a moving object's length is measured to be shorter than its proper length, which is the length as measured in the object's own rest frame.


If we apply this same concept, to the conducting wire and then observe the same from the vantage point of the test charge when it is moving(non inertial frame of reference) - Then the situation will be somewhat like this.

Here the electrons appear to be at rest with the test charge while the positively charged particles are racing towards the left. By applying the  principles of Lorentz contraction, the positive charges must contract and the electrons must spread out(since objects at rest take up more space than if they are in motion). 

Hence the charge density of the positive charges increase which creates an imbalance in the conductor hence not allowing the conductor to be neutral any further.(the conductor becomes positively charged)

Now if the test charge is brought close enough to the wire, it will experience a repulsive force since like charges repel. 

But for a static observer like us, the wire remains neutral. Only for test charge which was moving along with the electrons, the conducting wire was positively charged. So how do WE explain the repulsive force experienced by the test charge. We say that a magnetic field is produced around the wire which interacts with the charge and hence it's deflection.

Therefore to experience special relativity and its effects(Lorentz contraction) we do not have to speed up to 'c' - but rather we just have to make a simple electromagnet!!!

Hence, howsoever strange it may seem but we may conclude that

  A magnetic field is just an electric field but from a different perspective.

Thank you for reading!!