📘 CodingMarble Learn

Magnetic Field due to a Current: Biot-Savart Law and Ampere's Law

A current makes a magnetic field around it (Oersted, 1820). The Biot-Savart law gives the field of a tiny piece of wire: dB = (μ₀/4π)·I dl sinθ / r². Adding all pieces of a circular loop gives B = μ₀NI / 2R at the centre and μ₀NIR² / 2(R² + x²)^{3/2} on the axis. Ampere's circuital law ∮B·dl = μ₀I gives B = μ₀I / 2πr for a long straight wire. A long solenoid has a strong, uniform field B = μ₀nI inside and almost none outside.

🎬 Step-by-step story

  1. A straight wire goes up through a table. A compass sits next to it. No current flows, so the needle points north.
  2. Switch the current on. The needle turns! The current makes circles of magnetic field around the wire. This is Oersted's discovery.
  3. Draw a circle of radius r around the wire. B is the same all along it. Ampere's law gives B = μ₀I / 2πr. Move r out: B gets weaker.
  4. Bend the wire into a loop. Every small piece adds field at the centre in the same direction (Biot-Savart). So B = μ₀I / 2R there.
  5. Wind many loops one after another: a solenoid. Inside, the fields add into a strong, straight, even field. Outside it is very weak.
  6. Your turn. Pick wire, loop or solenoid. Change the current, the distance and the turns, and read B below the 3D.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why did the compass not move before the current was switched on?

Charges at rest make no magnetic field. Only moving charges (a current) do. With no current the needle just follows Earth's field.

Why are the field lines circles and not straight?

Every small piece of the wire makes a field at right angles to both the wire and the line to the point. Going round the wire, that direction keeps turning, so the lines close into circles.

Why does B fall as 1/r for a wire but 1/r² in Biot-Savart?

Biot-Savart is for one tiny piece. A long wire has pieces spread over a great length; adding them all gives the slower 1/r fall. Ampere's law gets it quickly: B × 2πr = μ₀I.

Why is there no π in the loop formula?

The total length of the loop is 2πR. That 2π cancels the 4π in μ₀/4π, leaving μ₀I / 2R.

Does a solenoid behave like a bar magnet?

Yes. Its field outside looks like a bar magnet's. One end is N, the other S. Reverse the current and the poles swap.

Why is the solenoid field not changed by its radius?

A wider solenoid has turns further away but also longer turns. The two effects cancel for a long solenoid, so only turns per metre (n) and current matter.

Magnetic field and Oersted's experiment

In 1820 Hans Christian Oersted saw a compass needle turn when a nearby wire carried current. So moving charges make a magnetic field. Stop the current and the needle goes back.

The magnetic field B tells how strongly and in which direction a magnet would be pushed at a point. Its SI unit is the tesla (T). Earth's field is only about 5 × 10⁻⁵ T; a fridge magnet is about 10⁻² T.

Direction: right-hand thumb rule

Hold the wire in your right hand with the thumb along the current. Your curled fingers show the direction of the field circles.

Field lines round a straight wire are closed circles centred on the wire. Reverse the current and the circles reverse.

Biot-Savart law

Cut a wire into tiny pieces of length dl. Each piece with current I makes a small field dB at a point P at distance r:

dB = (μ₀/4π) · I dl sinθ / r²   (vector form: dB = (μ₀/4π) · I dl × r̂ / r²)

Field of a circular loop (Biot-Savart)

At the centre

Every piece of the loop is at the same distance R from the centre and at 90° to the radius. All the small fields point the same way (along the axis). Add them round the whole circle (total length 2πR):

B = (μ₀/4π) · I · 2πR / R² = μ₀I / 2R. For N turns: B = μ₀NI / 2R.

On the axis, distance x from the centre

Each piece is now at distance √(R² + x²). The sideways parts of the small fields cancel in pairs; the parts along the axis add. The result is

B = μ₀NIR² / 2(R² + x²)^{3/2}

Check: at x = 0 this gives μ₀NI/2R. Far away (x ≫ R) it falls as 1/x³, just like a small bar magnet. Direction: curl right-hand fingers along the current; the thumb gives B.

Ampere's circuital law and the long straight wire

Walk round any closed path. Multiply the part of B along each small step by the step length and add up. The total equals μ₀ times the current passing through the path:

∮ B · dl = μ₀ Ienclosed

This law is most useful when the shape is very symmetric.

Long straight wire

