You are on page 1of 20

Mathematics for Electromagnetism

(PHY205)

The following provides a brief description and summary of the mathematics required for
PHY205, Electromagnetism. Its main objective is to provide a revision of the most important and
relevant points. It is not intended to teach the mathematics from scratch. For more detailed
treatments consult your first year mathematics notes or textbooks. Some of the
electromagnetism textbooks provide a chapter or appendix covering the required mathematics.

Partial Differentiation
Many physical quantities are a function of more than one variable (e.g. the pressure of a gas
depends upon both temperature and volume, a magnetic field may be a function of the three
spatial co-ordinates (x,y,z) and time (t)). Hence when differentiating a function there is usually a
choice of which variable we differentiate with respect to.
For example consider the function f which depends upon the variables x and y (f(x,y)). We can
differentiate f with respect to x or y. When we differentiate with respect to a given variable we
proceed in the same manner as in basic differentiation for functions which depend upon one
variable. However for functions of more than one variable all other variables are treated as if
they are constants. The symbols for the differential are modified (c is used instead of d).
The derivatives of f with respect to x or y are written as
respectively.
Example f(x,y)=3x
3
+yx
2
+4xy
2
+5y
3


We can also take higher order derivatives, e.g. differentiate twice with respect to x

or differentiate with respect to one variable (say x ) and then a second (y)

note that for all well behaved functions the order in which we differentiate (e.g. x
then y or y then x) is unimportant, i.e.

Angles and Solid Angles
We need to consider both normal (one-dimensional) and solid (two-dimensional angles)
In (a)
the line of length dl has a component dlcosu along the arc of the circle. The angle is defined as
this component divided by the radius of the circle r.

The units are radians. As the circumference of a circle is 2tr there are 2tr/r=2t radians in a
circle.

In (b) the area da makes an angle u to the surface of the sphere radius r. The projection of da
onto the surface of the sphere is hence dacosu and the solid angle is defined as this projection
divided by the square of the radius

The units are steradians. As the area of a sphere is 4tr
2
there are 4tr
2
/r
2
=4t steradians in a
sphere.

Vectors
Many physical quantities have a direction as well as a magnitude. Examples are force
velocity and, in electromagnetism, electric and magnetic fields. We describe such
quantities using vectors. At each point in space we can imagine an arrow whose
length gives the magnitude of the quantity it describes and whose direction
corresponds to the direction of the quantity.

Vector components
In dealing with vectors it is often convenient to
describe a vector in terms of components. Because
space has three-dimensions, three components lying
along three orthogonal directions are required to
describe any vector. The most common system is the
Cartesian one where the three directions are the x, y
and z-axes.
To define any vector A in the Cartesian system we need the
size of the components along the three axes (A
x
, A
y
and A
z
)
and three unit vectors that are parallel to the three axes (i, j
and k parallel to x, y and z respectively).
The vector A is given by

The magnitude of A is given by


Non-Cartesian Systems
Although
the
Cartesian
system is
the most
common
one and the
easiest to
visualise
and use,
There are
two other
system that
are useful when considering problems with cylindrical or spherical symmetry.
In the cylindrical system the three components of the vector are defined as lying along the radial
direction in the x-y plane (r), the angle between the projection onto the x-y plane and the x-axis
(|) and the vertical or z component (z).
In the spherical system the three components are along the radial direction (r), the angle
between the projection onto the x-y plane and the x-axis (|) and the angle between the vector and
the z-axis (u).

Multiplication of Vectors
There are two types of multiplication, the dot product, resulting in a scalar and the vector product
resulting in a vector.

The dot product of two vectors
If we have two vectors A and B then the dot product of A and B is defined as

where A and B are the magnitudes of vectors A and B and u is the angle between the two
vectors.
The dot product is commutative

Physically the dot product represents the projection of one of the vectors on to the other times
the magnitude of the other. If the two vectors are mutually perpendicular then the dot product is
zero (cos90=0).
In Cartesian co-ordinates, if we have two vectors A and B with components (A
x
, A
y
, A
z
) and (B
x
,
B
y
, B
z
) respectively then


Physical application of the dot product
We know from mechanics that if a force F moves through a
distance L then the work done is equal to the component of the
force along the direction of movement multiplied by L. In the
diagram below the component of F along the direction of
movement is Fcosu. Hence the work done is FLcosu. However
if we use vectors F and L to describe the force and the
movement respectively we have from the definition of the dot
product . Hence when a force F is moved by a
distance L the work done is simply the dot product of the two
vectors. This is an application of the dot product which we will
use many times in the electromagnetism course.

