Imagine a world where there was no magnetism at all — just electrostatic forces. It turns out that by adding Einstein’s laws of special relativity to that world, and looking at the effects that special relativity has on moving charges, the laws of magnetism *appear* — just by mashing electrostatics and relativity together.

In other words, the moving electrons in an electric motor’s coils see the world from a different frame of reference to the copper atoms making up the windings of the motor — and this imbalance is what makes the motor turn!

There’s a bunch of stuff around on the internet on this, but I find it hard to process because it deals with general relationships between magnetic and electric fields, not specific examples. I’m sure this is actually very general and useful, but it’s also beyond my immediate understanding as well. So, I tried approach the problem in my own way using just special relativity and high-school level physics, and it works!

**0. Ampère’s force law: the result we are trying to arrive at**

We’re aiming for the most basic formulation of Ampère’s force law, which gives the magnetic force between two parallel wires:

Where is the magnetic constant, and are the currents through the two wires, is the length of the wires, and is the distance between the two wires.

It’s worth noting that the formula above only holds true when the first wire is of length , and the second wire is of infinite length. This is convenient, because infinite integrals have a tendency to work out more nicely anyway.

(This same equation is often used to calculate the force between two wires both of length , but this is only accurate when is much greater than .)

**1. Our first axiom: Coulomb’s law**

The force on a point with charge due to another point with charge in a vacuum is given by Coulomb’s law:

where is the electric constant, and is the distance between the two points. This force is an attraction if positive, a repulsion if negative. If we move over to Cartesian coordinates by substituting , the vertical component of the force is given by

This term represents the vertical force between an electron or proton in the top wire and an electron or proton in the bottom wire. We could figure out the horizontal component as well, but it would get cancelled out in the end.

**2. Electrostatic attractions with charges distributed along lines**

Next, we need to take charge and replace it with an infinite, evenly distributed horizontal line of charge. Each unit length of the line has charge . We’ll call this force . This represents the force between an electron or proton in the top wire, and *all* of the electrons or *all* of the protons in the bottom wire. The term inside the integral is the same as above, but with the bottom point charge replaced by the charge on a infinitesimal length of the line of charge: .

This is where the calculus gets fun: this integral looks pretty nasty as it stands. But the hypotenuse-looking term makes it look susceptible to a trigonometric substitution:

The following identity also comes in handy:

We end up with:

Now we can take the top charge and spread it out along a line as well — although this time, the line is finite in length. This time we substitute for . Since the integrand is not a function of , this integral is trivial:

So, we’re halfway through and we haven’t touched relativity, magnetism, or even motion of any kind yet. But we do have an expression for the electrostatic force between two lines of evenly distributed charge, which we’ll need later.

**3. Special relativity: length contraction**

Einstein’s theory of special relativity states that when an object is moving, a stationary observer sees some strange effects — a clock on the moving object appears to run slowly (time dilation), and the object appears to be compressed along the direction that it’s travelling (length contraction). Length contraction is described as follows:

Where is the length of an object at rest and is the observed length of the object when moving at velocity . The Lorentz factor is given by:

So why does length contraction have any relevance to charges moving down a wire? Let’s consider the top wire, which has Coulombs of charge per unit length. A section of length will contain a charge . When current starts flowing, that section of charge will start moving — and will consequently appear to contract according to the formula above. This means the charges will appear to be bunched more closely together, since the same amount of charge is now packed into the contracted length. The new amount of charge per unit length will be:

This is the central point of this post — if you start off with a wire that is perfectly neutral (i.e., charges are balanced,) simply allowing current to flow through the wire will cause the electrons to appear to bunch up, while the protons will stay still. This imbalance leads to a net negative charge appearing on the wire! This is all assuming that you’re observing from a stationary frame of reference (with respect to the protons in the wire.) If you move along at the same speed as the electrons, then it’s the protons that will appear to be moving, and bunching up, and you’ll observe a net positive charge on the wire.

We’ll find later that the velocity of charges within a wire is extremely small, so a first-order approximation of the Lorentz factor is acceptable. Since the gradient of at is , we can use the following approximation:

