# Matrix representation of Maxwell's equations

In electromagnetism, a branch of fundamental physics, the matrix representations of the Maxwell's equations are a formulation of Maxwell's equations using matrices, complex numbers, and vector calculus. These representations are for a homogeneous medium, an approximation in an inhomogeneous medium. A matrix representation for an inhomogeneous medium was presented using a pair of matrix equations. A single equation using 4 × 4 matrices is necessary and sufficient for any homogeneous medium. For an inhomogeneous medium it necessarily requires 8 × 8 matrices.

## Introduction

Maxwell's equations in the standard vector calculus formalism, in an inhomogeneous medium with sources, are:
    ${\begin{aligned}&{\mathbf {\nabla } }\cdot {\mathbf {D} }\left({\mathbf {r} },t\right)=\rho \,\\&{\mathbf {\nabla } }\times {\mathbf {H} }\left({\mathbf {r} },t\right)-{\frac {\partial }{\partial t}}{\mathbf {D} }\left({\mathbf {r} },t\right)={\mathbf {J} }\,\\&{\mathbf {\nabla } }\times {\mathbf {E} }\left({\mathbf {r} },t\right)+{\frac {\partial }{\partial t}}{\mathbf {B} }\left({\mathbf {r} },t\right)=0\,\\&{\mathbf {\nabla } }\cdot {\mathbf {B} }\left({\mathbf {r} },t\right)=0\,.\end{aligned}}$
The media is assumed to be linear, that is
    ${\mathbf {D} }=\varepsilon \mathbf {E} \,,\quad \mathbf {B} =\mu \mathbf {H}$,
where scalar $\varepsilon =\varepsilon (\mathbf {r} ,t)$ is the permittivity of the medium and scalar $\mu =\mu (\mathbf {r} ,t)$ the permeability of the medium (see constitutive equation). For a homogeneous medium $\varepsilon$ and $\mu$ are constants. The speed of light in the medium is given by
    $v({\mathbf {r} },t)={\frac {1}{\sqrt {\varepsilon ({\mathbf {r} },t)\,\mu ({\mathbf {r} },t)\,}}}$.
In vacuum, $\varepsilon _{0}=\,$8.85 × 10$^{−12}$ C$^2$·N$^{−1}$·m$^{−2}$ and $\mu _{0}=4\pi \,$× 10$^{−7}$ H·m$^{−1}$
One possible way to obtain the required matrix representation is to use the Riemann–Silberstein vector given by
    ${\begin{aligned}{\mathbf {F} }^{+}\left({\mathbf {r} },t\right)&={\frac {1}{\sqrt {2\,}}}\left[{\sqrt {\varepsilon ({\mathbf {r} },t)\,}}\,{\mathbf {E} }\left({\mathbf {r} },t\right)+{\rm {i}}\,{\frac {1}{\sqrt {\mu ({\mathbf {r} },t)\,}}}{\mathbf {B} }\left({\mathbf {r} },t\right)\right]\\{\mathbf {F} }^{-}\left({\mathbf {r} },t\right)&={\frac {1}{\sqrt {2\,}}}\left[{\sqrt {\varepsilon ({\mathbf {r} },t)\,}}\,{\mathbf {E} }\left({\mathbf {r} },t\right)-{\rm {i}}\,{\frac {1}{\sqrt {\mu ({\mathbf {r} },t)\,}}}{\mathbf {B} }\left({\mathbf {r} },t\right)\right]\,.\end{aligned}}$
If for a certain medium $\varepsilon =\varepsilon (\mathbf {r} ,t)$ and $\mu =\mu (\mathbf {r} ,t)$ are scalar constants (or can be treated as local scalar constants under certain approximations), then the vectors ${\mathbf {F} }^{\pm }(\mathbf {r} ,t)$ satisfy
    ${\begin{aligned}{\rm {i}}\,{\frac {\partial }{\partial t}}{\mathbf {F} }^{\pm }\left({\mathbf {r} },t\right)&=\pm v\,{\mathbf {\nabla } }\times {\mathbf {F} }^{\pm }\left({\mathbf {r} },t\right)-{\frac {1}{\sqrt {2\epsilon \,}}}({\rm {i}}\,{\mathbf {J} })\\{\mathbf {\nabla } }\cdot {\mathbf {F} }^{\pm }\left({\mathbf {r} },t\right)&={\frac {1}{\sqrt {2\varepsilon \,}}}(\rho )\,.\end{aligned}}$
