Tuesday, 8 December 2009

Lorentz-Covariant and Gauge-Invariant Electrodynamics

Over a year ago I started a series of blog posts aimed at describing quantum field theory, beginning with Lagrangian mechanics and working all the way up. It's been a while since I made any posts in that series. Indeed, the last post was a roadmap of sorts; a list of the topics still to be covered.

The roadmap hinted that the next step is a relativistic description of electromagnetism. Actually, what we really want to do is describe electromagnetism as a gauge theory. That is, a theory which is gauge invariant. By the end of this post, what we mean by gauge invariance will become obvious.

So, here goes.

Maxwell's Equations
Any treatment of electromagnetism must start with Maxwell's equations, presented below.

(1)\,\,\,\,\,\nabla\cdot\mathbf{E} = \rho_{em}

(2)\,\,\,\,\,\nabla\times\mathbf{E} = -\frac{\partial\mathbf{B}}{\partial t}

(3)\,\,\,\,\,\nabla\cdot\mathbf{B} = 0

(4)\,\,\,\,\,\nabla\times\mathbf{B} = \mathbf{j}_{em}


Here,
\rho_{em}
and
\mathbf{j}_{em}
are the electric charge density and electric current density, respectively, and we are working in Heaviside-Lorentz units. The densities act as the sources of the electric and magnetic fields.

Taking the divergence of (4) leads to a problem; the continuity equation for electric charge states that
(5)\,\,\,\,\,\frac{\partial \rho}{\partial t} + \nabla\cdot\mathbf{j} = 0

(note that I will omit the "em" subscript on the densities from now on).

Since
\nabla\cdot\nabla\times\mathbf{B} = 0\Rightarrow\nabla\cdot\mathbf{j}=0

This is only true when the charge density does not vary with time. In general, Ampere's law must be modified to be
(6)\,\,\,\,\,\nabla\times\mathbf{B}=\mathbf{j}+\frac{\partial\mathbf{E}}{\partial t}

This is now consistent with (5), the continuity equation.

The continuity equation states that the rate of change of charge in some volume is due entirely to the flux of current through its surface. That is to say, electric charge is conserved. Since this volume can be made arbitrarily small, we can say that electric charge is locally conserved. This means that we can't balance things out by having a negative charge appear out of nowhere, as long as a positive charge is made the other side of the universe (or a negative charge disappears on the other side of the universe); this conservation law has to apply on an arbitrarily small scale.

We can introduce the vector potential
A_\mu
in place of the fields E and B:
(7)\,\,\,\,\,\mathbf{B}=\nabla\times\mathbf{A}

(8)\,\,\,\,\,\mathbf{E}=-\nabla V-\frac{\partial \mathbf{A}}{\partial t}