**4. Drift velocity of electrons in conductors**

In order to calculate the magnitude of the charge contraction, we need to know the velocity of the electrons in the wire. If one unit of wire contains free electrons totalling a charge of , and the velocity of the electrons is , then the total charge moving per unit of time is:

**5. Combining everything together**

Let’s now tally up the forces acting on the top wire. First, the protons in the top wire. The protons are at rest, so they see the world from a stationary frame of reference. The protons in the bottom wire are also at rest, so the repulsion force acting on the bottom wire’s protons is not affected by relativity:

The electrons in the bottom wire are moving though, at a velocity of , so the attraction between the top protons and bottom electrons is given a boost:

Next, what do the electrons in the top wire see? We’re now travelling along with these electrons, so the protons in the bottom wire appear to be moving backwards at :

And the electrons in the bottom wire appear to be moving at a velocity of :

The total force acting on the top wire is the sum of these four terms:

Applying the approximation of the Lorentz factor from section 3:

Incorporating the expression for current from section 4:

And applying the definition of the electric constant :

And there you have it — combine electrostatics and special relativity, and you end up with the magnetic formula from section 0.

**Implications**

Although special relativity has been experimentally verified over and over again, it’s often incredibly sensitive instruments (usually atomic clocks) travelling at high speed doing the measuring. Other times, it’s astronomical observations. Even the wonderful point that the GPS system would rapidly fall apart (losing 10 kilometers of accuracy per day) without taking relativity into account seems out of this world (literally). The idea that the relatively familiar force of magnetism is a side effect of relativity seems a lot closer to home.

What’s more amazing is that this happens, despite the incredibly low velocities involved. A length contraction of just 0.1% requires a speed of 13,400,000 m/s. Although electrical signals flow down a wire at very high speed, the charge carriers themselves drift along very slowly — the distinction is much like that between the speed of sound in air vs the speed that the wind blows. A 1 mm diameter copper wire carrying 3 A, has a drift velocity of around 1 metre per *hour*. At that speed, the Lorentz factor, and the apparent charge imbalance is 1 + 4.3 × 10^{25}. That’s an excess of 0.000000000000000000000043%. And yet, that’s all you need to give to the electrostatic force for it to drive an electric car around — it just shows how incredibly strong the electrostatic force is.

Take two normal 1mm diameter copper wires 1 meter long, and 1 meter apart. If you were to remove the atoms of copper, leaving just the free electrons behind, the electrostatic repulsion between the two remaining clouds of electrons would be about 10^{17} kilograms worth — enough to lift a small moon. Somehow, these ridiculously huge and tiny numbers multiply together to give the moderate magnetic force that we use every day.

On the other hand, for a long time, I’ve found both magnetism and special relativity a bit mysterious and strange. It’s somehow comforting to know that one is just a side-effect of the other — one less thing to keep me up at night.

## hemmiwt

/ August 10, 2012Excellent article as always!

A minor grammatical error exists in Section 3: “a stationary observer sees SOME strange effects.”

Could possibly be worth mentioning the variables in these equations that were set to one to make the maths easier to follow (e.g. charge carrier density, area of conducter, etc) to align them to sites like wikipedia. Would have to be very subtle though.. wouldn’t want such a pedantic point interfering with the main message!

## Robert

/ August 10, 2012Thank you for the feedback, kind sir. The issue of the variables being set to one is an interesting point — I did spend some time trying to figure out how to use the fact that the only dimension that matters is the dimension of length. So I decided to use a linear charge density (), instead of a normal volumetric density (), to avoid dealing with the cross-sectional area at all*. But there’s no standard symbol for linear charge density — so yeah, I’m still stuck trying to find an elegant way of presenting this.

* So technically, it hasn’t been set to 1, it’s been pre-multiplied/divided out.

## Jason

/ August 22, 2012What about this?

Consider two parallel electron beams. Ampere’s Law will still apply. But now there are no protons so the only force will be between the electrons. Your Ftotal will have only one term, the one having (v2-v1)^2.

Without the other three terms, you won’t get the formula of Ampere’s Law.

