The q parameter that we just discussed is a very powerful calculational technique that can describe a Gaussian beam going into a system. You can run it through a set of abcd matrices or while you're tracing, or whatever you like, and know what Gaussian beam came out. So when you go to design a fiber coupler or a laser cavity or something like that, that's probably the technique to use. However, this is actually my favorite technique. It's sort of equivalent and it's much more akin to the graphical retracing we started with in course one. So when I'm sketching on the back of a napkin to design a system of Gaussian beams or understand one, this is the technique I'd use. It's actually deeply mathematical and there's some classic papers which I referenced down here at the corner on this. And it's been used to write some optical modeling and design tools, somewhat equivalent to OpticStudio, where instead of really shooting rays through systems, you shoot Gaussian beams. And that has some advantages, because defraction and things are sort of inherently built in. There's a code called Fred, which some older optical designers will swear by. So I'm going to give you the mathematical basis. It's not critical that you understand and keep all of this, but it's good to know. And then we're going to see two just beautifully simple expressions drop out that allow us to do graphical ray tracing of Gaussian beams. And that's worth knowing because it's cool. So the basic idea is let's say we have a Gaussian beam and we're going to go through a single lens, nice simple system like we might have started out with in our last course. We're going to define three rays that are going to turn out, strangely, to capture all of the behavior of the Gaussian beam. The first, we'll call the Chief ray, this is a ray we're going to hear a lot about as we go deeper into this course, and it simply runs straight down the axis, the Gaussian beam. For Gaussian beam, it's on the axis with its ray parallel to the axis, or its angle parallel to axis. This simply is the optical axis. But if we tilted the beam, the Chief ray would go off and keep track of where the center of the beam is. So, for most of the time, we can ignore that, because a lot of the times we have our Gaussian beams on axis. Then, the two interesting rays. One we're going to call the Waist ray, which I'm going to symbolize by omega, because that's Greek w. And a course is launched at w 0, at the ray waist direction, and it's parallel to the Chief, right? It's parallel to where the beam is pointing, and it expresses how big is my bundle of light, my Gaussian beam. The other is the Divergence ray. It's launched from the origin at that divergence angle, theta. Remember, you can't choose these two independently. They have to be related by the Gaussian beam expression, which has got really only one extra parameter in there, which is the local wavelength. So you have to do these right. You can't just specify an arbitrary Divergence ray, because it would give you a Gaussian beam that's not physical. And there's something very fundamental here. That there's these two rays. One that expresses how big the beam is, omega. And this Divergence ray, delta for divergence, that expresses how much it's diverging. And the fact that those two are related. This is a concept we're going to be coming back to as well. So now we just trace those two rays through the system. So if for example, I remember my graphical ray tracing, this Waist ray that's parallel to the axis goes through the axis back here at the back focal point. And my Divergence ray goes wherever it goes, but it will go to the image point of this first plane out here, right? So it will re-intersect the axis on what would be the poraxial image plane, so those two rays are easy to trace. So the formal mathematics that's used and it turns out it relates back to q. So that gives us a feeling that this is a real bit of Maxwell's equations now, is to define a complex ray, and the real part is whatever the height of the Divergence ray is, here. Sorry, the height of the Divergence ray here. That height is formally measured relative to the Chief ray in the case that the beam is going down the axis that's just the height line. And then the imaginary part is always straight. That doesn't seem like an unreasonable mathematical thing to do to keep track of these two quantities. It turns out that just a little bit of math that that complex ray relates very directly to Q. And that tells you that somehow if you were to trace these two rays or if you'd like, this complex ray through the system, you've somehow captured Q and from that, you've captured the whole Gaussian beam. And if you wanted to go off and write one of these Gaussian beam-based ray tracers I've just completely condensed all the math, but that's the fundamental idea. As you trace these two rays, you put them together in this funny way and that gives you Q and Q gives you the Gaussian beam. What I'm more interested in and what I think is super exciting is, turns out once you have Q, you can from that, go get the expressions from locally. What is the divergence of my beam? That, of course, doesn't change very often, it only changes when I go across the lens and what's the waist size of my Gaussian beam? That, of course, changes dramatically as I move through space. And what you find is, is that this is the y and u, the height and angle of these two rays, delta and omega. You find that the local Gaussian beam divergence and the local Gaussian beam radius are given this by the square root of a sum of the squares of the heights and angles of these two rays. And that is really cool. It means that, and I've kind of shown this here, that if I'd like to know the local waist of my Gaussian beam, w(z), I just take the height of these two rays and take the square root of the sum of the squares. So for example right here at the origin, the height of the Divergence ray is zero and so my beam waist must be, my local beam radius must be at the waist. Check, that's easy. As I go towards this lens, notice that the divergence ray is increasing. And if I take the square root of the sum of the squares, that tells me how the local w(z), the local Gaussian beam radius increases. If for example, now imagine this lens wasn't here, and so I keep going with these two rays. Eventually, the Waist ray, which stays parallel to the origin, is much, much smaller than the Divergence ray, which keeps getting bigger. And that means my w(z) asymptotically converges to the Divergence ray, which is just what it should do. That makes sense. If I put a lens in place instead, so now that my Waist ray bends down through the origin and my Divergence ray comes over here to the image plane, I just take everywhere and take the absolute magnitude squared about these two quantities. And that allows me to trace out this w(z), the local Gaussian beam radius. Notice something super important. Right here at the focal plane, where the Waist ray on the right hand side of the lens has gone to zero, its height has gone to zero, that means that the local Gaussian beam radius must touch the Divergence ray. That's not where the Gaussian beams minimum, the new waist occurs. It occurs a little further down, a little further to the right. And is a matter of fact, you can figure out that the place that this quantity is minimum, that would be where the waist of the Gaussian beam is over here. Is actually where the two rays, the Divergence ray height and the Waist ray height are equal. And that occurs here-ish or so, equal in amplitude. And this is a super important concept, it tells you that the waists of a Gaussian beam, in this case, are occurring neither at the back focal plane, or at the paraxial image plane, but instead somewhere in between. And that's another good example of how these Gaussian beams do not obey the simple paraxial ray equations. And that we'd screw up if you thought I've got a Gaussian beam over here, it must have its waist at the image plane, you're wrong. And that's why this is important.