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.

 A: $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.
A: 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. 