Thus by using the Riemann–Silberstein vector, it is possible to reexpress the Maxwell's equations for a medium with constant $\varepsilon =\varepsilon (\mathbf {r} ,t)$ and $\mu =\mu (\mathbf {r} ,t)$ as a pair of constitutive equations.

## Homogeneous medium

In order to obtain a single matrix equation instead of a pair, the following new functions are constructed using the components of the Riemann–Silberstein vector
    ${\begin{aligned}\Psi ^{+}({\mathbf {r} },t)&=\left[{\begin{array}{c}-F_{x}^{+}+{\rm {i}}F_{y}^{+}\\F_{z}^{+}\\F_{z}^{+}\\F_{x}^{+}+{\rm {i}}F_{y}^{+}\end{array}}\right]\,\quad \Psi ^{-}({\mathbf {r} },t)=\left[{\begin{array}{c}-F_{x}^{-}-{\rm {i}}F_{y}^{-}\\F_{z}^{-}\\F_{z}^{-}\\F_{x}^{-}-{\rm {i}}F_{y}^{-}\end{array}}\right]\,.\end{aligned}}$
The vectors for the sources are
    ${\begin{aligned}W^{+}&=\left({\frac {1}{\sqrt {2\epsilon }}}\right)\left[{\begin{array}{c}-J_{x}+{\rm {i}}J_{y}\\J_{z}-v\rho \\J_{z}+v\rho \\J_{x}+{\rm {i}}J_{y}\end{array}}\right]\,\quad W^{-}=\left({\frac {1}{\sqrt {2\epsilon }}}\right)\left[{\begin{array}{c}-J_{x}-{\rm {i}}J_{y}\\J_{z}-v\rho \\J_{z}+v\rho \\J_{x}-{\rm {i}}J_{y}\end{array}}\right]\,.\end{aligned}}$
Then,
    ${\begin{aligned}{\frac {\partial }{\partial t}}\Psi ^{+}&=-v\left\{{\mathbf {M} }\cdot {\mathbf {\nabla } }\right\}\Psi ^{+}-W^{+}\,\\{\frac {\partial }{\partial t}}\Psi ^{-}&=-v\left\{{\mathbf {M} }^{*}\cdot {\mathbf {\nabla } }\right\}\Psi ^{-}-W^{-}\,\end{aligned}}$
where * denotes complex conjugation and the triplet, M = [M$_x$, M$_y$, M$_z$] is a vector whose component elements are abstract 4×4 matricies given by
    $M_{x}={\begin{bmatrix}0&0&1&0\\0&0&0&1\\1&0&0&0\\0&1&0&0\end{bmatrix}},$
    $M_{y}={\rm {i}}{\begin{bmatrix}0&0&-1&0\\0&0&0&-1\\+1&0&0&0\\0&+1&0&0\end{bmatrix}},$
    $M_{z}={\begin{bmatrix}+1&0&0&0\\0&+1&0&0\\0&0&-1&0\\0&0&0&-1\end{bmatrix}}\,.$
The component M-matrices may be formed using:
    $\Omega ={\begin{bmatrix}{\mathbf {0} }&-{\mathbf {I} _{2}}\\{\mathbf {I} _{2}}&{\mathbf {0} }\end{bmatrix}}\,\qquad \beta ={\begin{bmatrix}{\mathbf {I} _{2}}&{\mathbf {0} }\\{\mathbf {0} }&-{\mathbf {I} _{2}}\end{bmatrix}}\,,$
where $\mathbf {I} _{2}={\begin{bmatrix}1&0\\0&1\end{bmatrix}}\,,$
from which, get:
    $M_{x}=-\beta \Omega ,\qquad M_{y}={\rm {i}}\Omega ,\qquad M_{z}=\beta \,.$
