A current $2\ \mathrm A$ flows in a vertical wire. The value of the horizontal component of earths magnetic field in the region is $2*10^{-5}\ \mathrm T$. A small compass is placed $5\ \mathrm{cm}$ due north of the wire. Calculate the angle through which the needle deflects due to the current flowing in the wire. Assume $\mu_0= 4\pi10^{-7} \mathrm{Hm}^{-1}$.

I assumed that when a compass is near a an electromagnetic field the compass will always be attracted to the field. So the compass would turn 90 degrees? I also know that it can be solved vectorially but I'm not sure how I would get to this. I have calculated the B-Field of the wire as $B=2\mu_02/2\pi(0.05)=2.55\ 10^{-6}\ \mathrm T$. And I sketched the diagram of the wire using the right hand rule with the wire coming up out of the page. I also thought about using trig for the B-fields $\cos^{-1}$(B-field of earth/B-field of wire) but that wouldn't work. By the way, I cant stress this enough this is not homework we don't have homework in my course we only have exams!


2 Answers 2



We have freedom to set up the problem. So I said the magnetic field on the x axis is the earths magnetic field.

The current in the wire will also induce a magnetic field. I said this current is aligned with the y axis. I assumed the current was travelling upwards using the right hand rule (point your thumb up along the current of your right hand) and then your fingers will tell you the direction of the B field. This means the B field is into the page. r is the distance between the wire and the needle.

Using amperes law, that the closed line integral of $B = u I_{enc}$. Taking a circular loop around the x axis,

$$B \cdot 2 \cdot pi \cdot r = u \cdot I_{enc}$$

On the x axis this field is into the page, so negative z direction so

$$B= \frac{u I_{enc}}{2pi \cdot r} $$

Now this is only the $B$ from the wire, the principles of superposition apply to the $B$ field, so we add the $B$ field from the earth vectorially. As these vectors are only along one component only respectively and they are perpendicular we can use the triangle as we would in elementary trig and drop the vector notation and use magnitudes alone. So,


I don't have a calculator handy, but that should give you your answer.


The compass needle points in the direction of the sum of the magnetic fields due to the Earth and the wire.
I think that you have got the trigonometry wrong.


Not the answer you're looking for? Browse other questions tagged or ask your own question.