The cross product of two vectors
If we have two vectors A and B then the cross product of A and B is defined as
AB = ABsinun
Where n is a unit vector normal to the plane containing the two vectors A and B and whose
direction is given by the right-hand rule.
The cross product of two vectors is not commutative as sin(-u)=-sinu.
AB = - BA
In Cartesian co-ordinates the cross product of the vectors A and B with components (A
x
, A
y
, A
z
)
and (B
x
, B
y
, B
z
) is given by
AB = (A
y
B
z
-A
z
B
y
)i+(A
z
B
x
-A
x
B
z
)j+(A
x
B
y
-A
y
B
x
)k



The cross product of a vector with itself is zero as the angle between the two vectors is 0 and
sin(0)=0.
Physical application of the cross
product
A force F acts at a distance r from a point of
rotation. The torque (T)about this point is the
distance from where F acts to the point of rotation (r) multiplied by the normal component of F.
T=rFsinu, where u is the angle between F and the line drawn through the point of rotation.
However if we define torque in terms of a vector whose magnitude gives the size of the torque
and whose direction points along the axis of rotation then
T= rF where r is the vector from the point of rotation to the point where F acts. The direction
of T gives the sense of rotation from the right-hand screw rule.

Calculus of scalars and vectors
Much of physics is concerned with how one quantity varies when one or more other quantities
change. As in other areas of physics, in electromagnetism we will be concerned with the spatial
variation (or derivative) of both scalar and vector quantities.
The mathematics can be summarised by the use of a differential operator called 'del' (symbol V)
which itself has directional properties.
In Cartesian co-ordinates V is given by

There are three physically meaningful ways in which V can be applied to scalars and vectors: it
can be applied to a scalar to give a vector (gradient), it can form the dot product with a vector to
give a scalar (divergence) and it can form the cross product with a vector to give another vector
(curl).

Gradient V
The gradient of a scalar function f is written Vf or grad f and is given in the Cartesian system by

The resultant quantity is a vector.
e.g. if f(x,y,z)=2x
2
+y
3
+z
2
xy then Vf=i(4x+z
2
y)+j(3y
2
+z
2
x)+k2xyz
Physical significance of the gradient. At any point the gradient of a function points in the
direction corresponding to that for which the function varies most rapidly. The magnitude of the
gradient vector gives the size of this maximum variation.
Example If f(x,y) gives the height (or alternatively the z co-ordinate) of a surface as a function
of the x and y co-ordinates then at any point Vf will point in the direction of maximum slope of
the surface.
A small ball placed on the surface will tend to roll along the direction opposite to Vf. The
gravitational force acting on the ball is -mgVf where m is its mass and g is the acceleration due to
gravity. The negative sign arises because the force acts in the opposite direction to Vf.
Alternatively if we define U(x,y) as the gravitational potential energy of the ball (U(x,y)=mg
f(x,y)) then the gravitational force = -VU. This is a general result: Force = -gradient(potential
energy). The potential energy may be gravitational, electrical etc.
Mathematics for Electromagnetism
(PHY205)

The following provides a brief description and summary of the mathematics required for
PHY205, Electromagnetism. Its main objective is to provide a revision of the most important and
relevant points. It is not intended to teach the mathematics from scratch. For more detailed
treatments consult your first year mathematics notes or textbooks. Some of the
electromagnetism textbooks provide a chapter or appendix covering the required mathematics.

Partial Differentiation
Many physical quantities are a function of more than one variable (e.g. the pressure of a gas
depends upon both temperature and volume, a magnetic field may be a function of the three
spatial co-ordinates (x,y,z) and time (t)). Hence when differentiating a function there is usually a
choice of which variable we differentiate with respect to.
For example consider the function f which depends upon the variables x and y (f(x,y)). We can
differentiate f with respect to x or y. When we differentiate with respect to a given variable we
proceed in the same manner as in basic differentiation for functions which depend upon one
variable. However for functions of more than one variable all other variables are treated as if
they are constants. The symbols for the differential are modified (c is used instead of d).
The derivatives of f with respect to x or y are written as
respectively.
Example f(x,y)=3x
3
+yx
2
+4xy
2
+5y
3


We can also take higher order derivatives, e.g. differentiate twice with respect to x

or differentiate with respect to one variable (say x ) and then a second (y)

note that for all well behaved functions the order in which we differentiate (e.g. x
then y or y then x) is unimportant, i.e.

Angles and Solid Angles
We need to consider both normal (one-dimensional) and solid (two-dimensional angles)
In (a)
the line of length dl has a component dlcosu along the arc of the circle. The angle is defined as
this component divided by the radius of the circle r.

The units are radians. As the circumference of a circle is 2tr there are 2tr/r=2t radians in a
circle.

