I have the following piece of latex code
\begin{equation*}
G(z,w) =
\begin{cases*}
\frac{\rho (g_{\bar{\lambda}}(z),g_{\bar{\lambda}}(w))}{\rho (z,w)} & for z \neq w \\
|f'|_{\rho} & for z = w
\end{cases*}
\end{equation*}
and i keep getting missing $ and missing } errors. From what I've read most commonly these are caused by putting $ inside the equation environment (which is redundant) or leaving an empty line inside mat mode. As far as I can tell I'm not doing either, and I can't figure out what is wrong with this formula. Thanks in advance.


cases*environment instead of acasesenvironment? – Mico May 19 '20 at 13:44\text{for }to avoid "for" being in math mode. – Teepeemm May 20 '20 at 01:19