1) Ampere's law relates the line integral of magnetic field B around a closed loop to the total current enclosed. It is expressed as B.ds = μoi, where i is the total current.
2) Applying Ampere's law, the magnetic field B outside a long straight wire is calculated to be B = μoi/2πd, where d is the distance from the wire.
3) For an ideal solenoid, the magnetic field B inside is calculated using Ampere's law to be B = μoni, where n is the number of turns per unit length and i is the current.