In (b) the area da makes an angle u to the surface of the sphere radius r. The projection of da
onto the surface of the sphere is hence dacosu and the solid angle is defined as this projection
divided by the square of the radius

The units are steradians. As the area of a sphere is 4tr
2
there are 4tr
2
/r
2
=4t steradians in a
sphere.

Vectors
Many physical quantities have a direction as well as a magnitude. Examples are force
velocity and, in electromagnetism, electric and magnetic fields. We describe such
quantities using vectors. At each point in space we can imagine an arrow whose
length gives the magnitude of the quantity it describes and whose direction
corresponds to the direction of the quantity.

Vector components
In dealing with vectors it is often convenient to
describe a vector in terms of components. Because
space has three-dimensions, three components lying
along three orthogonal directions are required to
describe any vector. The most common system is the
Cartesian one where the three directions are the x, y
and z-axes.
To define any vector A in the Cartesian system we need the
size of the components along the three axes (A
x
, A
y
and A
z
)
and three unit vectors that are parallel to the three axes (i, j
and k parallel to x, y and z respectively).
The vector A is given by

The magnitude of A is given by


Non-Cartesian Systems
Although
the
Cartesian
system is
the most
common
one and the
easiest to
visualise
and use,
There are
two other
system that
are useful when considering problems with cylindrical or spherical symmetry.
In the cylindrical system the three components of the vector are defined as lying along the radial
direction in the x-y plane (r), the angle between the projection onto the x-y plane and the x-axis
(|) and the vertical or z component (z).
In the spherical system the three components are along the radial direction (r), the angle
between the projection onto the x-y plane and the x-axis (|) and the angle between the vector and
the z-axis (u).

Multiplication of Vectors
There are two types of multiplication, the dot product, resulting in a scalar and the vector product
resulting in a vector.

The dot product of two vectors
If we have two vectors A and B then the dot product of A and B is defined as

where A and B are the magnitudes of vectors A and B and u is the angle between the two
vectors.
The dot product is commutative

Physically the dot product represents the projection of one of the vectors on to the other times
the magnitude of the other. If the two vectors are mutually perpendicular then the dot product is
zero (cos90=0).
In Cartesian co-ordinates, if we have two vectors A and B with components (A
x
, A
y
, A
z
) and (B
x
,
B
y
, B
z
) respectively then


Physical application of the dot product
We know from mechanics that if a force F moves through a
distance L then the work done is equal to the component of the
force along the direction of movement multiplied by L. In the
diagram below the component of F along the direction of
movement is Fcosu. Hence the work done is FLcosu. However
if we use vectors F and L to describe the force and the
movement respectively we have from the definition of the dot
product . Hence when a force F is moved by a
distance L the work done is simply the dot product of the two
vectors. This is an application of the dot product which we will
use many times in the electromagnetism course.

The cross product of two vectors
If we have two vectors A and B then the cross product of A and B is defined as
AB = ABsinun
Where n is a unit vector normal to the plane containing the two vectors A and B and whose
direction is given by the right-hand rule.
The cross product of two vectors is not commutative as sin(-u)=-sinu.
AB = - BA
In Cartesian co-ordinates the cross product of the vectors A and B with components (A
x
, A
y
, A
z
)
and (B
x
, B
y
, B
z
) is given by
AB = (A
y
B
z
-A
z
B
y
)i+(A
z
B
x
-A
x
B
z
)j+(A
x
B
y
-A
y
B
x
)k



The cross product of a vector with itself is zero as the angle between the two vectors is 0 and
sin(0)=0.
Physical application of the cross
product
A force F acts at a distance r from a point of
rotation. The torque (T)about this point is the
distance from where F acts to the point of rotation (r) multiplied by the normal component of F.
T=rFsinu, where u is the angle between F and the line drawn through the point of rotation.
However if we define torque in terms of a vector whose magnitude gives the size of the torque
and whose direction points along the axis of rotation then
T= rF where r is the vector from the point of rotation to the point where F acts. The direction
of T gives the sense of rotation from the right-hand screw rule.

Calculus of scalars and vectors
Much of physics is concerned with how one quantity varies when one or more other quantities
change. As in other areas of physics, in electromagnetism we will be concerned with the spatial
variation (or derivative) of both scalar and vector quantities.
The mathematics can be summarised by the use of a differential operator called 'del' (symbol V)
which itself has directional properties.
In Cartesian co-ordinates V is given by

There are three physically meaningful ways in which V can be applied to scalars and vectors: it
can be applied to a scalar to give a vector (gradient), it can form the dot product with a vector to
give a scalar (divergence) and it can form the cross product with a vector to give another vector
(curl).

