5.5. Ray Transfer Matrix Analysis

5.5.1. ABCD Matrix

In paraxial optics, the relationships between angles \(\theta\) and distances \(x\) relative to the optical axis can be expressed linearly. The ABCD matrix, a fundamental concept in this context, encapsulates the linear components necessary to compute the output parameters from the input values for a system characterized by the same matrix. This relationship can be represented as: [1]

(5.98)\[\begin{split}\left[\begin{array}{l} x_2 \\ \theta_2 \end{array}\right]=\left[\begin{array}{ll} A & B \\ C & D \end{array}\right]\left[\begin{array}{l} x_1 \\ \theta_1 \end{array}\right]\end{split}\]
Table 5.3 Description of matrix elements [1]

Element

Description

\(A\)

positional scaling

\(B\)

position change depending on input angle

\(C\)

angle change depending on input position.
Equivalent to \(-\frac{1}{f}\), with \(f\) being the focal distance

\(D\)

angular scaling

Zero matrix elements, as described in Table 5.4, hold particular importance as they indicate specific cases of imaging and focusing.

Table 5.4 Significance of zero matrix elements [2][3]

Case

Description

\(A=0\)

parallel to point focussing,
output lies at second focal plane

\(B=0\)

point to point focussing (image of an object),
input and output lie at conjugate planes,
\(A\) gives the image magnification

\(C=0\)

parallel to parallel imaging (afocal or telescopic system),
\(D\) gives us the angular magnification

\(D=0\)

point to parallel imaging (e.g. headlamp),
input lies at first focal plane

An important relationship is that the determinant of an ABCD matrix, denoted here as \(M\), always equals the ratio between the refractive indices of the preceding medium \(n_i\) and the subsequent medium \(n_o\) [3].

(5.99)\[\det (M) = AD - BC = \frac{n_i}{n_o}\]

5.5.2. Propagation through Free Space

An ABCD-Matrix for free space with distance \(d\) has the following form: [3]

(5.100)\[\begin{split}\text{M}_\text{s} = \left[\begin{array}{ll} 1 & d \\ 0 & 1 \end{array}\right]\end{split}\]

5.5.3. Refraction on a Curved Interface

An ABCD matrix for free space over a distance \(d\) is represented as follows [3] :

(5.101)\[\begin{split}\text{M}_\text{c} = \left[\begin{array}{cc} 1 & 0 \\ -\frac{n_o-n_i}{R \cdot n_o} & \frac{n_i}{n_o} \end{array}\right]\end{split}\]

5.5.4. Refraction on a Flat Interface

When \(R \to \infty\), which is equivalent to a flat interface, the matrix simplifies to [3] :

(5.102)\[\begin{split}\text{M}_\text{i} = \left[\begin{array}{cc} 1 & 0 \\ 0 & \frac{n_i}{n_o} \end{array}\right]\end{split}\]

5.5.5. Thick Lens

For a thick lens, several parameters are to be considered: The lens has a refractive index \(n\), front surface curvature \(R_1\), and back surface curvature \(R_2\). Its thickness is \(d\), with a medium of refractive index \(n_1\) in front and a medium of refractive index \(n_2\) behind. Using ray transfer matrix analysis, this system is represented by the product of the front surface matrix \(\text{M}_\text{c1}\), the free space propagation matrix \(\text{M}_\text{s}\), and the back surface matrix \(\text{M}_\text{c2}\). It is important to note that matrices are multiplied from right to left. The resulting matrix can be expressed as: [4]

(5.103)\[\begin{split}\text{M}_\text{thick} =&~~ \text{M}_\text{c2} \cdot \text{M}_\text{s} \cdot \text{M}_\text{c1}\\ =&~ \left[\begin{array}{cc} 1 & 0 \\ -\frac{n_2-n}{R_2 \cdot n_2} & \frac{n}{n_2} \end{array}\right] \left[\begin{array}{ll} 1 & d \\ 0 & 1 \end{array}\right] \left[\begin{array}{cc} 1 & 0 \\ -\frac{n-n_1}{R_1 \cdot n} & \frac{n_1}{n} \end{array}\right]\\ =&~ \left[\begin{array}{cc} 1 + \frac{n_1-n}{n R_1}d & \frac{n_1}{n}d \\ \frac{n_1 - n}{n_2 R_1} + \frac{n-n_2}{n_2 R_2} + \frac{n_1 - n}{n R_1}\frac{n-n_2}{n_2 R_2}d & \frac{n_1}{n_2} + \frac{n_1}{n}\frac{n - n_2}{n_2 R_2}d \end{array}\right]\end{split}\]

