> For the complete documentation index, see [llms.txt](https://docs.kostacloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; 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)

Polarization effects in KostaCLOUD via 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:&#x20;

$$\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)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kostacloud.com/kostacloud/advanced-optics-ray-trace/muller-calculus-and-transfer-matrix-method-tmm.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
