# Transfer-matrix method (optics)

The transfer-matrix method is a method used in optics and acoustics to analyze the propagation of electromagnetic or acoustic waves through a stratified medium; a stack of thin films. This is, for example, relevant for the design of anti-reflective coatings and dielectric mirrors.
The reflection of light from a single interface between two media is described by the Fresnel equations. However, when there are multiple interfaces, such as in the figure, the reflections themselves are also partially transmitted and then partially reflected. Depending on the exact path length, these reflections can interfere destructively or constructively. The overall reflection of a layer structure is the sum of an infinite number of reflections.
The transfer-matrix method is based on the fact that, according to Maxwell's equations, there are simple continuity conditions for the electric field across boundaries from one medium to the next. If the field is known at the beginning of a layer, the field at the end of the layer can be derived from a simple matrix operation. A stack of layers can then be represented as a system matrix, which is the product of the individual layer matrices. The final step of the method involves converting the system matrix back into reflection and transmission coefficients.

## Formalism for electromagnetic waves

Below is described how the transfer matrix is applied to electromagnetic waves (for example light) of a given frequency propagating through a stack of layers at normal incidence. It can be generalized to deal with incidence at an angle, absorbing media, and media with magnetic properties. We assume that the stack layers are normal to the $z\,$ axis and that the field within one layer can be represented as the superposition of a left- and right-traveling wave with wave number $k\,$,
    $E(z)=E_{r}e^{ikz}+E_{l}e^{-ikz}\,$.
Because it follows from Maxwell's equation that electric field $E\,$ and magnetic field (its normalized derivative) H=1/ik Z$_c$ dE/dz {\textstyle H={\frac {1}{ik}}Z_{c}{\frac {dE}{dz}}\, } must be continuous across a boundary, it is convenient to represent the field as the vector (E(z), H(z)){\textstyle (E(z), H(z))\, }, where
    $H(z)={\frac {1}{Z_{c}}}E_{r}e^{ikz}-{\frac {1}{Z_{c}}}E_{l}e^{-ikz}\,$.
Since there are two equations relating $E\,$ and $H\,$ to $E_{r}\,$ and $E_{l}\,$, these two representations are equivalent. In the new representation, propagation over a distance $L\,$ into the positive direction of $z\,$ is described by the matrix belonging to the special linear group SL(2, C)
    $M=\left({\begin{array}{cc}\cos kL&iZ_{c}\sin kL\\{\frac {i}{Z_{c}}}\sin kL&\cos kL\end{array}}\right),$
and
    $\left({\begin{array}{c}E(z+L)\\H(z+L)\end{array}}\right)=M\cdot \left({\begin{array}{c}E(z)\\H(z)\end{array}}\right)$
Such a matrix can represent propagation through a layer if $k\,$ is the wave number in the medium and $L\,$ the thickness of the layer: For a system with $N\,$ layers, each layer $j\,$ has a transfer matrix $M_{j}\,$, where $j\,$ increases towards higher $z\,$ values. The system transfer matrix is then
    $M_{s}=M_{N}\cdot \ldots \cdot M_{2}\cdot M_{1}.$
Typically, one would like to know the reflectance and transmittance of the layer structure. If the layer stack starts at $z=0\,$, then for negative $z\,$, the field is described as
    $E_{L}(z)=E_{0}e^{ik_{L}z}+rE_{0}e^{-ik_{L}z},\qquad z<0,$
where $E_{0}\,$ is the amplitude of the incoming wave, $k_{L}\,$ the wave number in the left medium, and $r\,$ is the amplitude (not intensity!) reflectance coefficient of the layer structure. On the other side of the layer structure, the field consists of a right-propagating transmitted field
    $E_{R}(z)=tE_{0}e^{ik_{R}z},\qquad z>L',$
where $t\,$ is the amplitude transmittance, $k_{R}\,$ is the wave number in the rightmost medium, and $L'$ is the total thickness. If H$_L$=1/ik Z$_c$ dE$_L$/dz {\textstyle H_{L}={\frac {1}{ik}}Z_{c}{\frac {dE_{L}}{dz}}\, } and H$_R$=1/ik Z$_c$ dE$_R$/dz {\textstyle H_{R}={\frac {1}{ik}}Z_{c}{\frac {dE_{R}}{dz}}\, }, then one can solve
    $\left({\begin{array}{c}E(z_{R})\\H(z_{R})\end{array}}\right)=M\cdot \left({\begin{array}{c}E(0)\\H(0)\end{array}}\right)$
