Note that you can click-and-drag the purple points around their respective circles to sample the field at different places.

Consider a small piece of wire of length ds carrying a current I. This defines a vector **ds** that points in the direction of the current. The magnetic field **dB** set up by this piece of current-carrying wire at a point a distance r away is:

All of these observations can be satisfied by the equation:

**dB** = (μ_{o} / 4π ) I **ds** ×
/r^{2}

where the constant μ_{o} is known as the permeability of free space and has a value of

μ_{o} = 4π x 10^{-7} T m /A

Compare the result for **dB** to the electric field **dE** we get from a point charge dq:

**dE** = ( 1 / 4π ε_{o} ) dq
/r^{2}

To find the total field at a point from an entire wire, simply integrate all the **dB**'s:

Net magnetic field is **B** = ( μ_{o} I / 4π ) ∫ **ds** ×
/r^{2}

The process is very similar to what we did to find electric field from charge distributions.