# Using a transfer matrix to calculate beam width of off-axis Gaussian beam?

I have been reading a lot about ABCD matrices that are used for ray tracing. I can calculate the output offset $r_{o}$ (with respect to the optical axis) and the angle $\theta$ of the ray by

$$\begin{pmatrix} r_{o} \\ \theta_{o} \end{pmatrix} = \begin{pmatrix} A & B \\ C & D \end{pmatrix} \begin{pmatrix} r_{i} \\ \theta_{i} \end{pmatrix}$$

If I want to calculate the beam width $\omega$ of a Gaussian beam I can describe it as the complex beam parameter

$$\frac{1}{q} = \frac{1}{R} - \frac{i \lambda_{0}}{\pi n \omega^{2}}$$

In theory, I should be able to multiply the transfer matrix with $q_{i}$ and get the resulting $q_{o}$, which I can then split into real and imaginary parts to get $\omega$. However, I don't see any reference to the offset $r_{i}$ in $q$ - does this mean that I can only calculate the beam width if the beam passes through the optical axis of the elements? Or am I missing some component of $q$ that refers to the possibility of the beam being off-axis?

Edit: This is the kind of optical system I am talking about. $q$ is a parameter which describes the distribution of a Gaussian beam with respect to the optical axis. You can think of the $q$ parameter as a bundle (a 'pencil' in Born & Wolf parlance) of optical rays, each described by its own position $r_i$ and slope $\theta_i$. So, using the transformation on the $q$ parameter that you describe is all you need to do to understand how the beam transforms in an aligned optical system where the optical axis coincides with the centers of lenses, mirrors, etc.

I suspect that what you want to do is to simultaneously track the Gaussian beam evolution as well as the location of the misaligned optical axis. To do so, all of the information is indeed contained in the ray matrices but not exactly in the form you need it to be since the matrices have no inputs for the misalignment of each element. The most common way to modify them is to use 4x4 matrices with extra elements for the misalignment. A discussion of how to do so is too long for this format, but I discussed the topic in Section 2.3 of my thesis (4.3 MB pdf). The discussion in that section comes almost entirely from Wang Shaomin's review article "Matrix methods in treating misaligned optical systems" (behind a paywall). If you use Mathematica, I already have many of the ray matrices (2x2 and 4x4) coded in the GaussianBeams.m package available on github.

• By optical axis, do you mean the axis of the incoming ray or the axis through the center of the optical elements (see added image)? – ChrisF Jun 20 '15 at 12:09
• @ChrisF The optical axis is the ray in the center of the Gaussian beam. I'll try to add an example calculation for your diagram, but it probably won't be until after the weekend now.u – Chris Mueller Jun 20 '15 at 13:18
• I think I understand the misalignment now, however I'm still not sure about calculating the q parameter with misaligned matrices. Is it just equivalent to the aligned 2x2 matrix, in that $(q_{2},1,1,1)^T = k*(ABCD_{4x4})(q_{1},1,1,1)^T$ ? Can the QProp function in line 74 in your package also be used for 4x4 matrices? If so, how to describe a,b,c,d? (I don't use Mathematica myself, so I may not completely have understood it) – ChrisF Jun 28 '15 at 9:31
• @ChrisMueller could you re-upload the Mathematica file (or post the code here)? The link isn't working anymore. Thanks a lot! – riddleculous Feb 7 '17 at 14:06
• @riddleculous I've updated the link to point to a github repository that contains the Mathematica package. I also updated the link to my thesis. – Chris Mueller Feb 7 '17 at 15:45

Just to wrap this up:

I decided to use Tovar and Casperson' approach (Link 1,Link 2) using a 3x3 matrix, since I wasn't sure about the q-parameter in Shaomin's 4x4. It boils down to that as with the non-misaligned ray transfer matrix,

$$q_o = \frac{Aq_i + B}{Cq_i + D}$$

with the 3x3 beam matrix

\begin{pmatrix} A & B & 0 \\ C & D & 0 \\ G & H & 1 \end{pmatrix}

It's probably similar for Shaomin. Thanks for pointing me in the right direction, Chris Mueller.