# Magnetic field of current loop

• AriAstronomer

## Homework Statement

Find magnetic field along the z-axis of a circular loop, radius R with constant current lying in the z=0 plane.

## Homework Equations

vec(r) = vector of r.
zhat = unit vector z.

## The Attempt at a Solution

So starting with the definition, B = (u_o I/4pi) (dl x vec(r))/r^3, where:
\vec(r) = z(zhat) - R(s hat), thus:
r = root(z^2 + R^2)

also dl x vec(r) = vec(r)dl(phi x s) = (dl)(-zhat). Since dl = length around current loop = 2piR:
dl x vec(r) = -2piR(zhat) vec(r).

Here's where I get stuck.
If I continue along this line of thought, zhat (from the cross product) dotted with vec(r) will give me z, and my numerator will end up being -2piRz, but the answer says the numerator should be -2piR^2. Basically, I should have an R instead of z, but I don't know where I'm going wrong. I know other approaches will give me the right answer, but can someone identify along my train of thought what the problem with this approach is?

Thanks,
Ari