> For the complete documentation index, see [llms.txt](https://docs.kostacloud.com/llms.txt). This page is available as [Markdown](https://docs.kostacloud.com/kostacloud/advanced-optics-ray-trace/muller-calculus-and-transfer-matrix-method-tmm.md).

# Muller Calculus & Transfer Matrix Method (TMM)

>-

In KostaCLOUD every ray keeps track of a **Polarization** **Stokes Vector** which specifies a **mixed polarization state** of light which enters into an optical system.

Many people are accustomed to the standard **Jones Vector**, which is a complex valued vector which can be used to describe **solely pure polarization states**. A Jones vector can be represented in the following way:

$$
\bf{E} = \begin{bmatrix} E_x e^{i\delta_x}\\ E_y e^{i\delta_y} \end{bmatrix}
$$

We can **convert** a Jones Vectors into Stokes Vectors in a fixed cartesian basis (as defined previously) as follows:

$$
\begin{bmatrix} I\\ Q \\ U \\ V \end{bmatrix} =\begin{bmatrix} I_\text{Unpolarized}\\ 0 \\ 0 \\ 0 \end{bmatrix} +\begin{bmatrix} E_x^2+E_y^2\\ E_x^2-E_y^2 \\ 2 E_x E_y \cos(\delta_x -\delta_y) \\ -2 E_x E_y \sin(\delta_x-\delta_y) \end{bmatrix}
$$

You can specify any simple mixed or pure polarization state of light utilizing Stokes parameters. A mixed state is defined as an unknown state, which translates to a random polarization. As light propagates through a system, it generally turns into a more pure state, as we have a defined system with known interactions. A few Examples are as follows

$$\begin{bmatrix} I_0\\ Q_0 \\ U_0 \\ V_0 \end{bmatrix} =\begin{bmatrix} 1\\ 0 \\ 0 \\ 0 \end{bmatrix}$$-> Unpolarized Light

$$\begin{bmatrix} I_0\\ Q_0 \\ U_0 \\ V_0 \end{bmatrix} =\begin{bmatrix} 1\\ 1 \\ 0 \\ 0 \end{bmatrix}$$-> Linear Horizontally Polarized Light, $$-Q_0$$ is Linear Vertical Polarized Light

$$\begin{bmatrix} I_0\\ Q_0 \\ U_0 \\ V_0 \end{bmatrix} =\begin{bmatrix} 1\\ 0 \\ 1 \\ 0 \end{bmatrix}$$-> Linear $$45^{\circ}$$Polarized Light, $$-U_0$$ is Linear $$-45^{\circ}$$ Polarized Light

$$\begin{bmatrix} I_0\\ Q_0 \\ U_0 \\ V_0 \end{bmatrix} =\begin{bmatrix} 1\\ 0 \\ 0 \\ 1 \end{bmatrix}$$-> Right Hand Circularly Polarized Light, $$-V_0$$ is Left Hand Circularly Polarized Light

In Reflection of an interface we use the following matrix:

$$\begin{bmatrix} I'\\ Q' \\ U' \\ V' \end{bmatrix} =\begin{bmatrix} \frac{1}{2} (\rho_s^2+\rho_p^2) & \frac{1}{2} (\rho_s^2-\rho_p^2) & 0 & 0\\ \frac{1}{2} (\rho_s^2-\rho_p^2) & \frac{1}{2} (\rho_s^2+\rho_p^2) & 0 & 0 \\ 0 & 0 & \rho_s \rho_p \cos(\Delta_\rho) & -\rho_s \rho_p \sin(\Delta_\rho) \\ 0 & 0 & -\rho_s \rho_p \sin(\Delta_\rho) &  \rho_s \rho_p \cos(\Delta_\rho)  \end{bmatrix}  \begin{bmatrix} I_0\\ Q_0 \\ U_0 \\ V_0 \end{bmatrix}$$

Where we can relate local quantities to our **reflection** **Fresnel** **coefficients**: $$\rho_s = |r_s| \\ \rho_p = |r_p| \\ \Delta_\rho = \measuredangle r_s - \measuredangle r_p$$

In Transmission of an interface we use the following matrix:

$$\begin{bmatrix} I'\\ Q' \\ U' \\ V' \end{bmatrix} =\begin{bmatrix} \frac{1}{2} (\tau_s^2+\tau_p^2) & \frac{1}{2} (\tau_s^2-\tau_p^2) & 0 & 0\\ \frac{1}{2} (\tau_s^2-\tau_p^2) & \frac{1}{2} (\tau_s^2+\tau_p^2) & 0 & 0 \\ 0 & 0 & \tau_s \tau_p \cos(\Delta_\tau) & -\tau_s \tau_p \sin(\Delta_\tau) \\ 0 & 0 & -\tau_s \tau_p \sin(\Delta_\tau) &  \tau_s \tau_p \cos(\Delta_\tau)  \end{bmatrix}  \begin{bmatrix} I_0\\ Q_0 \\ U_0 \\ V_0 \end{bmatrix}$$

Where we can relate local quantities to our **transmission** **Fresnel** **coefficients**: $$\tau_s = |t_s| \\ \tau_p = |t_p| \\ \Delta_\tau = \measuredangle t_s - \measuredangle t_p \\$$

In calculating Dielectric Stacks KostaCLOUD utilizes the **Transfer Matrix Method** (**TMM**). TMM is projected into the Stokes Vector Space to include effects such as layer thickness, which plays directly into the **transmission**/**reflection** **Fresnel** **coefficients**. We can calculate an induced phase factor due to each matrix as follows: $$\phi_n=i k_\parallel \Delta t_n$$, where $$k_\parallel$$is the projected wave-vector, $$\Delta t_n$$ is our layer thickness. We can then include these in a transfer matrix:

$$
(r/t)_\text{total}=\prod_{n=1}^{N_\text{max}} \begin{bmatrix}
e^{\phi_n} & (r/t)_{n,n+1} e^{\phi_n} \\
(r/t)_{n,n+1} e^{-\phi_n} & e^{-\phi_n} \end{bmatrix}
$$

#### References

1. E. Collett, _Field Guide to Polarized Light_, SPIE - the International Society for Optical Engineering, Bellingham, WA (2005).
2. Charalambos C. Katsidis and Dimitrios I. Siapkas, "General transfer-matrix method for optical multilayer systems with coherent, partially coherent, and incoherent interference," Appl. Opt. 41, 3978-3987 (2002)
