Please, see the attachment file.

The x component of is determined by  where the path lies in a plane normal to the x axis . Ampere's law states that this integral is equal to the current enclosed .