When the surrounding media are identical, i.e., \(n_0 := n_1 = n_2\), the matrix simplifies to:

(5.104)\[\begin{split}\text{M}_{\text{thick},n_0} =&~ \left[\begin{array}{cc} 1 + \frac{n_0-n}{n R_1}d & \frac{n_0}{n}d \\ \frac{n_0 - n}{n_0} \left( \frac{1}{R_1} - \frac{1}{R_2} + \frac{n-n_0}{n R_1 R_2}d \right) & 1 + \frac{n - n_0}{n R_2}d \end{array}\right]\end{split}\]

5.5.6. Thin Lens

In general, the matrix element \(C\) can be interpreted as the negative inverse focal length, \(-\frac{1}{f}\). For a thin lens, where \(d=0\), equation \(TMA_thick_lens_complete\) simplifies to:

(5.105)\[\begin{split}\text{M}_\text{thin} = \left[\begin{array}{cc} 1 & 0 \\ -\frac{1}{f} & \frac{n_i}{n_o} \end{array}\right]\end{split}\]

When \(n_i = n_o\), resulting in \(D=1\), the matrix aligns with equations commonly found in the literature, as referenced in [3].

5.5.7. Lensmaker Equation

For the thin lens, the element \(C\) was equal to \(-\frac{1}{f}\). Negating this element from equation (5.103) and applying \(-(n_1 - n) = (n - n_1)\), we obtain the focal length in the forward direction:

(5.106)\[\frac{1}{f_2} = \frac{n-n_1}{n_2}\frac{1}{R_1} - \frac{n-n_2}{n_2}\frac{1}{R_2} + \frac{n-n_1}{n R_1}\frac{n-n_2}{n_2 R_2}d\]

Performing the same calculations with the media and curvatures swapped yields the backward focal length:

(5.107)\[f_1 = -\frac{n_1}{n_2} f_2\]

In its expanded form, this is:

(5.108)\[\frac{1}{f_1} = -\frac{n-n_1}{n_1}\frac{1}{R_1} + \frac{n-n_2}{n_1}\frac{1}{R_2} - \frac{n-n_1}{n R_1}\frac{n-n_2}{n_1 R_2}d\]

Both equations above are consistent with [3] For \(n_0 := n_1 = n_2\), we derive:

(5.109)\[\frac{1}{f_2} = \frac{n-n_0}{n_0}\left(\frac{1}{R_1} - \frac{1}{R_2} + \frac{n-n_0}{n R_1 R_2}d \right)\]

This is the typical form of the lens maker equation [5].

5.5.8. Gullstrand Equation

Utilizing definition (5.119) and equation (5.106), and defining \(D\) as \(D_2\) from now on, we can express:

(5.110)\[D = \frac{n_2}{f_2} = \frac{n-n_1}{R_1} - \frac{n-n_2}{R_2} + \frac{n-n_1}{n R_1}\frac{n-n_2}{R_2}d\]

This is equivalent to

(5.111)\[D = \frac{n_2}{f_2} = \frac{n-n_1}{R_1} + \left( - \frac{n-n_2}{R_2} \right) - \frac{n-n_1}{R_1} \cdot \left( - \frac{n-n_2}{R_2} \right) \frac{d}{n}\]

With the surface optical powers \(D_\text{s1} = \frac{n-n_1}{R_1}\) and \(D_\text{s2} = -\frac{n-n_2}{R_2}\) this simplifies to:

(5.112)\[D = D_\text{s1} + D_\text{s2} - D_\text{s1} D_\text{s2} \frac{d}{n}\]

This is known as Gullstrand’s equation [6][7].

