# Biot and Savart law

An element of magnetic field, dB, can be found from and element of wire, dL, carrying a current I by using the Biot and Savart law.  This can be written as where r is the vector from the current element to the point where the magnetic field is being calculated.  Often the calculations using this integral are difficult.

# Ampere's law

The magnetic field is generated by currents, and as is seen in the Biot and Savart law, is always at right angles to both the current and the vector to the current.   This can also be expressed by Ampere's law, which relates the total magnetic field around a loop the the currents flowing through the area enclosed by the loop, .

# Field due to wire

Both Ampere's law and the Biot and Savart law can be used to find that the magnetic field due to a current in a long straight wire is .

# Force between two wires

We looked at the force between two wires carrying currents.  Each wire produces a magnetic field.  This field, at the location of the other wire, causes a force between the wires.

# Field due to solenoid

A solenoid is a coil of wire wound in a cylinder.  The magnetic field inside a solenoid is , where n is the number of turns per unit length.  The field is uniform throughout the area of the solenoid.

# Field due to toroid

If the solenoid in bent into the form of a donut, or bagel, then a toroid is formed.  In this case the field will no longer be uniform over the cross section of the coil, but instead will be stronger near the inner surface of the toroid.  The magnetic field is

# Field from a loop

The magnetic field along the axis a distance x from a current carrying loop with radius a is .  Note that if the distance from the loop, x, is much larger than the radius of the loop, a, then this becomes approximately .

The wire on the left carries a current I into the page. This produces a magnetic field near the wire on the right. The wire on the right carries a current I out of the page. Which diagram correctly represents the force(s) on the wire(s)?

Ampere's law allows you to calculate the magnetic field due to a distribution of currents. Which assumption must be true in order to use Ampere's law?

1. The integral is over the boundary of a closed surface.
2. There can only be one current flowing.
3. The currents must flow along the line segment dS.
4. The currents cannot be changing with time.
5. The current must be perpendicular to the surface.
6. The current configuration must have a symmetry.
7. There cannot be any isolated charges nearby.

A wire carrying a current I passes through the center of a basketball with radius R. What is the total magnetic flux through the surface of the basketball?