Classical Electromagnetism, with an exploration of Invariance
Discussion of principles of classical electromagnetism with a sneak peak into invariance and field theory

Classical electromagnetism is one of the fundamental theories of the natural world, which deals with analysing the electric and magnetic fields caused by charge distributions and currents, and hence the equations of motion of charges particles in those fields. In this article, we delve into how the theory is built upon an elegant set of equations (Maxwell Equations) and attempt to derive key insights into the structure of the theory itself.
Maxwell Equations
We begin by stating the fundamental equations of EM, known as Maxwell equations,
As specified below that equations, we can derive them from the fundamental postulates of EM. For example, Coulomb’s law, which states that the force experienced by a charged particle in the presence of another charged particle is
can therefore be used to infer that electric field caused by the charge q1 is proportional to the inverse square of distance. Now, given the boundary condition that the electric field must vanish at infinity (something we will discuss in a bit more depth later), we can generalise the equation to obtain the first Maxwell equation. Similar analyses can be done for the rest of the equations, but we shall move on to more interesting observations.
Firstly, consider the balance between number of equations and unknowns. Since the charge density and current is given to us, and we want to calculate the electric and magnetic fields, we have 6 unknowns (2, 3 dimensional vector quantities). Observing the equations, 2 of them are scalar and the other 2 vector, giving us a total of 8 equations. This already poses an interesting issue: is this system overdetermined, in the sense that we have too many ‘constraints’ for our unknowns. Surely that cannot be true, because electric and magnetic fields exist in our world and the application of the principles behind Maxwell equations give us the correct experimental results (in the macro premise at least). Therefore, there must be some redundancies in our equations, or at least some fundamental connections. The key comes from the conservation of charge. Since charge is a conserved quantity (we shall take this without proof, but there is an interesting way to prove this using parity symmetry and Noether’s theorem for those interested), there is a relationship between the charge and currents in our equations
We still have one more constraint to find, which is a bit tricky. The constraint is that the magnetic current and charge density must be conserved, however, that is just a 0=0 constraint, nevertheless, still a constraint.
Another key observation is the nature of the equations. The first and fourth equations depend on the sources (charges and currents) but the second and third do not. Hence, the second and third equations are homogeneous and are satisfied by all electric and magnetic fields.
Sufficient Conditions
One important question to ask ourselves is, how do we know that only the divergence and curl of the electric and magnetic fields are sufficient for us to determine the entire system? We shall make a short digression to try and understand why this might be the case. We know that the general derivative of a vector field is a second order tensor:
Note that I am using the Einstein notation for suffixes. The divergence corresponds to
And the curl corresponds to
We know that under similarity transformations, the trace of a matrix (or a second order tensor in this case) does not change, hence the divergence is a scalar. On the other hand, under similarity transformations, the curl transforms like a vector, and hence the curl is a vector. This gives us some reason as to why it is sufficient to know the curl and divergence alone. However, the full reason why it is so comes from Helmholtz theorem, which states that in a region of space, given the curl and the divergence of a vector field, along with the normal components of the curl on the boundary of the region, the vector field is uniquely defined.
We can approach this problem from a physical point of view as well. Consider the following differential equation
We know that
is an eigenfunction of the gradient operator. We can also observe (easily proved) that the following also hold
In other words, the plane wave solution is an eigenfunction for all three operators. In particular, for the divergence, it gives us the components of the wave that is inline with the coordinate axes, and for the curl, it gives us the components normal to the coordinate axes. Furthermore, we have managed to convert of differential operations into algebraic operations, which is essentially the Fourier transform. This means that given some arbitrary function of position (charge perhaps), we can express it in the Fourier basis and using that reconstruct the vector field.
Therefore, we can safely conclude that the curl and divergence is sufficient to fully define and derive the electric and magnetic fields.
Potentials
Anyone exposed to EM would have heard about the notion of potentials and how they relate to the electric and magnetic fields themselves. However, potentials are usually taught from the electrostatics point of view, at least in the sense that we only consider the scalar potential defined by the electric field, that also serves as a proxy for energy calculations. However, in general, potentials are a mere mathematical construct that we have seemingly plucked out of the thin air to aid our analysis. In our case, we are going define both a scalar and vector potential, and explore how the Maxwell equations can be written in terms of these potentials.
We first try to justify the choice of the potentials by observing the Maxwell equations. Using the second equation, coupled with the fact that the divergence of the curl of any vector field is identically zero, we can deduce that any magnetic field can be written as the curl of some arbitrary corresponding vector field. We call this the vector potential A.
Similarly, by substituting this vector potential into the third equation, we obtain the following

Using the property that the curl of the gradient of a vector field is also identically zero, we can obtain a scalar potential called phi
Note that the negative sign is just a matter of convention because the scalar potential also serves as a notion of potential energy in our electrostatics problems.
Now, we can rewrite the electric and magnetic fields in terms of the potentials:
By substituting the potentials into the first and fourth Maxwell equations, we obtain the following two equations:

As it stands, the two equation do not look easy to solve. However, it is useful to look at parts of the equation that look familiar. For example, the scalar potential part of the first equation resembles Poisson’s equation, a fundamental partial differential equation that has been well studied. We know that we can easily construct solutions to Poisson’s equation by finding the Green’s function to the laplacian operator and then just integrating it with the inhomogeneous part, over the given region. Furthermore, we know that for Laplace’s equation, all solution are harmonic functions. This gives us a few interesting properties. Firstly, the value of the function at any point is the arithmetic mean of the values of the function at points symmetric about the initial point. This is known as the mean-value property, which is a direct consequence of the fact that the curvature is zero for these harmonic functions. Similarly, the vector potential part of the second equation resembles the wave equation, another well studied problem that we can easily solve. Now the key question arises: wouldn’t it be nice if we can decompose, or transform those equations into just the ones we already know how to solve? That is where invariance comes in!
Invariance
We need ask the question of what the potentials actually mean physically, and if they are unique. I asserted at the beginning of the previous section that the notion of potentials was a purely mathematical construct to aid of analysis. The main reason for that assertion is to emphasise the fact that potentials do not actually correspond to anything in the natural world. Also, in terms of uniqueness, we can easily tell that both the potentials are not unique and we can add some function (with specific properties) and still obtain the same electric and magnetic fields. So, if we change our vector potential to
we still have the same magnetic field. However, the electric field will not be the same. Hence, we also need to transform the scalar potential as follows:
This is known as Gauge invariance, and will serve as the bedrock for all our EM analysis. Although it might seem that this invariance is purely a mathematical convenience, it turns out that most fundamental forces of nature are described by quantum fields, which are gauge invariant. So gauge invariance becomes one of most fundamental dynamical principles of the natural world.
Now we apply this invariance to simplify our equations. For the first equation, we need
Given

we can write the condition for our invariance function as
This is known as the Coulomb gauge, as it allows us to decompose the equation into a Poisson’s equation of the scalar potential. For our scalar potential, since the electric field has a boundary condition that it tends to zero as the distance tends to infinity, so does the scalar potential. Therefore, we can trivially write down the solution for the scalar potential
We might ask, how many boundary conditions we need to fully define the scalar potential, since our equation is a second order differential equation. From the theory of elliptic pdes, we know that we need to know the values of the function at all points at infinity. This is satisfied by letting the potential tend to zero as the magnitude of r tends to infinity.
If we probe a bit deeper into the solution, we notice an irregularity. Imagine there is a change in the charge distribution at some point ‘far’ from the current location. This change causes a change in the electric field (determined by the scalar potential) instantaneously. Does this not violate relativity? The key is to observe that the electric field does not only depend on the scalar potential, but also the time derivative of the vector potential. Also, when the charge distribution is disturbed, due to continuity, there is current generated, which means that there is a non-zero magnetic field, and hence a non-zero vector potential.
We can proceed to look at other invariances. For the second equation, we want to decompose it into the wave equation. So, given

We want a transformation that satisfies

This is known as the Lorentz gauge, and it allows us to decompose the second equation into a wave equation and solve it. The reason it is called the Lorentz gauge is actually quite interesting. Turns out, that when you combine the scalar and vector potential as

you obtain a 4-vector quantity used in relativity, that transform covariantly with the coordinate axes. In order words, using the Lorentz gauge, we can transform equations into a covariant form, in the language of differential geometry.
We can now solve the wave equation to find the vector potential and then find the scalar potential. The key takeaway is that using gauge invariance, we can easily decompose the equations into known equations, either the Poisson’s equation or the wave equation and solve it for various scenarios.
EM Lagrangian
Now comes the problem of analysing the motion of a charged particle in a given configuration of electromagnetic fields. So far, we’ve discussed how to solve for the electric and magnetic fields given a charge distribution and currents. The natural question that arises is how other charged particles interact with these fields. We approach this problem using Lagrangian mechanics. However, since we are working in the relativity context, we firstly need to define a few key quantities in the spacetime axes. The potentials are combined to give the 4-potential, and the appropriate forms for the del operators are
Again, we are adopting Einstein summation convention for ease. Now, we define a quantity that encompasses both the electric and magnetic fields. This is known as the electromagnetic field tensor, which is the exterior derivative of the 4-potential:

Note that it is antisymmetric and we are using the covariant form of the tensor. Explicitly written the electromagnetic field tensor is
We can easily check that Maxwell equations pop out of these quantities but we shall move on to our Lagrangian. Without a full derivation, I shall state the Lagrangian for an electromagnetic field in free space:

Now that we have our lagrangian, a natural progression is to apply Euler-Lagrange equations. However, for the sake of time, we shall not delve into that here, but the interested reader should consult any standard text on classical electrodynamics.
Conclusion
We conclude by summarising what we have explored in this article. Beginning with the problem of finding the electric and magnetic fields caused by a distribution of charges and currents, we stated Maxwell equations, with a vague derivation, and explored how to approach to solve them. In doing so, we used a mathematical construct called potentials, coupled with the invariance of the equations under certain Gauge transformations, to find effective ways to solve for electromagnetic fields. Subsequently, we considered the problem of finding the interactions between charged particles and electromagnetic fields. Starting with the spacetime equivalents of potentials and gradients, we derived the EM field tensors and potentials, therefore allowing us to state the Lagrangian.