What’s worse is that if the two beams have the same diameter and current, then v2=v1 and therefore Ftotal = 0!

Sorry if this keeps you up at night again. But don’t despair, it is not easy to derive Ampere’s Law. You may have to resort to Maxwell’s equations. And even that does not make it any easier.

BTW, since you are interested in these stuff, you may want to check out academic.org. It has heaps of video lectures on science, math, engineering, history, philosophy, business, etc.

## Robert

/ August 23, 2012An interesting question, thanks for raising it!

Does Ampere’s law still apply in that case? If you’ve got , then all of the electrons are travelling along at this one velocity. I therefore choose to apply Ampere’s law in the frame of reference of an electron in the beam. Now , so the magnetic force equals zero. This means that applying Ampere’s law to beams of electrons in the absence balancing positive charges leads immediately to a contradiction, so Ampere’s law does not apply.

Furthermore, the single term for the electron/electron interactions is proportional to , or, when , just 1. So it just gives a plain, unadjusted term for electrostatic interaction between all the electrons — which seems exactly right to me?

(It’s getting late here, I will tidy up and clarify this reply in due course.)

## Jason

/ August 23, 2012Sorry, I think I confused you in my (erroneous) assertion about v1=v2.

When v1=v2 (i.e. same current), Ftotal 0. But it reduces to:

Ftotal = k1*k2*L / 2*pi*epsilon*y (i.e. no c^2). Ftotal is not zero so Ampere’s Law does apply.

But without c^2 you won’t be able to bring mu into Ftotal.

When v1=v2, there is no relativistic effect.

When v1=v2=0, the current is zero and therefore there is no magnetic field, so the only effect is electrostatic — as you said. (How you get an electronic beam with zero current is another matter which we won’t go into here!)

It was quite neat the way you used the Lorentz factor to bring c^2 into the picture in the case of the two wires.

Another oops! The URL I referred to at the end of my last comment is academicearth.org not academic.org.

## Xanthe

/ December 7, 2015I have to confess I don’t quite understand some of the calculus, specifically why the limits change to pi/2 and -pi/2 – I’m sure it’s fairly basic but I haven’t come across something like that before. I’d really appreciate an explanation suitable for a 17 year old if you have time!

Thanks 🙂

## Robert

/ December 7, 2015If you look up “integral trig substitution”, you should find a bunch of guides where adjusting the limits is a crucial step.

Basically, in the before case, the limits being to actually specifically means that the limits are from to , because the integral ends in .

The goal of the substitution was to write the integral in terms of — so the limits become to . Because, for example, when , .

Hopefully you can find a reference online about trig substitution that will help that make sense! Please do get back to me if you have more questions.

## Xanthe

/ December 7, 2015Really interesting article by the way!

## Robert

/ December 7, 2015Thanks!

## Mark

/ January 27, 2019Thanks!

For me this is the best explanation so far. I was looking for an answer why the force could be so big if the speed of the electrons is so slow.

The only thing that keeps me up at night, is the protons. In most explanations, this one included, the protons are at rest in the rest frame. Lets stay in the rest frame and connect the wire to a DC source. The electrons start moving. Now, from the rest frame perspective, the chain of electrons should now contract, which would make the net charge negative. This would result in an opposite force than the one in the motion frame. This obviously doesn’t happen.

The only solution to this problem, as far as i can think of, is that the protons are not relavant, neither are the electrons themselves. It’s the negative charges caused by the electrons flowing one way, and the positive charges caused by the lack of electrons (holes) flowing the opposite way. In the rest frame these would cancel each other out at any current.

Does anyone know more about this?

And would the equations above be still valid in that case?

## Robert

/ January 27, 2019Thanks for the kind comments. I don’t quite follow what you’re referring to your problem, but my best guess is that I handle this in section 5. The and end up cancelling out (“opposite forces cancelling out”??), but the central term from expanding , , doesn’t get cancelled out. This is the term which accounts for the magnetic force, even though it isn’t simply attributable to any particular interaction (electron-electron or proton-electron etc), but only attributable to the term that emerges unscathed after cancelling out all the conflicting terms from adding all four permutations.