in terms of the matrix elements $M_{mn}\,$ of the system matrix $M_{s}\,$ and obtain
    $t=2ik_{L}e^{-ik_{R}L}\left[{\frac {1}{-M_{21}+k_{L}k_{R}M_{12}+i(k_{R}M_{11}+k_{L}M_{22})}}\right]$
and
    $r=\left[{\frac {(M_{21}+k_{L}k_{R}M_{12})+i(k_{L}M_{22}-k_{R}M_{11})}{(-M_{21}+k_{L}k_{R}M_{12})+i(k_{L}M_{22}+k_{R}M_{11})}}\right]$.
The transmittance and reflectance (i.e., the fractions of the incident intensity |E$_0$|$^2${\textstyle \left|E_{0}\right|^{2}} transmitted and reflected by the layer) are often of more practical use and are given by T=k$_R$/k$_L$ |t|$^2${\textstyle T={\frac {k_{R}}{k_{L}}}|t|^{2}\, } and $R=|r|^{2}\,$, respectively (at normal incidence).

### Example

As an illustration, consider a single layer of glass with a refractive index n and thickness d suspended in air at a wave number k (in air). In glass, the wave number is $k'=nk\,$. The transfer matrix is
    $M=\left({\begin{array}{cc}\cos k'd&\sin(k'd)/k'\\-k'\sin k'd&\cos k'd\end{array}}\right)$.
The amplitude reflection coefficient can be simplified to
    $r={\frac {(1/n-n)\sin(k'd)}{(n+1/n)\sin(k'd)+2i\cos(k'd)}}$.
This configuration effectively describes a Fabry–Pérot interferometer or etalon: for k$^′$d=0, π, 2π, ⋯{\textstyle k'd=0, \pi , 2\pi , \cdots \, }, the reflection vanishes.

## Acoustic waves

It is possible to apply the transfer-matrix method to sound waves. Instead of the electric field E and its derivative H, the displacement u and the stress $\sigma =Cdu/dz$, where $C$ is the p-wave modulus, should be used.

## Abeles matrix formalism

The Abeles matrix method is a computationally fast and easy way to calculate the specular reflectivity from a stratified interface, as a function of the perpendicular momentum transfer, Q$_z$:
    $Q_{z}={\frac {4\pi }{\lambda }}\sin \theta =2k_{z}$
where θ is the angle of incidence/reflection of the incident radiation and λ is the wavelength of the radiation. The measured reflectivity depends on the variation in the scattering length density (SLD) profile, ρ(z), perpendicular to the interface. Although the scattering length density profile is normally a continuously varying function, the interfacial structure can often be well approximated by a slab model in which layers of thickness (d$_n$), scattering length density (ρ$_n$) and roughness (σ$_{n,n+1}$) are sandwiched between the super- and sub-phases. One then uses a refinement procedure to minimise the differences between the theoretical and measured reflectivity curves, by changing the parameters that describe each layer.
In this description the interface is split into n layers. Since the incident neutron beam is refracted by each of the layers the wavevector k, in layer n, is given by:
    $k_{n}={\sqrt {{k_{z}}^{2}-4\pi ({\rho }_{n}-{\rho }_{0})}}$
The Fresnel reflection coefficient between layer n and n+1 is then given by:
    $r_{n,n+1}={\frac {k_{n}-k_{n+1}}{k_{n}+k_{n+1}}}$
Because the interface between each layer is unlikely to be perfectly smooth the roughness/diffuseness of each interface modifies the Fresnel coefficient and is accounted for by an error function,
    $r_{n,n+1}={\frac {k_{n}-k_{n+1}}{k_{n}+k_{n+1}}}\exp(-2k_{n}k_{n+1}{\sigma _{n,n+1}}^{2}).$
A phase factor, β, is introduced, which accounts for the thickness of each layer.
    $\beta _{0}=0$
    $\beta _{n}=ik_{n}d_{n}$
where i$^2$ = −1. A characteristic matrix, c$_n$ is then calculated for each layer.
    $c_{n}=\left[{\begin{array}{cc}\exp \left(\beta _{n}\right)&r_{n,n+1}\exp \left(\beta _{n}\right)\\r_{n,n+1}\exp \left(-\beta _{n}\right)&\exp \left(-\beta _{n}\right)\end{array}}\right]$
The resultant matrix is defined as the ordered product of these characteristic matrices
    $M=\prod _{n}c_{n}$
from which the reflectivity is calculated as:
    $R=\left|{\frac {M_{10}}{M_{00}}}\right|^{2}$