Magnetostatic fields are produced when charges are moving with constant velocity, such as in a current-carrying wire. Biot-Savart's law states that the magnetic field produced by a current element is proportional to the current and inversely proportional to the distance from the element. Ampere's law, the integral form of which relates the line integral of magnetic field around a closed path to the current through the enclosed surface, can be used to determine the magnetic field produced by symmetric current distributions.