Ampere's law, definition of enclosed current

Consider an infinite uniform surface current $$\mathbf{K} = K\mathbf{\hat{x}}$$ flowing over the xy plane. To find the magnetic field $$\mathbf{B}$$ it produces, I first argue that $$\mathbf{B}$$ must solely consist of a y component. To find this component, I consider an Amperian loop that is parallel to the yz plane and that extends an equal distance above and below the xy plane. Applying Ampere's law, I deduce that

$$2Bl = \mu_0I_{\text{enc}}$$

where l denotes the length of the loop in the y direction.

Here comes my question: how do I arrive at $$I_{\text{enc}} = Kl$$? By my logic, if I take $$\mathbf{J}$$ to represent the current flow, then $$\mathbf{J} = 0$$ for $$x\neq 0$$ and $$K\mathbf{\hat{x}}$$ for $$x = 0$$. Thus, since $$I_{\text{enc}}$$ is defined as the flow of $$\mathbf{J}$$ through the surface enclosed by the Amperian loop, and this latter quantity is 0, $$I_{\text{enc}} = 0$$.

I'm feel like I'm messing up something very basic.

• How did you get the LHS in the equation Commented Dec 13, 2021 at 14:34

2 Answers

By my logic, if I take $$\mathbf{J}$$ to represent the current flow, then $$\mathbf{J} = 0$$ for $$x\neq 0$$ and $$K\mathbf{\hat{x}}$$ for $$x = 0$$.

This isn't quite right. The current density $$\mathbf{J}$$ actually is infinite on the surface in order to form a surface current that is non-zero. You should have

$$\mathbf{J} = K\mathbf{\hat{x}}\delta(z)$$

• That's it. Thank you! Commented Dec 15, 2021 at 11:21

Your (K) indicates a constant uniform current density in amps/meter (with the meter measured in the (y) direction). The unit vector indicates that the current is flowing in the (x) direction (in the xy plane). In the (xy) plane (K) and the current are constant (and never zero). The amps/meter times the length (l) measured in the (y) direction gives the current through your loop. (With a right handed system, the (B) is in the negative (y) direction for positive (z) and the positive (y) direction for negative (z).)