Magnetic Fields
There are two ways in which a magnetic field can be produced. The first is by means of charged particles passing through an object, such as current travelling through a wire. These types of magnets are called electro magnets. The second way a magnetic field is produced is because elementary particles posses an intrinsic magnetic field. Furthermore, the magnetic fields from all the particles in an object can either add together to create a net magnetic field and therefore forming a permanent magnet, or they can cancel one another out.
The Definition of B
The magnetic field is a vector quantity and is defined as:
B = FB/|q|v
From this the magnetic force, FB, acting on the particle is written as:
FB = q[v x B]
FB = |q|vB*sin(φ)

That is the charge multiplied by the cross product of the velocity vector and the magnetic field vector. These equations show that when either the velocity or charge of the particle is zero, then there is no magnetic force acting on the particle. Also, because it is a cross product the magnetic force is greatest when v and B are perpendicular to each other. However, it should be noted that the magnetic force is always perpendicular to v and B. Finally, using the right hand rule, the direction of FB can be found.

F = qvB sin q

If the velocity v is parallel to the magnetic field B,
the magnetic force is zero because sin
q = 0.

The SI unit for the magnetic field is the tesla.


1 N/(A * m)
1 T = 10­^4 gauss
Magnetic Field Lines
Just like an electric field, a magnetic field can be represented by field lines.

The end of the magnet from which the field lines originate is called the north pole, and the end where they re-enter the magnet is the south pole. Because the magnet has two poles it is an example of a magnetic dipole. One important characteristic of magnets is that opposite poles attract. That is to say that if two magnets were placed next to each other, the north pole of one would be attracted to the south pole of the other.
Crossed Fields
When an electric field and a magnetic field both occur and are perpendicular to one another, they are called crossed fields. If a beam of particles is accelerated between two plates between which there is an electric field and a magnetic field which are crossed, the distance that the particles are deflected is given by:
y = qEL2/(2mv2)
where L is the length of the plates.
The Hall Effect
Similar to electrons in a vacuum, electrons in a copper wire can also be deflected by a magnetic field. An example of this involves a conducting material with a current and magnetic field passing through it perpendicular to each other. Due to the magnetic force created by the magnetic field, the drifting conduction electrons will be forced to one side of the object. With the electrons gathered on one side and positively charged particles on the other, an electric field is created which points from the positely charged edge of the object to the negatively charged edge. This electric field creates a force which pushes the electrons in the opposite direction of the magnetic force and with the same magnitude. With the two forces cancelling each other, the electrons return to their normal drift velocities.

When the two forces are in equilibrium:
eE = evdB
vd = i/neA

n = Bi/Vle
where l is equal to Area/width and n is the number of charge carriers per unit volume.
Circular Motion
For uniform circular motion:
F = mv2/r
When this is applied to a particle in a magnetic field it can be rewritten as:

|q|vB = mv2/r
For helical paths the velocity vector v can be broken up into two components. One is v|| which determines the pitch of the helix and is parallel to the magnetic field along which the particle travels, and the other is v┴ which determines the radius of the helix and is perpendicular to both the magnetic field and v||.
v|| = v*cos(φ) and v┴ = v*sin(φ)
Magnetic Force on a Current-Carrying Wire
As previously discussed a force due to a magnetic field can be exerted upon the electrons in a current carrying wire or object. However, because the electrons cannot leave the wire the force is transferred to the wire itself. This force is equal to the current I times the cross product of the length and magnetic field vectors.
FB = i[L x B] = iLBsinφ
In this case φ is the angle between the L and B vectors. When the magnetic field is perpendicular to the wire this simply becomes:
FB = iLB
Finally, if either the wire is not straight or the field is not uniform then the force equation can be written as:
dFB = i[dL x B]

Torque on a Current Loop

When a current carrying loop is immersed in a magnetic field, it is possible for the field o produce a net torque on the loop. By simply using the right hand rule it can be found that the forces acting on two of the sides of the loop cancel and the other two combine to form a net torque about a central axis and is given by:

τ = (iaB(b/2)sinθ) + (iaB(b/2)sinθ) = iabBsinθ

Also, for loops that consist of N number of turns which lye in a plane, the torque is equal to:

τ = NiABsinθ

where A is the area enclosed by the loop.
The Magnetic Dipole Moment
Because a current carrying loop that is in a magnetic field acts just like a bar magnet placed in a magnetic field, the loop is said to be a magnetic dipole with magnetic dipole moment µ. The direction on µ is the same as the normal vector which is perpendicular to the plane of the loop. To find this direction point the fingers of your right hand in the direction of the current and your outstretched thumb will point in the direction of µ. Furthermore, the magnitude of µ is given by the equation:
µ = NiA
When this is substituted into the equation of torque on a current carrying loop it becomes:
τ = µ x B
Finally, similar to electric dipoles, the magnetic potential energy of a magnetic dipole in a magnetic field is found to be:
U(θ) = -µ ∙ B