Below is the graph of y = a tan bx for some positive constants a and b. Find ab.
The graph has period \(\frac{2 \pi}{3}.\) The period of y = a tan bx is \(\frac{\pi}{b},\) so \(b = \frac{3}{2}.\) The graph is then of the form \(y = a \tan \left( \frac{3x}{2} \right).\)
Since the graph passes through \(\left( \frac{\pi}{6}, 2 \right)\), \(2 = a \tan \frac{\pi}{4} = a.\)Therefore, \(ab = 2 \cdot \frac{3}{2} = \boxed{3}.\)