Alternately, one may use the matrix $J=-\Omega \,.$ Which only differ by a sign. For our purpose it is fine to use either Ω or J. However, they have a different meaning: J is contravariant and Ω is covariant. The matrix Ω corresponds to the Lagrange brackets of classical mechanics and J corresponds to the Poisson brackets.
Note the important relation $\Omega =J^{-1}\,.$
Each of the four Maxwell's equations are obtained from the matrix representation. This is done by taking the sums and differences of row-I with row-IV and row-II with row-III respectively. The first three give the y, x, and z components of the curl and the last one gives the divergence conditions.
The matrices M are all non-singular and all are Hermitian. Moreover, they satisfy the usual (quaternion-like) algebra of the Dirac matrices, including,
    ${\begin{aligned}M_{x}M_{z}=-M_{z}M_{x}\,\\M_{y}M_{z}=-M_{z}M_{y}\,\\\\M_{x}^{2}=M_{y}^{2}=M_{z}^{2}=I\,\\\\M_{x}M_{y}=-M_{y}M_{x}={\rm {i}}M_{z}\,\\M_{y}M_{z}=-M_{z}M_{y}={\rm {i}}M_{x}\,\\M_{z}M_{x}=-M_{x}M_{z}={\rm {i}}M_{y}\,.\end{aligned}}$
The (Ψ$^±$, M) are not unique. Different choices of Ψ$^±$ would give rise to different M, such that the triplet M continues to satisfy the algebra of the Dirac matrices. The Ψ$^±$ via the Riemann–Silberstein vector has certain advantages over the other possible choices. The Riemann–Silberstein vector is well known in classical electrodynamics and has certain interesting properties and uses.
In deriving the above 4×4 matrix representation of the Maxwell's equations, the spatial and temporal derivatives of ε(r, t) and μ(r, t) in the first two of the Maxwell's equations have been ignored. The ε and μ have been treated as local constants.

## Inhomogeneous medium

In an inhomogeneous medium, the spatial and temporal variations of ε = ε(r, t) and μ = μ(r, t) are not zero. That is they are no longer local constant. Instead of using ε = ε(r, t) and μ = μ(r, t), it is advantageous to use the two derived laboratory functions namely the resistance function and the velocity function
    ${\begin{aligned}{\text{ Velocity function:}}\,v({\mathbf {r} },t)&={\frac {1}{\sqrt {\epsilon ({\mathbf {r} },t)\mu ({\mathbf {r} },t)}}}\\{\text{Resistance function:}}\,h({\mathbf {r} },t)&={\sqrt {\frac {\mu ({\mathbf {r} },t)}{\epsilon ({\mathbf {r} },t)}}}\,.\end{aligned}}$
In terms of these functions:
    $\varepsilon ={\frac {1}{vh}}\,,\quad \mu ={\frac {h}{v}}$.
These functions occur in the matrix representation through their logarithmic derivatives;
    ${\begin{aligned}{\mathbf {u} }({\mathbf {r} },t)&={\frac {1}{2v({\mathbf {r} },t)}}{\mathbf {\nabla } }v({\mathbf {r} },t)={\frac {1}{2}}{\mathbf {\nabla } }\left\{\ln v({\mathbf {r} },t)\right\}=-{\frac {1}{2}}{\mathbf {\nabla } }\left\{\ln n({\mathbf {r} },t)\right\}\\{\mathbf {w} }({\mathbf {r} },t)&={\frac {1}{2h({\mathbf {r} },t)}}{\mathbf {\nabla } }h({\mathbf {r} },t)={\frac {1}{2}}{\mathbf {\nabla } }\left\{\ln h({\mathbf {r} },t)\right\}\,\end{aligned}}$
where
    $n({\mathbf {r} },t)={\frac {c}{v({\mathbf {r} },t)}}$
is the refractive index of the medium.
The following matrices naturally arise in the exact matrix representation of the Maxwell's equation in a medium
    ${\begin{aligned}{\mathbf {\Sigma } }=\left[{\begin{array}{cc}{\mathbf {\sigma } }&{\mathbf {0} }\\{\mathbf {0} }&{\mathbf {\sigma } }\end{array}}\right]\,\qquad {\mathbf {\alpha } }=\left[{\begin{array}{cc}{\mathbf {0} }&{\mathbf {\sigma } }\\{\mathbf {\sigma } }&{\mathbf {0} }\end{array}}\right]\,\qquad {\mathbf {I} }=\left[{\begin{array}{cc}{\mathbf {1} }&{\mathbf {0} }\\{\mathbf {0} }&{\mathbf {1} }\end{array}}\right]\,\end{aligned}}$
where Σ are the Dirac spin matrices and α are the matrices used in the Dirac equation, and σ is the triplet of the Pauli matrices
    ${\mathbf {\sigma } }=(\sigma _{x},\sigma _{y},\sigma _{z})=\left[{\begin{pmatrix}0&1\\1&0\end{pmatrix}},{\begin{pmatrix}0&-{\rm {i}}\\{\rm {i}}&0\end{pmatrix}},{\begin{pmatrix}1&0\\0&-1\end{pmatrix}}\right]$
