01 Vector Analysis
01 Vector Analysis
Introduction to Electromagnetism
Vector Algebra
Differential Calculus
Integral Calculus
Curvilinear Coordinates
1
def: a tensor is an algebraic object (e.g., vector or scalar or other tensors)
that describes a linear mapping from one set of algebraic objects to another.
How are Electric and Magnetic Fields Produced?
F = qE + q(v × B)
, form the basis of classical electromagnetism, and optics.
Vectors vs. Scalars
A+B=B+A
(A + B) + C = A + (B + C)
Multiplication by a scalar
a(A + B) = aA + bB
Dot Product of Two Vectors
A · B ≡| A || B | cos θ
where θ is the angle they form when placed tail-to-tail.
▶ A · B yields a scalar, hence the alternative name scalar
product.
▶ The dot product is commutative, i.e.,
A·B=B·A
A · (B + C) = A · B + A · C
Dot product of two vectors
▶ Given vectors in component form, i.e.,
∑
A = a1 x̂1 + a2 x̂2 + a3 x̂3 + . . . = ai x̂i
i
∑
B = b1 x̂1 + b2 x̂2 + b3 x̂3 + . . . = bi x̂i
i
▶ and,
0·A=0
Orthogonality and Projections
▶ Two vectors A and B are orthogonal2 if and only if,
A·B=0
B·A
PB,A =
A
▶ The vector projection of B onto A is defined as,
B·A
PB,A = A
A2
2
The term perpendicular describes a property of two vectors, orthogonal is
a related property of any collection of vectors (i.e., a collection of vectors is
orthogonal if and only if they are pairwise perpendicular), and normal is a
relation between a vector and a point of a smooth surface.
3
Is PA,B = PB,A ?
Cross Product of Two Vectors
A × B ≡| A || B | sin θ n̂
where θ is the angle they form when placed tail-to-tail, and n̂
is a unit vector4 pointing ⊥ to the plane of A and B.
▶ The correct orientation of n̂ is determined by the right-hand
rule, e.g., A × B above points into the page.
4
a hatted n̂ denotes a unit vector
Cross Product of Two Vectors
▶ A × B is itself a vector (hence the alternative name vector
product).
▶ The cross product is distributive,
A × (B + C) = (A × B) + (A × C)
B × A ̸= A × B
and instead,
B × A = −(A × B)
5
You must be able to calculate determinants for both 3 × 3, and 2 × 2
matrices.
Scalar Triple Product
A · (B × C) = B · (C × A) = C · (A × B)
Scalar Triple Product
▶ While non-cyclic permutations reverse sign, i.e.,
A · (C × B) = B · (A × C) = C · (B × A) = −A · (B × C)
A1 A2 A3
A · (B × C) = B1 B2 B3
C1 C2 C3
▶ The dot and cross can be interchanged (keeping the same
cyclic order),
A · (B × C) = (A × B) · C
▶ Its magnitude, √
r= x2 + y2 + z2
is simply the distance from the origin O.
The Position Vector
7
dl does not point in any particular direction since dx ̸= dy ̸= dz, in general.
The Separation Vector s
Figure: www.themathpage.com
Figure: www.khanacademy.com
∂ ∂ ∂
∇ ≡ x̂ + ŷ + ẑ
∂x ∂y ∂z
▶ Note, ∇ is not a vector! Instead, it’s an operator, which in
the grad case, maps a differentiable scalar function f to a
vector function ∇f.
▶ Nor does it multiply what appears on the right of it. (∇T ??)
▶ Instead, it’s a vector operator, or an instruction to act on
whatever appears to its right.
▶ It’s really just (very) clever notation8 and acts in 3 ways:
▶ On a scalar function: ∇T (gradient)
▶ On a vector function v, via the dot product: ∇ · v (divergence)
▶ On a vector function v, via the cross product: ∇ × v (curl)
8
So clever that it allows us to use ∇ ”like a vector”, but being an operator
it alone doesn’t have a meaning!
The Gradient
∂T ∂T ∂T
dT = ( )dx + ( )dy + ( )dz ≡ (∇T) · (dl)
∂x ∂y ∂z
where
∂T ∂T ∂T
∇T ≡ x̂ + ŷ + ẑ
∂x ∂y ∂z
is, by definition, the gradient of T, and is evidently a
vector function.
▶ Using then the definition of the dot product we can of course
also write,
(∇T) · (dl) ≡| ∇T || dl | cos θ
9
What if the changes in x, y, z were larger (i.e., not infinitesimal)?
The Gradient and the Directional Derivative
▶ Loosely-speaking we may think of the gradient as ”a
multi-variable generalization of the derivative”.
▶ To make this concrete, consider the definition for the
directional derivative of a function f(x, y, z, . . .) along the
unit vector û as,
f(a + hû) − f(a)
Dû f(a) ≡ lim = ∇f(a) · û
h→0 h | {z }
the gradient of f at a
which is the rate of change of f as x → a in the direction û.
▶ The directional derivative can be rewritten as,
x̂ ŷ ẑ
∇×v= ∂
∂x
∂
∂y
∂
∂z (vector function)
vx vy vz
▶ Geometrically, it measures of how much v swirls around the
point in question.
▶ Intuitively, imagine standing at the edge of a pond. Float a
small and light paddlewheel; if it starts to rotate at that
location, then you’ve placed it at a point of non-zero curl.
The Curl
13
Proving these rules once is advised.
Second Derivatives
∇2 v
|{z} ≡ (∇2 vx )x̂ + (∇2 vy )ŷ + (∇2 vz )ẑ
just shorthand
̸≡ ∇ · (∇v)
and is a vector function.
(2) The curl of a gradient
∇ × (∇T) = 0
14
Do the proof!
(3) Gradient of a Divergence
∇(∇ · v)
…doesn’t show up much in the study of electromagnetism so we
won’t bother about it.
(4) The divergence of a curl
∇ · (∇ × v) = 0
15
Do the proof!
(5) The curl of a curl
∇ × (∇ × v) = ∇(∇ · v) − ∇2 v
is just the gradient of a divergence minus the Laplacian, or
(3) − (1).
Line Integrals
v = y2 x̂ + 2x(y + 1)ŷ
from the point a = (1, 1, 0) to b = (2, 2, 0), along the paths (1)
and (2) in the above figure.
How about the closed loop that goes from a to b along (1) and
returns to a along (2)?
A Line Integral Example: Along path (1)
16
This step is crucial for a general path where variables are interdependent.
A Line Integral Example: a → (1) → (2) → a
17
in analogy with liquid flow, i.e., if v describes the flow a mass of liquid per
unit area per unit time.
Flux Integrals
▶ Since there are two opposite directions for the surface normal,
we choose the direction that points radially outward with the
origin as a reference point.
▶ If the surface is closed18 we write,
I
v · da ̸= 0
S
18
A closed surface in 3 − d is exemplified by a balloon.
Calculating Fluxes Numerically
▶ Let the vector function v(x, y) = xy2 ẑ, and S be a square
region of sides unity, with its south-west corner located at the
origin.
▶ Divide the square region into:
▶ 4 subsquares of length dxi = 0.25 and breath dyi = 0.25
▶ 16 subsquares of length dxi = 0.0625 and breath dyi = 0.0625
▶ 64 subsquares of length dxi = 0.015625 and breath
dyi = 0.015625 …
and calculate the value v(xi , yi ) at the center (xi , yi ) of each of
the subsquares i.
▶ The area element da = dxi dyi x̂.
∑
▶ The sum19 i v(xi , yi )dxi dyi is the required answer!
▶ As you increase the number of subsquares, the value obtained
from the sum above converges to the exact value:
∫
1
v · da =
S 6
19
A practical way to do this is to write a small computer program.
A Flux Example
Note, that for surface (i) variables x and y are independent of each
other20 , and the integrals for each can be carried out
independently.
20
Why?
A Flux Example: Surface 2
A Flux Example: Surface 3
A Flux Example: Surface 4
A Flux Example: Surface 5
A Flux Example: Total
▶ Problem: Evaluate ∫∫
xy dxdy
S
over the triangular region with ⊥ sides of unity, as above.
▶ Our strategy is to:
1. Calculate T(x, y = const.) × the area of each infinitesimally
short horizontal strip of height dy [INNER SUM:
x : 0 → (1 − y)], and then,
2. Sum these horizontal strips up one by one [OUTER SUM:
y : 0 → 1].
Evaluating the Surface Integral over a triangular S
▶ Problem: Calculate the flux of F = xx̂ + yŷ + zẑ over the surface
given by the planar region S : x + y + z = 1 above. The projection
of S along the (x, y)−plane is the shaded region A.
▶ Therefore, z = g(x, y) = 1 − x − y, and ∂g ∂x = −1, ∂y = −1
∂g
∫ ∫∫
F · dS = (xx̂ + yŷ + zẑ) · (x̂ + ŷ + ẑ) dA
S
∫ ∫A
= (x + y + z)dxdy (x + y + z = 1 : S)
A
1
=
2
Volume Integrals
▶ Given a scalar function T, volume integrals are expressed as,
∫
Tdτ
T
and dτ is an infinitesimal volume element.
▶ In Cartesian coordinates,21
dτ = dxdydz
21
Radial and cylindrical coordinates are other candidates.
A Volume Integral Example
∫ ∫ 3 ∫∫
2 2
xyz dτ = z dz xy dxdy
0 | {z }
done earlier!
∫ 1 [∫ 1−y ]
=9 y xdx dy
y=0 x=0
∫ 1
9 3
= y(1 − y)2 dy =
2 0 8
Volume Integrals Over More General Regions
optional
▶ Problem: Evaluate ∫
(x + 2y)dV
R
where R is the tetrahedral region bounded by the planes
x = 0, y = 0, z = 0 and x + y + z = 2.
▶ We can rewrite the equation of the plane x + y + z = 2 as
z = 2 − x − y. Note that 0 ≤ z ≤ 2 − x − y. Hence, we have
∫ ∫ ∫ 2−x−y ∫∫
2
(x + 2y) dz dA = (x+2y)(2−x−y) dA =
D 0 | {z } D 3
x,y=const
The Fundamental Theorem for Gradients
dT = (∇T) · dl
24
In practice, even though the integral is independent of the path, we must
pick a specific (if convenient) route in order to evaluate it explicitly.
The Fundamental Theorem for Divergences
▶ The fundamental theorem for divergences states that:
∫ I
(∇ · v)dτ = v · da
V S
∫
▶ As a consequence of the theorem, S (∇ × v) · da depends
only on the boundary line P, but not on the particular surface
S used, as long as it is circumscribed by P.
▶ Think of an intact soap bubble across a fixed loop. It doesn’t
matter whether the bubble is convex, concave, or
combinations thereof, as long as the loop circumscribing it is
fixed.
▶ As a consequence we may deform S for mathematical
convenience as long as it satisfies the boundary P.
H
▶ S (∇ × v) · da = 0 for any closed surface, since the boundary
line, like the mouth of a balloon, shrinks down to a point.
▶ HW: Do example 1.11 of [IEDJ].
Spherical Coordinates
x = r sin θ cos ϕ
y = r sin θ sin ϕ
z = r cos θ
▶ A general vector A can be represented in spherical coordinates
as,
A = Ar r̂ + Aθ θ̂ + Aϕ ϕ̂
where r̂, θ̂, and ϕ̂ form an orthogonal basis set.
Spherical Coordinates
dlθ = rdθ
▶ and so on…
26
What happened to the sin θ term in the RHS of dlϕ = r sin θdϕ?
More Formulae for Spherical Coordinates
27
27
The above formulae will be provided, if required, during the exam, and
need’nt be memorized.
Cylindrical Coordinates
▶ Do as HW.
Need for the Dirac Delta Function
▶ Given a body of mass M located at r0 , we may express it in
terms of its mass density ρ(r) as,
∫
M= ρ(r)dτ
V
ρ(r) = 0 ∀r ̸= r0
ρ(r) = M × δ(r − r0 )
, and requiring that,
∫ {
1 if r0 ∈ V
δ(r − r0 )dτ =
V 0 otherwise
δ(r − r0 ) = 0 ∀r ̸= r0
The One-Dimensional Dirac Delta Function
1
δ(kx) =
δ(x)
|k|
where k is any (non-zero) constant
29
Prove the sifting property!
The One-Dimensional Dirac Delta Function
▶ If f(x) is differentiable,
∫ ∞
f(x)δ ′ (x − x0 )dx = −f′ (x0 )
−∞
30
This property might be invoked while discussing square potenial barriers in
the QM part of this course.
The Three-Dimensional Dirac Delta Function [END OF
LEC. 3]
▶ In three dimensions,
δ 3 (r) ≡ δ(x)δ(y)δ(z)
| {z }
shorthand
and, ∫
δ 3 (r)dτ ≡ 1
all space
▶ Also, ∫
f(r)δ 3 (r − r0 )dτ = f(r0 )
all space
Divergence of r̂/r2
▶ But we’d just (albeit näively) found that the LHS, i.e.,
∫
V (∇ · v)dτ
∫
= 0, which contradicts the divergence theorem!
▶ However, V (∇ · v)dτ = 0 is incorrect –the source of the
problem being the point r = 0, where v = ∞, i.e., it BLOWS
UP.
▶ Indeed, ∇ · v is actually zero everywhere except the origin.32
32
Beware! The intuition of observing the spreading of sawdust at any of the
non-central points seems to suggest a non-zero diverence, at least to my eye.
Divergence of r̂/r2
▶ Alternatively, 4π
1
∇ · (r̂/r2 ) is a concrete representation of the
Dirac delta function δ(r).
The Scalar Potential V
▶ When ∇ × E = 0 everywhere33 , Stokes’ theorem tells us
that, I
E · dl = 0
35
∫ b force F = −∇U is a force with the property
In mechanics, a conservative
that the total work done W = a F · dl in moving a particle between point a to
b is independent of the path taken.
The Vector Potential A
∇·B=0
36
This means we can deform the surface as we please as long as the
boundary is kept fixed.
The Helmholtz Theorem
”A well-behaved (i.e., goes to zero at infinity) vector field is uniquely
specified by its divergence and curl (and, in the case of a finite region,
additionally by its normal component over the entire boundary.)”
▶ i.e., suppose we know37
∇ · F(r) = D(r) and, ∇ × F(r) = C(r)
over all space.
▶ Then the unique vector field F is given by
F(r) = −∇U(r) + ∇ × W(r) Helmholtz Decomposition
where,
D(r′ ) C(r′ )
∫ z }| { ∫ z }| {
′ ′ ′ ′
1 3 ′ ∇ · F(r ) 1 3 ′ ∇ × F(r )
U(r) = d r and, W(r) = d r
4π |r − r′ | 4π |r − r′ |
where the ∇′ denotes that the derivatives are to be taken w.r.t.
source points r′ .
37
Note that since (4): ∇ · (∇ × v) = 0, we must have ∇ · C = 0 for
consistency.
Why’s Helmholtz Theorem Useful?
▶ Since a vector field is completely specified once its divergence
and curl are known (a purely mathematical result), and we
know that the study of electromagnetism involves the vector
fields E and B, we can already guess…
▶ …the laws of electromagnetism:
∇·E = something1
∇×E = something2
∇·B = something3
∇ × B = something4
which look exactly like Maxwell’s equations38 , which are
thus mathematically sufficient to reconstruct E, and B.
▶ Even further, we can almost solve for the fields E and B, even
without explicitly knowing what the RHS = somethingi are!
38
If you’re wondering where D and H went, here we’re discussing the
so-called microscopic representation of Maxwell’s equations. D and H appear
in the macroscopic formulation where the material medium is built into the
equations. Both formulations are equally general.
Why’s Helmholtz Theorem Useful?
▶ Considering the static39 version of Maxwell’s equations
ρ(r)
∇·E =
ϵ0
∇×E =0
∇·B =0
∇×B = µ0 j(r)
39
i.e., all charges are stationary, and currents steady.
Limitations of our Treatment of the Helmholtz Theorem
[END OF LEC. 4]
▶ Consider ∫ ∫
∞
1 ϵ
f(x)T(x)dx = f(x)dx
−∞ 2ϵ −ϵ
F(ϵ) − F(−ϵ)
=
2ϵ