5.5.9. Cardinal Points

The following calculations are derived from [8] and [3]. Both sources also offer textual and graphical explanations of cardinal points and planes.

Vertex Points

The vertex points \(V_1\) and \(V_2\) are positioned at the optical axis and represent the front and back of the lens respectively.

Principal Points

(5.113)\[\begin{split}P_1 =&~ V_1 - \frac{n_1 - n_2 D}{n_2 C}\\ P_2 =&~ V_2 + \frac{1-A}{C}\end{split}\]

Nodal Points

(5.114)\[\begin{split}N_1 =&~ V_1 - \frac{1-D}{C}\\ N_2 =&~ V_2 + \frac{n_1 - n_2 A}{n_2 C}\end{split}\]

Focal Lengths

Focal lengths are given by the negative inverse of \(C\) as well as equation (5.107).

(5.115)\[\begin{split}f_1 =&~ \frac{n_1}{n_2 C}\\ f_2 =&~ -\frac{1}{C}\end{split}\]

Focal Points

(5.116)\[\begin{split}F_1 = &~ P_1 + f_1\\ F_2 = &~ P_2 + f_2\end{split}\]

EFL, BFL, FFL

Effective focal length (EFL), back focal length (BFL) and front focal length (FFL) are defined as follows:

(5.117)\[\begin{split}\text{FFL} =&~ F_1 - V_1 &=~& &\frac{D}{C}\\ \text{BFL} =&~ F_2 - V_2 &=~& -&\frac{A}{C}\\ \text{EFL} =&~ f_2 &=~& -&\frac{1}{C}\end{split}\]

5.5.10. Optical Power

The default definition in optrace considers the optical power as the inverse of the geometric focal length.

(5.118)\[\begin{split}D_1 = \frac{1}{f_1}\\ D_2 = \frac{1}{f_2}\end{split}\]

The alternative definition below has the advantage that \(D_\text{1n} = -D_\text{2n}\) holds true independently of the refractive media.

(5.119)\[\begin{split}D_\text{1n} =&~ \frac{n_1}{f_1}\\ D_\text{2n} =&~ \frac{n_2}{f_2}\\ f_\text{1n} =&~ \frac{f_1}{n_1}\\ f_\text{2n} =&~ \frac{f_2}{n_2}\\ \text{EFL}_n =&~ \frac{f_2}{n_2}\\\end{split}\]

However, in this case, the focal lengths do not represent the actual distance between the principal plane and the focal points. For \(n_1 = n_2 = 1\), both definitions are equivalent.

5.5.11. Lens Setups

To evaluate setups of \(N\) lenses, the lens matrices \(\text{M}_\text{L,i}\) and the free space matrices \(\text{M}_\text{s,j}\) need to be multiplied. Here, \(i \in \{0, 1, \dots, N\}\) and \(j \in \{0, 1, \dots, N-1\}\) holds.

(5.120)\[\text{M} = \text{M}_\text{L,N} \cdot \text{M}_\text{s,N-1} \dots \text{M}_\text{s,0} \cdot \text{M}_\text{L,0}\]

5.5.12. Optical Center

General Case

The optical center is the axial position where nodal rays intersect with the optical axis, as illustrated by Fig. 5.19.

../_images/optical_center.svg

Fig. 5.19 Optical center of a lens.

For the yellow triangle, the following relation holds:

(5.121)\[\tan \phi = \frac{x_2 - x_1}{V_2 - V_1}\]

From the green triangle, we derive:

(5.122)\[\tan \phi = -\frac{x_1}{o}\]

Note that the minus sign was added so both equations maintain the same sign. Inserting (5.121) into (5.122) gives:

(5.123)\[o = - \frac{x_1}{x_2 - x_1} \left(V_2 - V_1\right)\]

The blue triangle leads to:

(5.124)\[\tan \theta_1 = -\frac{x_1}{N_1 - V_1}\]

With paraxial rays, the approximation \(\theta_1 \approx \tan \theta_1\) holds. Therefore, \(x_2\) can be calculated using the ABCD matrix of the setup:

(5.125)\[x_2 = A x_1 - \frac{B}{N_1 - V_1} x_1\]