Finally, the matrix representation is
    ${\begin{aligned}&{\frac {\partial }{\partial t}}\left[{\begin{array}{cc}{\mathbf {I} }&{\mathbf {0} }\\{\mathbf {0} }&{\mathbf {I} }\end{array}}\right]\left[{\begin{array}{cc}\Psi ^{+}\\\Psi ^{-}\end{array}}\right]-{\frac {{\dot {v}}({\mathbf {r} },t)}{2v({\mathbf {r} },t)}}\left[{\begin{array}{cc}{\mathbf {I} }&{\mathbf {0} }\\{\mathbf {0} }&{\mathbf {I} }\end{array}}\right]\left[{\begin{array}{cc}\Psi ^{+}\\\Psi ^{-}\end{array}}\right]+{\frac {{\dot {h}}({\mathbf {r} },t)}{2h({\mathbf {r} },t)}}\left[{\begin{array}{cc}{\mathbf {0} }&{\rm {i}}\beta \alpha _{y}\\{\rm {i}}\beta \alpha _{y}&{\mathbf {0} }\end{array}}\right]\left[{\begin{array}{cc}\Psi ^{+}\\\Psi ^{-}\end{array}}\right]\\&=-v({\mathbf {r} },t)\left[{\begin{array}{ccc}\left\{{\mathbf {M} }\cdot {\mathbf {\nabla } }+{\mathbf {\Sigma } }\cdot {\mathbf {u} }\right\}&&-{\rm {i}}\beta \left({\mathbf {\Sigma } }\cdot {\mathbf {w} }\right)\alpha _{y}\\-{\rm {i}}\beta \left({\mathbf {\Sigma } }^{*}\cdot {\mathbf {w} }\right)\alpha _{y}&\left\{{\mathbf {M} }^{*}\cdot {\mathbf {\nabla } }+{\mathbf {\Sigma } }^{*}\cdot {\mathbf {u} }\right\}\end{array}}\right]\left[{\begin{array}{cc}\Psi ^{+}\\\Psi ^{-}\end{array}}\right]-\left[{\begin{array}{cc}{\mathbf {I} }&{\mathbf {0} }\\{\mathbf {0} }&{\mathbf {I} }\end{array}}\right]\left[{\begin{array}{c}W^{+}\\W^{-}\end{array}}\right]\,\end{aligned}}$
The above representation contains thirteen 8 × 8 matrices. Ten of these are Hermitian. The exceptional ones are the ones that contain the three components of w(r, t), the logarithmic gradient of the resistance function. These three matrices, for the resistance function are antihermitian.
The Maxwell's equations have been expressed in a matrix form for a medium with varying permittivity ε = ε(r, t) and permeability μ = μ(r, t), in presence of sources. This representation uses a single matrix equation, instead of a pair of matrix equations. In this representation, using 8 × 8 matrices, it has been possible to separate the dependence of the coupling between the upper components (Ψ$^+$) and the lower components (Ψ$^−$) through the two laboratory functions. Moreover, the exact matrix representation has an algebraic structure very similar to the Dirac equation. Maxwell's equations can be derived from the Fermat's principle of geometrical optics by the process of "wavization" analogous to the quantization of classical mechanics.

## Applications

One of the early uses of the matrix forms of the Maxwell's equations was to study certain symmetries, and the similarities with the Dirac equation.
The matrix form of the Maxwell's equations is used as a candidate for the Photon Wavefunction.
Historically, the geometrical optics is based on the Fermat's principle of least time. Geometrical optics can be completely derived from the Maxwell's equations. This is traditionally done using the Helmholtz equation. The derivation of the Helmholtz equation from the Maxwell's equations is an approximation as one neglects the spatial and temporal derivatives of the permittivity and permeability of the medium. A new formalism of light beam optics has been developed, starting with the Maxwell's equations in a matrix form: a single entity containing all the four Maxwell's equations. Such a prescription is sure to provide a deeper understanding of beam-optics and polarization in a unified manner. The beam-optical Hamiltonian derived from this matrix representation has an algebraic structure very similar to the Dirac equation, making it amenable to the Foldy-Wouthuysen technique. This approach is very similar to one developed for the quantum theory of charged-particle beam optics.