Choose a circle of radius r centred on the wire. By symmetry B has the same size everywhere on it and points along the circle. So ∮B·dl = B × 2πr = μ₀I, giving

B = μ₀I / 2πr   (= 2 × 10⁻⁷ I / r)

Double the distance and B halves. Currents outside the path do not count in Ienclosed (their effects cancel round the loop).

Solenoid (qualitative)

A solenoid is a long wire wound as a tight spiral of many turns. Inside, the fields of neighbouring turns point the same way and add up; between turns on the outside they mostly cancel.

Exam corner

Common board questions: state Biot-Savart law (2 marks); derive B on the axis of a circular loop (3–5 marks); state Ampere's law and use it for a straight wire (3 marks); numericals on B = μ₀I/2πr and μ₀NI/2R. Always write the unit tesla and the direction.

Key formulas and definitions

Worked examples

1. A long straight wire carries 5 A. Find B at 10 cm from it.

B = μ₀I / 2πr = 2 × 10⁻⁷ × 5 / 0.10 = 1 × 10⁻⁵ T.

2. At 5 cm from a long wire the field is 4 × 10⁻⁶ T. Find the current.

I = B·2πr / μ₀ = B·r / (2 × 10⁻⁷) = 4 × 10⁻⁶ × 0.05 / (2 × 10⁻⁷) = 1 A.

3. A single circular loop of radius 10 cm carries 2 A. Find B at its centre.

B = μ₀I / 2R = 4π × 10⁻⁷ × 2 / 0.20 = 4π × 10⁻⁶ ≈ 1.26 × 10⁻⁵ T, along the axis.

4. A coil of 50 turns and radius 5 cm carries 1 A. Find B at the centre.

B = μ₀NI / 2R = 4π × 10⁻⁷ × 50 × 1 / 0.10 = 2π × 10⁻⁴ ≈ 6.3 × 10⁻⁴ T.

5. A loop has radius 3 cm. At a point on its axis 4 cm from the centre, what fraction of the centre field is present?

B_axis / B_centre = R³ / (R² + x²)^{3/2} = 27 / (9 + 16)^{3/2} = 27 / 125 = 0.216. So about 22 % of the centre field.

6. A long solenoid has 1000 turns per metre and carries 2 A. Find B inside.

B = μ₀nI = 4π × 10⁻⁷ × 1000 × 2 ≈ 2.5 × 10⁻³ T.

7. Two long parallel wires 10 cm apart carry 5 A each in opposite directions. Find B midway between them.

Each wire gives B = 2 × 10⁻⁷ × 5 / 0.05 = 2 × 10⁻⁵ T. With opposite currents both fields point the same way at the midpoint, so B = 4 × 10⁻⁵ T. (With currents in the same direction they would cancel: B = 0.)

Common mistakes

Practice quiz

1. Oersted's experiment showed that:
2. B at distance r from a long straight wire is:
3. If the distance from a long wire is doubled, B becomes:
4. The field inside a long solenoid is:
5. The value of μ₀ is:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is Biot-Savart law in simple words?

It says how much magnetic field a tiny piece of current-carrying wire makes at a point: more current and a shorter distance give more field, and it falls with distance squared.

What is the difference between Biot-Savart law and Ampere's law?

Biot-Savart works piece by piece and is good for loops. Ampere's law works on a whole closed path and is quick for very symmetric shapes like a long wire or solenoid.

Is the Biot-Savart derivation for a circular loop in the CBSE Class 12 syllabus?

Yes. The field on the axis of a circular loop and Ampere's law for a long straight wire are in the 2026-27 syllabus, in the unit Magnetic Effects of Current and Magnetism.

Where this is taught

PolandLiceum ogólnokształcące, klasa IIIMagnetism
Spain2º BachilleratoElectromagnetic field
Ukraine11 класElectrodynamics
Ukraine11 класElectrodynamics
CBSE (India)Class 12Magnetic Effects of Current and Magnetism
USA (Common Core, NGSS, AP)Grade 12Magnetism and Electromagnetism
USA (Common Core, NGSS, AP)Grade 12Magnetic Fields and Electromagnetism
USA (Common Core, NGSS, AP)Grade 12Forces and interactions
South Korea고등학교 2학년Electromagnetic interaction
South Korea고등학교 2학년Electricity and magnetism
South Korea고등학교 3학년Matter and electromagnetic fields
South Korea고등학교 3학년Electromagnetic fields
Russia11 классMagnetic field
Russia11 классMagnetic field and electromagnetic induction

Learn first

Learn next

Related lessons

All Physics lessons