Inserting into (5.123) gives us:

(5.126)\[o = -\frac{x_1}{A x_1 - \frac{B}{N_1 - V_1} x_1 -x_1} \left(V_2 - V_1\right)\]

From (5.114), it follows that:

(5.127)\[N_1 - V_1 = - \frac{1 - D}{C}\]

Which can also be inserted into the equation (5.126). After some rearranging we obtain:

(5.128)\[o = \frac{V_2 - V_1}{1 - A + \frac{BC}{D-1}}\]

This value needs to be added to the front vertex to get the absolute position of the optical center:

(5.129)\[\text{OC} = V_1 + \frac{V_2 - V_1}{1 - A + \frac{BC}{D-1}}\]

The requirements that were implicitly assumed include the existence of a nodal point (\(C \neq 0\)) and that the input and output positions differ (\(x_2 \neq x_1\)). The only scenario where it makes sense to define an optical center, despite these conditions, is for an ideal lens. In this case, we set \(\text{OC} = V_1\), although a nodal ray does not cross the optical axis at that point. In all other cases, particularly when \(1 - A + \frac{BC}{D - 1} = 0\) or \(D = 1\), the optical center is undefined. As mentioned previously, an ideal lens (\(A = 1, ~B=0, ~C\neq 0, ~D=1\)) is an exception.

Thick Lens/Lens Combination with Same Front and Back Medium

With \(m := \frac{n - n_0}{n}d\) matrix (5.104) becomes:

(5.130)\[\begin{split}\text{M}_{\text{thick},n_0} =&~ \left[\begin{array}{cc} 1 - \frac{m}{R_1} & \frac{n_0}{n}d \\ \frac{n_0 - n}{n_0} \left( \frac{1}{R_1} - \frac{1}{R_2} + \frac{m}{R_1 R_2} \right) & 1 + \frac{m}{R_2} \end{array}\right]\end{split}\]

The denominator of equation (5.129) is then:

(5.131)\[\begin{split}1 - A + \frac{BC}{D - 1} &= 1 - \left(1 - \frac{m}{R_1}\right) + \frac{\frac{n_0-n}{n_0}\frac{n_0}{n}d \left( \frac{1}{R_1} - \frac{1}{R_2} + \frac{m}{R_1 R_2} \right)}{1 + \frac{m}{R_2} - 1}\\ &= \frac{m}{R_1} - m \frac{\left( \frac{1}{R_1} - \frac{1}{R_2} + \frac{m}{R_1 R_2} \right)}{\frac{m}{R_2}}\\ &= \frac{m}{R_1} - \left( \frac{R_2}{R_1} - 1 + \frac{m}{R_1} \right)\\ &= 1 - \frac{R_2}{R_1}\end{split}\]

Leading to the final form of (5.129):

(5.132)\[\text{OC} = V_1 + \frac{V_2 - V_1}{1 - \frac{R_2}{R_1}}\]

Equation (5.132) is consistent with the results in [9]. As mentioned in [10], in this case, the optical center is completely independent of the wavelength and the material dispersion.

Applying the same approach to two ideal lenses with focal lengths \(f_1\) and \(f_2\), separated by a distance \(d\) and surrounded by the same ambient media, results in a similar form:

(5.133)\[\begin{split}M_\text{2L} &= \left[\begin{array}{cc} 1 & 0 \\ \frac{1}{f_2} & 1 \end{array}\right] \cdot\left[\begin{array}{ll} 1 & d \\ 0 & 1 \end{array}\right] \cdot\left[\begin{array}{cc} 1 & 0 \\ \frac{1}{f_1} & 1 \end{array}\right]\\ &= \left[\begin{array}{cc} 1+\frac{d}{f_1} & d \\ \frac{1}{f_1}+\frac{1}{f_2}+\frac{d}{f_1 f_2} & 1+\frac{d}{f_2} \end{array}\right]\end{split}\]
(5.134)\[\begin{split}1 - A + \frac{BC}{D - 1} &= 1 - \left(1 + \frac{d}{f_1}\right) + \frac{ \frac{1}{f_1} + \frac{1}{f_2} + \frac{d}{f_1 f_2} }{1 + \frac{d}{f_2} - 1} d\\ &= -\frac{d}{f_1} + \frac{f_2}{f_1} + 1 + \frac{d}{f_1}\\ &= 1 + \frac{f_2}{f_1}\end{split}\]
(5.135)\[\text{OC} = V_1 + \frac{V_2 - V_1}{1 + \frac{f_2}{f_1}}\]

