Optical Impedance Matching Suppose you want to match optical impedances between a region of refractive index $n_1$ and a region of index $n_2$ and you want to expend a total distance $L$ in the impedance matching transition region. What is the optimum $z$ dependence of the index n between the two regions? Is it exponential? Why not?
What exactly is optical impedance matching and how do I solve this problem? 
 A: Optical impedance matching means furnishing a smooth transition between two materials with different indices of refraction. A smooth transition minimizes light losses by reflection at the interface. One way to do this is by providing thin, stacked layers of material at the interface where the differences between the refractive indices of any two adjacent layers in the stack is small relative to the difference between the two materials. 
Sometimes a single layer is sufficient to significantly improve the optical performance of a lens assembly; the materials used are called optical coatings and they are commonly used in camera and binocular lenses- where they give a bluish or golden tint to the appearance of the lenses. 
A: The goal of optical impedance matching is to maximize the transmittance at the boundary between $n_1$ and $n_2$. Or equivalently, to minimize the reflectance.
As shown here, the reflectance is given by 
$$R = \left(\frac{n_1-n_2}{n_1+n_2}\right)^2$$
You can make the reflectance smaller by putting a layer in between with index $n_3$, where $n_1 < n_3 < n_2$. You can calculate the reflectivity at each boundary as above. As shown here assuming no interference, the total reflectance is 
$$R = \frac{(1-R_3^2)R_2}{1-R_3R_2}$$
The most important case is for air, where $n_1 = 1$. For this case, you get $R = 0$ when $n_3 = \sqrt{n_2}$.
You can repeat the calculation with 2 layers. You find the minimum reflectance occurs when the indices are more or less in equal steps from $n_1$ to $n_2$.
You can try 3 or or 4 layers, or as many as you like. Each time you add a layer, 
the reflectance gets smaller, and the best solution makes equal steps. As the number of layers $\rightarrow \infty$, $R \rightarrow0$. 
The thickness of the layers does not enter into this analysis. It would have if we had considered interference. The reason we do not is that in the limit, there are no reflections, and hence no interference. 
This implies the z dependence of index does not matter so long as the dependence is continuous and smooth. However, I haven't been rigorous about it. You can see this isn't a complete analysis if you make L short. In the limit, you recover the original case where there is no impedance matching. 
So I will wave my hands a little harder. Abrupt change to n causes reflections. Smooth uniform changes minimizes reflectance. So make the z dependence linear from $n_1$ to $n_2$.

Edit - Fixed a mistake and added comments below about how it is really done. 
Real impedance matching is done with a finite number of layers, often just 1, as niels nielsen explained. That layer is thin to take advantage of interference. This is called an anti-reflection coating. 
By far the most common situation is the boundary between air and the glass of a lens. You cannot choose the index of refraction you want for the intermediate layer. Instead, you can choose the material with the index closest to the desired value. This makes the intensities of the light reflected from each boundary as close as possible to equal. In this case, $n_1 = 1$, and the desired $n_3 = \sqrt{n_2}$.
Light reflected from the lens travels the same path as light reflected from the coating, except that it has gone through the coating twice. You choose the thickness of the coating so the extra distance is $\lambda/2$, where $\lambda$ is the wavelength of light in the coating. This makes the two reflections interfere destructively and cancel. So $L = \lambda/{4n_3}$.
Visible light has a range of wavelengths from red to blue. Coatings are designed to cancel green in the middle best. So the reflection has some red and blue. This is the reason for the color of the coating. 
Sometimes 2 layers are used so you can find a solution that gives good cancellation for red and blue. This does a pretty good job for green as well.  
A thicker layer of a hard material can be added on top to protect the anti-reflection layer. 
The thickness of the layers is chosen so for light perpendicular to the lens. If light comes at an angle, it travels a longer path. This makes cancellation work best at a longer wavelength. The colors in the reflected light become more blue and green, and less red. 
