# Orientation of simple magnetic field of a wire

we have a infinit long wire on the Z-Axis with a current flowing in positive Z. With Ampere's law we get, that the magnitude of the magnetic field around the wire is: $B=\frac{\mu_0 I}{2\pi r}$

If we look at a point above the Z-Axis, the magnetic field has the Orientation towards us, so: $\vec{e}_y$.

If we look at a point below the Z-Axis, the magnetic field is oriented away from us, so: $-\vec{e}_y$.

Right? So, how can I include this fact in the formula for my magnetic field?

$\vec{B}=\frac{\mu_0 I}{2\pi r} [?]$ What goes into [?] ?

• Can you clarify what you mean by "a point above" the Z-axis? At point x=d, the field is +$\vec{e}_y$ – Yashas Jan 13 '17 at 15:08
• Above: y>0, Below: y<0. You example makes sense. E.g. for x=-d, it would be $-\vec{e}_y$ but I want something for any x. – xotix Jan 13 '17 at 15:19
• Actually, I meant x=-d in my comment. Sorry for the mistake. I have answered this question with a general equation. It shouldn't be hard to reduce the general equation to your specific case. – Yashas Jan 13 '17 at 15:21
• $\hat{\phi}$ goes into the [] (in cylindrical polar coordinates) – ProfRob Jan 13 '17 at 16:50

The direction of the magnetic field at any point $\vec{r}$ from the infinitly wire is given by $$\vec{B} = \frac{\mu_{o}}{2\pi} \frac{\vec{i}\times{\vec{r}}}{r^2}$$

The direction of $\vec{i}$ is along the direction of the current. The direction of the $\vec{r}$ is along the line joining the point and the wire, away from the wire.

The magnetic field is always perpendicular to the direction of the current and the radius vector.

The formula with the vector signs can be derived from Biot-Savart's law.

$$d\vec{B} = \frac{\mu_o}{4\pi} \frac{d\vec{l}\times \vec{r}}{r^3}$$

The direction of $d\vec{l}$ is along the direction of the current.

• The current through the wire. The direction of $\vec{i}$ is assumed to be along the direction of the current. – Yashas Jan 13 '17 at 15:21