For \(R_2 = -R_1\) in (5.132) or \(f_2 = f_1\) in (5.135) the optical center lies at exactly the center of the lens/lens combination.

5.5.13. Image and Object Distances

Positions

The matrix representation for additional object distance \(g\) and image distance \(b\) is given by:

(5.136)\[\begin{split}\text{M}_\text{b,g} = \left[\begin{array}{ll} 1 & b \\ 0 & 1 \end{array}\right] \cdot \text{M} \cdot \left[\begin{array}{ll} 1 & g \\ 0 & 1 \end{array}\right]\end{split}\]

In this context, the distance \(b\) is measured relative to the lens vertex point \(V_2\) and the distance \(g\) is measured relative to \(V_1\), with both distances considered positive when oriented towards the positive z-direction.

For the imaging element, it is essential that \(B_{b,g} = \text{M}_{b,g}[0, 1]\) equals zero. This condition ensures that the output ray position \(x_2\) is independent of the input angle \(\theta_1\), relying solely on the input position \(x_1\).

Consequently, the condition can be expressed as:

(5.137)\[B_\text{b,g} = g (A + C b) + B + D b = 0\]

For \(b, g \in \mathbb{R}\), the solution is represented as:

(5.138)\[\begin{split}b(g) = \begin{cases} -\frac{B + g A} {D + g C}, &~ \text{for}~~ {D + g C} \neq 0\\ \mathbb{R} &~ \text{for}~~ {D + g C} = 0 ~~\text{and}~~ B + g A = 0\\ \emptyset &~ \text{for}~~ {D + g C} = 0 ~~\text{and}~~ B + g A \neq 0 \end{cases}\end{split}\]
(5.139)\[\begin{split}g(b) = \begin{cases} -\frac{B + b D} {A + b C}, &~ \text{for}~~ {A + b C} \neq 0\\ \mathbb{R} &~ \text{for}~~ {A + b C} = 0 ~~\text{and}~~ B + b D = 0\\ \emptyset &~ \text{for}~~ {A + b C} = 0 ~~\text{and}~~ B + b D \neq 0 \end{cases}\end{split}\]

For special cases concerning limits approaching \(\pm\infty\), we derive:

(5.140)\[\begin{split}\lim_{g \to \pm \infty} b(g) = \begin{cases} -\frac{A}{C} &~ \text{for}~~ {C} \neq 0\\ \mathbb{R} &~ \text{for}~~ C = 0 ~~\text{and}~~ A = 0\\ \emptyset &~ \text{for}~~ C = 0 ~~\text{and}~~ A \neq 0 \end{cases}\end{split}\]
(5.141)\[\begin{split}\lim_{b \to \pm \infty} g(b) = \begin{cases} -\frac{D}{C} &~ \text{for}~~ {C} \neq 0\\ \mathbb{R} &~ \text{for}~~ C = 0 ~~\text{and}~~ D = 0\\ \emptyset &~ \text{for}~~ C = 0 ~~\text{and}~~ D \neq 0 \end{cases}\end{split}\]

Optrace assigns NaN (not a number) in all cases of \(\emptyset\) and \(\mathbb{R}\), as these cases are impractical.

For a matrix \(\text{M} = \text{M}_\text{thin}\) representing the thin lens approximation, derived from equation (5.105), the expressions simplify to:

(5.142)\[b(g) = \frac{fg}{g-\frac{n_i}{n_o}f}\]
(5.143)\[g(b) = \frac{\frac{n_i}{n_o}fb}{b-f}\]

These expressions are consistent with the well-known imaging equation:

(5.144)\[\frac{n_o}{f} = \frac{n_i}{g} + \frac{n_o}{b}\]