Gradient V
The gradient of a scalar function f is written Vf or grad f and is given in the Cartesian system by

The resultant quantity is a vector.
e.g. if f(x,y,z)=2x
2
+y
3
+z
2
xy then Vf=i(4x+z
2
y)+j(3y
2
+z
2
x)+k2xyz
Physical significance of the gradient. At any point the gradient of a function points in the
direction corresponding to that for which the function varies most rapidly. The magnitude of the
gradient vector gives the size of this maximum variation.
Example If f(x,y) gives the height (or alternatively the z co-ordinate) of a surface as a function
of the x and y co-ordinates then at any point Vf will point in the direction of maximum slope of
the surface.
A small ball placed on the surface will tend to roll along the direction opposite to Vf. The
gravitational force acting on the ball is -mgVf where m is its mass and g is the acceleration due to
gravity. The negative sign arises because the force acts in the opposite direction to Vf.
Alternatively if we define U(x,y) as the gravitational potential energy of the ball (U(x,y)=mg
f(x,y)) then the gravitational force = -VU. This is a general result: Force = -gradient(potential
energy). The potential energy may be gravitational, electrical etc.

Divergence V
The divergence of a vector A is written as VA or div A and is given by

the resultant quantity is a scalar
e.g. if A=3x
2
yzi+x
2
z
2
j+z
2
k then VA=6xyz+2z
Physical significance. When the divergence of a vector is positive at a given point then there is
a source of the vector field at that point. A negative divergence implies a sink for the vector field.
We can hence think of the divergence of a vector as telling us how much of the vector field starts
(or terminates) at a given point.


In (a) the vector has a constant magnitude so its divergence is zero. In (b) the x-
component increases along the x-direction. This vector hence has a non-zero, positive
divergence.

Curl V
The curl of a vector A is written as VA or curl A and is given by


=



the resultant is a vector

eg A=yzi-2x
2
yzj+3x
2
y
2
zk VA=(6x
2
yz--2x
2
z)i+(y-6xy
2
z)j+(-4xyz-z)k

Physi
cal
signifi
cance
A
non-
zero
curl
implie
s that
the
corres
pondi
ng
vector field has a sort of rotational property. One way to look for a curl is to imagine that the
vector field corresponds to the flow of water. If we place a small paddle wheel in the field then
the presence of a non-zero curl suggests that the wheel will rotate.

In the above examples for (a) although the field increases along the direction in which it points it
produces no rotation of the wheel. However in (b) the field points along x but increases along the
y-axis and hence produces a rotation of the wheel. Hence the curl is related to how the field
changes as we move across the field. This can also be seen because the expression for curl
contains terms cA
x
/cy etc.
To some extent curl and div are complementary. The latter requires that the field increases when
moving along the field direction, the former that the field increases when moving across the field
direction.

Relationships
From the definitions of grad, div and curl the following relationships can be established
V(Vf)=0 the curl of a gradient is equal to zero
V(VA)=0 the divergence of a curl is equal to zero
V(Vf)=V
2
f=

this is the divergence of a gradient




Non-cartesian co-ordinates
All of the previous examples are for cartesian co-ordinates. For other systems related, but
different, expressions exist for grad, div and curl
e.g. in cylindrical co-ordinates the gradient is given by

For this course you do not need to remember the expressions for non-cartesian systems but you
need to know how to apply them where necessary.

Integration
There are two main types of integration for vectors, line and surface
Line integrals
The line integral of a vector A between the points a and b is given by

as we move along a path between the points a and b, at each step we take the component of A
which lies along the direction we are moving (given by the vector dl) and multiply it by the
distance we move through. The line integral is the sum of all these individual values as we move
from a to b.
In general the path taken between the points a and b must be specified. However for a certain
class of vectors the result of the integral is independent of the path taken. Such vectors are said to
be conservative.
If the line integral is performed around a closed path (initial and final points are the same) then a
circle is placed on the integral symbol

If the vector A represents a force then the line integral of A between two points gives the work
done in moving between these two points.

Surface integrals
The surface integral of the vector A over the surface s is defined as

the surface is split into an infinite number of infinitesimally small sections. For each section the
product of the area of the section (dS) and the component of A normal to the surface is formed.
The integral is the sum of all these products. If the surface is a closed one (no edges) then a circle
is placed on the integral sign


Relationships between integrals

Divergence theorem
This states

in words 'The surface integral of any vector over a closed surface S is equal to the divergence of
that vector integrated over the volume t enclosed by S.'

Stokes' theorem
This states

in words 'The line integral of any vector around a closed path is equal to the surface integral of
the curl of that vector integrated over a surface S which is bounded by the path of the line
integral.'
Return to main page

You might also like