I am trying to use the cases environment but I get the message, missing $ inserted.
\begin{cases}
deg(u_i) \textrm{ if u_i on primary diagonal} \\
-1 & \textrm{ if u_i u_j adjacent} \\
0 & \textrm{otherwise}
\end{cases}
Is the use of subscript, the problem? Any solutions?
u_i
inside a\textrm
argument, which nullifies the math mode.