In the most common scenario, where \(n_i = 1\) and \(n_o = 1\), this simplifies to: [11]

(5.145)\[\frac{1}{f} = \frac{1}{g} + \frac{1}{b}\]

Here, \(f\), \(b\), and \(g\) are considered positive if measured in the positive z-direction.

Magnifications

With a given object and image position, the combined ABCD matrix as defined in (5.136) can be computed. In this matrix, element \(A\) corresponds to the magnification factor \(m\), given that \(B=0\) applies for this configuration.

For a thin, ideal lens, the magnification factor \(m\) is equivalent to \(b/g\).

The value of this factor conveys significant optical properties. Specifically, if \(A < 0\), the image is inverted, if \(A > 0\), the image is upright. Furthermore, if \(\lvert A \rvert > 1\), the image experiences a size increase, whereas if \(\lvert A \rvert < 1\), the image undergoes a size decrease.

5.5.14. Entrance and Exit Pupils

To calculate the entrance and exit pupils for a given optical system and aperture stop, the lens setup is conceptually divided into a front and a rear group. The pupils are defined as the image of the aperture stop within the respective group. [12]

../_images/pupil_calculation.svg

Fig. 5.20 Visualization of the matrix separation and different distances.

Aperture inside setup

When the aperture stop is positioned within the lens setup, the system and its matrix \(\text{M}\) can be decomposed into three distinct parts:

(5.146)\[\text{M} = \text{M}_\text{rear} \cdot \text{M}_\text{gap} \cdot \text{M}_\text{front}\]

Here, \(\text{M}_\text{front}\) represents the matrix for all surfaces located before the aperture stop, while \(\text{M}_\text{rear}\) pertains to those surfaces positioned after the stop. The matrix \(\text{M}_\text{gap}\) accounts for the distance in the gap region where the stop is located and is not associated with either the front or rear group.

The entrance pupil is formed by imaging the stop into the front group, whereas the exit pupil is the image of the aperture stop in the rear group.

The object distance for calculating the exit pupil is:

(5.147)\[g_\text{ex} = V_{1,\text{rear}} - z_\text{s}\]

The exit pupil image distance \(b_\text{ex}\) is determined using \(\text{M}_{b,g} = \text{M}_\text{rear}\) and following the procedure outlined in Section 5.5.13. Subsequently, the resulting position \(z_\text{ex}\) is obtained as follows:

(5.148)\[z_\text{ex} = V_{2,\text{rear}} + b_\text{ex}\]

For the entrance pupil, the aperture stop is imaged in the backward direction through \(\text{M}_\text{front}\) by inverting the matrix:

(5.149)\[\begin{split}\text{M}^{-1}_\text{front} &= \left[\begin{array}{cc} A & B \\ C & D \end{array}\right]^{-1}\\ &= \frac{1}{AD - BC} \left[\begin{array}{cc} D & -B \\ -C & A \end{array}\right]\\\end{split}\]

The object distance is negative and calculated with the back vertex of the front group:

(5.150)\[g_\text{en} = V_{2,\text{front}} - z_\text{s}\]

To compute \(b_\text{en}(g_\text{en})\), the procedure outlined in Section 5.5.13 is utilized, setting \(\text{M}_{b,g} = \text{M}^{-1}_\text{front}\). The image distance \(b_\text{en}\) is then added to the front vertex of the front group to determine the entrance pupil position:

(5.151)\[z_\text{en} = V_{1,\text{front}} + b_\text{en}\]

Aperture in front of setup

When the aperture stop is located in front of all lenses, it directly serves as the entrance pupil, thus \(z_\text{en} = z_\text{s}\). The exit pupil is then calculated by imaging through all elements using the matrix:

(5.152)\[\text{M}_\text{rear} = \text{M}\]

Aperture behind of setup

Conversely, if the aperture stop is positioned behind all lenses, it equates to the exit pupil, meaning \(z_\text{ex} = z_\text{s}\). The entrance pupil in this scenario is calculated by imaging backwards through all elements, employing the procedure described previously, using the matrix:

(5.153)\[\text{M}_\text{front} = \text{M}\]

References