On this page
A long straight wire carries current I₁. Beside it, in the same plane, sits a rectangular loop carrying current I₂. The usual mistakes with the net force are treating the field as uniform, worrying about the side forces, or getting the direction backwards.
Why isn't the net force zero, as it is in a uniform field?
The total force on any closed loop in a uniform magnetic field is zero, as OpenStax University Physics, section 11.4 shows. Carrying that result into this problem is the trap.
The field of a long straight wire is not uniform: its magnitude is B = μ₀I/(2πr), so it falls off as 1/r with distance r from the wire (OpenStax, section 12.2). Each side of the loop sits in a different field, so the forces need not cancel. Our post on the Biot-Savart law and Ampère's law derives the 1/r.
How do you find the force on each side of the loop?
Put the wire up the page with I₁ flowing up and the loop to its right. Its two sides of length L run parallel to the wire, at r₁ (near) and r₂ (far). Say I₂ flows up the near side, like I₁, and down the far side.
For direction, hold the wire in your right hand, thumb along the current; your fingers wrap in the sense of B (OpenStax, section 12.2). To the right of an upward current, B points into the page everywhere on the loop.
The near side is simply a straight wire parallel to the long one. For parallel wires the force per unit length is F/l = μ₀I₁I₂/(2πr), and the force is attractive if the currents are in the same direction and repulsive if they are opposite (OpenStax, section 12.3). So:
Near side: F_near = μ₀I₁I₂L/(2πr₁), towards the wire
Far side: F_far = μ₀I₁I₂L/(2πr₂), away from the wire
Net: F = (μ₀I₁I₂L/2π)(1/r₁ − 1/r₂) = μ₀I₁I₂Lb/(2πr₁r₂), where b = r₂ − r₁ is the loop's width
Our explainer on the force between two parallel wires covers that step in detail.
Why do the forces on the perpendicular sides cancel?
The top and bottom sides run at right angles to the wire, from r₁ out to r₂. The field changes along them, so you add up the pieces using dF = I dl × B (OpenStax, section 11.4). Each element dr feels I₂B dr, and adding them from r₁ to r₂ gives μ₀I₁I₂ ln(r₂/r₁)/2π.
Both sides span exactly the same distances, and B depends only on r, so both forces have the same size. But the current flows away from the wire along the top and back towards it along the bottom, so the cross product points one way along the wire on top and the other way on the bottom. Equal, opposite and along the same line, the two forces cancel and give no torque. They stretch the loop but don't move it. For sides that aren't straight, see force on a curved current-carrying wire.
Worked example: is the loop attracted or repelled?
Take I₁ = 10 A and I₂ = 5 A, with a square loop of side 4 cm whose near side is r₁ = 2 cm from the wire, so r₂ = 6 cm. The near-side current runs the same way as I₁. With μ₀ = 4π × 10⁻⁷ T·m/A (OpenStax, section 12.2), μ₀/2π = 2 × 10⁻⁷ T·m/A.
Near side: 2 × 10⁻⁷ × 10 × 5 × 0.04 / 0.02 = 2.0 × 10⁻⁵ N, towards the wire.
Far side: 2 × 10⁻⁷ × 10 × 5 × 0.04 / 0.06 ≈ 0.67 × 10⁻⁵ N, away from the wire.
Top and bottom: 2 × 10⁻⁷ × 50 × ln 3 ≈ 1.1 × 10⁻⁵ N each, in opposite directions, so they cancel.
Net: 2.0 × 10⁻⁵ − 0.67 × 10⁻⁵ ≈ 1.3 × 10⁻⁵ N towards the wire. The loop is attracted.
The compact formula agrees: 2 × 10⁻⁷ × 50 × 0.04 × 0.04 / (0.02 × 0.06) ≈ 1.33 × 10⁻⁵ N. Reverse I₂ and every force flips: still 1.3 × 10⁻⁵ N, but now repulsion.
What should you check before writing the answer?
Direction: compare the near-side current with the wire's current. Same way means attracted, opposite means repelled.
Line of action: the net force is perpendicular to the wire, in the plane of the loop, with nothing along the wire.
Limits: the answer should go to zero as r₂ approaches r₁, and grow as the loop moves closer to the wire.
If you get the size right but keep losing the direction, try more in the Fermi Problem Library, where the step-by-step solver explains the reasoning rather than printing an answer. If the 1/r field feels shaky, the Fermi Concept Library gives each physics concept its own lesson.