This defines the three-vector potential A, and the scalar potential V (sometimes called the electrostatic potential, and sometimes denoted
\phi
. Equations (2) and (3) are then satisified automatically.

The gauge invariance of electromagnetism is based on the fact that, for a given E and B, the equations above do not uniquely determine A and V. In fact, one can apply transformations to A and V which leave E and B completely unchanged; and therefore leave all of the physics unchanged. These are known as gauge transformations, and the invariance of Maxwell's equations under these transformations is known as gauge invariance

We are free to change A as follows;
(9)\,\,\,\,\,\mathbf{A}\rightarrow \mathbf{A}^\prime = \mathbf{A}+\nabla\chi

where
\chi
is an arbitrary scalar function. Since
\nabla\times(\nabla\chi) = 0
, this does not change B.

To preserve E when making the above transformation, we must simultaneously transform the scalar potential V:
(10)\,\,\,\,\,V\rightarrow V^\prime=V-\frac{\partial\chi}{\partial t}


The transformations (9) and (10) can be written in a single expression using the four-potential,
(11)\,\,\,\,\,A^\mu = (V, \mathbf{A})


Note now that the differential operators,
(12)\,\,\,\,\,\left(\frac{\partial}{\partial t}, -\nabla\right)

form a four-vector operator
\partial^\mu
. The gauge transformation can then be specified by:
(13)\,\,\,\,\,A^\mu \rightarrow A^{\prime\mu} = A^\mu - d^\mu\chi


Maxwell's equations can be written in a manifestly Lorentz covariant form (meaning, they have the same form under Lorentz transformations) using the four-current:
(14)\,\,\,\,\,\mathbf{j}^\mu = (\rho,\mathbf{j})


The continuity equation can then be written:
(15)\,\,\,\,\,\partial_\mu j^\mu = 0

which in turn allows us to write equations (1) and (6) as:
(16)\,\,\,\,\,\partial_\mu F^{\mu\nu} = j^\nu


The equation above introduced the Field Strength tensor (or the Faraday tensor),
(17)\,\,\,\,\,F^{\mu\nu}=\partial^\mu A^\nu - \partial^\nu A^\mu


Under a gauge transformation (13), the Faraday tensor (17) remains unchanged; it is gauge invariant, and so, therefore, are Maxwell's equations in the form (16). As I already said above, Maxwell's equations are Lorentz covariant in the form (16), leading to a Lorentz covariant and Gauge invariant theory.

Now, one can write
(18)\,\,\,\,\,\Box A^\nu - \partial^\nu(\partial_\mu A^\mu) = j^\nu


Equation (6) can be inferred (and indeed, was inferred by Maxwell) from the local charge conservation requirement expressed by the continuity equation (15). The field equations (16) automatically include the continuity equation. Mathematically speaking, the Faraday tensor (17) is a sort of "four-dimensional curl". This is unchanged by the gauge transformation (13), suggesting that gauge invariance in electromagnetism is related to charge conservation. The reality is a little more complicated.

It was shown in 1949 by Wigner that the principle that no physical quantity can depend on the absolute value of the electrostatic potential V, combined with conservation of energy, implies that charge conservation holds. This relates charge and energy conservation to an invariance under the transformation of the electrostatic potential by a constant. Charge conservation alone does not require the more general space-time dependent transformation of the gauge invariance we've discussed above.

Changing the electrostatic potential by a constant amount is an example of a global transformation. Invariance under this global transformation is related to the conservation of electric charge, but it is not sufficient to obtain all of electromagnetism. Instead, we must impose a local change in the electrostatic potential V (the time-derivative term in (10), which is compensated by a simultaneous change in the vector potential A, leaving Maxwell's equations ultimately unchanged. By including these magnetic effects, the global invariance under a change in V, related to conservation of electric charge, can be extended to a local invariance.

The concept of local gauge invariance is important for the development of quantum field theory in subsequent posts. Next time, a tour of gauge invariance in quantum mechanics, and the gauge principle.

Much of this post was based on Chapter 3 of Aitchison & Hey (Gauge Theories in Particle Physics, 3rd Edition, Vol. I - From Relativistic Quantum Mechanics to QED). It is a book I strongly recommend purchasing if you have an interest in quantum field theory. The second volume discusses QCD and Electroweak theory, and is another good purchase.

Wednesday, 15 July 2009

Reversing Lines In A File

As is often the case, an interesting little text manipulation task came up in the office today; given a file containing lines of text, reverse it (i.e. put the last line first, the penultimate line second, etc.)

I have a feeling there's a neat little command-line utility that already does this (but can't remember what it is...), but my mind soon went to a short Python script. Here's my first stab at this:

#!/usr/bin/env python
import sys

lines = []
for line in open(sys.argv[1]):
lines.append(line.strip())

lines.reverse()
for line in lines:
print line


After this, I tried to shorten it a bit. Putting the lines into a list could be done nicely with a list comprehension,

#!/usr/bin/env python
import sys

lines = [line.strip() for line in open(sys.argv[1])]

lines.reverse()
for line in lines:
print line


Finally, I discovered the reversed() function, which allows you to create reverse iterators for any Python sequence. Here's where the list comprehension and Python's iteration stuff really comes into its own, leading to a wonderful two-liner (not counting the module import and the #!)


#!/usr/bin/env python
import sys
for line in reversed([line.strip() for line in open(sys.argv[1])]):
print line

Thursday, 19 February 2009

Writing Scientific Documents Using LaTeX: Updated

I submitted a fifth edition (5/E) of `Writing Scientific Documents Using LaTeX` to CTAN yesterday (and another version today which fixes a couple of minor mistakes in the examples given).

As usual, the document and associated files can be found at:
http://www.ctan.org/tex-archive/info/intro-scientific/

Monday, 12 January 2009

sed Magic: Removing Lines

Problem: Remove lines from a file f2 if they contain a word in file f1.

Solution:
for word in `cat f1`; do
sed -i "/$word/d" f2;
done
sed is a stream editor, the -i option performs the editing in-place (i.e. in the original file).

This came up in the office today and I thought the solution was rather neat (if equally straightforward). Alternatives in most scripting languages (except maybe Perl?) are longer and/or uglier.

Monday, 5 January 2009

The Road To Quantum Field Theory

Dedicated readers will know that I've been presenting topics from theoretical physics with the goal of leading from Lagrangian mechanics all the way to quantum field theories. There were a few posts I made on special relativity and relativistic quantum mechanics before the 'QFT Series' of posts really began, and a number of other posts interspersed with those in the series. The most recent post introduced a mathematical notation useful in special relativity and relativistic quantum mechanics, notably four-vectors, tensors, etc.

Near the beginning I presented a list of topics I was going to cover. At this stage, I think it is appropriate to present a list of topics I've already covered, with links to the posts covering them, then to briefly outline the steps which still remain.

Pre-Series posts on Special Relativity, Quantum Mechanics and Particle Physics

The 'Road to QFT' Series


Out-of-Series Posts


Roadmap
  • Relativistic Electrodynamics (Covariant Formulation of Maxwell's Equations)
  • Relativistic Quantum Mechanics: From Schrödinger to Klein-Gordon
  • Relativistic Quantum Mechanics II: The Dirac Equation and Spin
  • Symmetries and the Gauge Principle
  • Quantum Electrodynamics (QED)
  • Aside on Quantum Chromodynamics (QCD)
  • SU(2) and Electroweak Unification
  • Aside on Superconductivity (maybe...)
  • Spontaneous Symmetry Breaking and the Higgs Mechanism
You may notice that the imminent parts of the roadmap are becoming more clearly defined, while the still-distant final topics are broad and loosely defined. For example, there's likely to be more than one post on QED, but until I get there I don't know how many posts it will take!

Saturday, 3 January 2009

The Mathematics of Special Relativity

As promised, here is a post outlining the mathematical objects used in special relativity (SR). I'm not going to present fully formal definitions, and I'll almost certainly miss out some things I'll later rely on to explain more advanced concepts, but I'll get to those when the time comes. As for the formal definitions, find a good text on special relativity.

Contravariant Four-Vectors
A contravariant four-vector is a four-component object which transforms according to the rule
x^{\prime\mu}=L^\mu_\nu x^\nu

where L is the Lorentz transformation (LT) matrix.

For a transformation from a frame S to a frame S' moving with respect to S with velocity v in the positive x direction, define
\begin{align*}
\beta &= \frac{v}{c}\\ \gamma &= \frac{1}{\sqrt{1-\beta^2}}\\ L &= \left(\begin{array}{cccc}\gamma&-\gamma\beta&0&0\\ -\gamma\beta&\gamma&0&0\\0&0&1&0\\0&0&0&1\end{array}\right)\end{align*}


For example, the space-time four-vector
x^\mu = \left(\begin{array}{c}ct\\x\\y\\z\end{array}\right)
transforms as
x^{\prime\mu} = \left(\begin{array}{c}\gamma ct-\gamma\beta x\\-\gamma\beta ct+\gamma x\\y\\z\end{array}\right)

= \left(\begin{array}{c}c\gamma\left(t-\frac{vx}{c^2}\right)\\\gamma\left(x-vt\right)\\y\\z\end{array}\right)

i.e. the usual form of the SR Lorentz transforms.

Contravariant four-vectors are represented with a greek-letter index in the superscript position. In particle physics and quantum field theory it is conventional for time to be the zeroth component, as in all of my posts. In some areas of relativistic quantum mechanics, one will see time as the fourth component. This alters the definition of the LT matrix and the metric tensor, but of course the physics remains the same. I will always use time as the zeroth component in these posts.

Covariant Four-Vectors and Rank-Two Tensors
In addition to contravariant four-vectors, there are mathematical objects called covariant four-vectors (sometimes also called one-forms). It is possible to convert between covariant and contravariant vectors using an object known as a metric tensor.

Covariant vectors are written with a single greek-letter index in the subscript position. Covariant and contravariant vectors are both rank-one tensors; objects where the rank is defined by the number of indices (equivalently the number of times one must apply the Lorentz transforms).

A metric tensor defines the structure of the space-time in which we are working. For special relativity, we use Minkowski space, and the metric tensor is defined as g:
g = \left(\begin{array}{cccc}1&0&0&0\\0&-1&0&0\\0&0&-1&0\\0&0&0&-1\end{array}\right)


g is a rank-two tensor representing the structure of space-time. In general relativity (GR) different metric tensors can be used for different space-time geometries.

The metric tensor allows us to convert contravariant vectors into covariant vectors, and vice versa:
\begin{align*}
x_\mu &= g_{\mu\nu}x^\nu\\
x^\mu &= g^{\mu\nu}x_\nu\end{align*}


Note that in these cases,
g_{\mu\nu}
has both indices either raised or lowered, whereas in the Lorentz transforms, L has one raised index and one lowered index. The positions of the indices determine the result (covariant or contravariant) and whether the result is physically meaningful. The Einstein summation convention states that one should sum over repeated indices where one is raised and the other is lowered.

In Minkowski space, the conversion between co- and contra-variant vectors is simple:
x^\mu = \left(\begin{array}{c}ct\\x\\y\\z\end{array}\right)

x_\mu = \left(\begin{array}{cccc}ct&-x&-y&-z\end{array}\right)


Note that this leads to the useful property that the contraction of a covariant and a contravariant four-vector is a Lorentz-invariant scalar quantity. For example, using the space-time four-vector:
x^\mu x_\mu = x^\mu g_{\mu\nu}x^\nu = c^2 t^2 - x^2 - y^2 - z^2

which should be recognisable as the Lorentz-invariant space-time interval of special relativity.

This property holds for all four-vectors and in all inertial reference frames.

Rapidity
Special Relativity is sometimes formulated in terms of rapidity
\theta
rather than velocity v.

Here,
\mathrm{tanh}\,\theta = \beta
\Rightarrow \mathrm{cosh}\,\theta = \gamma = \frac{1}{\sqrt{1-\beta^2}}
.

The Lorentz transformation matrix is then written (often called
\Lambda
rather than L):
\Lambda =\left(\begin{array}{cccc}\mathrm{cosh}\,\theta&-\mathrm{sinh}\,\theta&0&0\\-\mathrm{sinh}\,\theta&\mathrm{cosh}\,\theta&0&0\\0&0&1&0\\0&0&0&1\end{array}\right)

for the equivalent of
L = \left(\begin{array}{cccc}\gamma&-\gamma\beta&0&0\\-\gamma\beta&\gamma&0&0\\0&0&1&0\\0&0&0&1\end{array}\right)


The usefulness of this approach lies in the fact that while velocities in SR do not add linearly, i.e.
v_{12} \neq v_1 + v_2

Rapidities do add linearly:
\theta_{12} = \theta_1 + \theta_2


Useful Objects
I'm going to list a few of the vectors and tensors which appear often in particle physics, so that when I need to use them in future posts, they won't look completely new. I won't explain much about them here.

Energy-Momentum four-vector
p^\mu = \left(\begin{array}{c}\frac{E}{c}\\p_x\\p_y\\p_z\end{array}\right) = \left(\begin{array}{c}\frac{E}{c}\\\mathbf{p}\end{array}\right)


Four-Current
j^\mu = \left(\begin{array}{c}\rho\\\mathbf{j}\end{array}\right)


(Electromagnetic) Four-Potential
A^\mu = \left(\begin{array}{c}\frac{\phi}{c}\\\mathbf{A}\end{array}\right)

where A is the vector potential of electromagnetism.

Covariant Derivative
\partial_\mu = \left(\begin{array}{c}\frac{1}{c}\frac{\partial}{\partial t}\\ \nabla\end{array}\right)


Faraday Tensor
F^{\mu\nu} = \partial^\mu A^\nu - \partial^\nu A^\mu

F = \left(\begin{array}{cccc}0&-\frac{E_1}{c}&-\frac{E_2}{c}&-\frac{E_3}{c}\\
\frac{E_1}{c}&0&-B_3&B_2\\
\frac{E_2}{c}&B_3&0&-B_1\\
\frac{E_3}{c}&-B_2&B_1&0\end{array}\right)


Note that
F^{\mu\nu}F_{\mu\nu} = 2\left(B^2 - \frac{E^2}{c^2}\right)
is Lorentz invariant!