Conditional equations with with one curly bracket in LaTex?

This seems to work fine:

\documentclass{article}
\usepackage{amssymb,mathtools}
\begin{document}
\begin{equation}
  \mathcal{L} =
  \begin{cases}
    1 & \text{if $i = j$ and $deg_j \neq 0 $} \\
    -\frac{1}{\sqrt{deg_i deg_j}} & \text{if $(i, j) \in E$} \\
    0 & \text{otherwise}
  \end{cases}
\end{equation}
\end{document}

cases


I suggest you use a dcases* environment (provided by the mathtools package, a superset of the amsmath package) for the job at hand. This environment differs from the cases environment in two important ways: (i) the math part (before the & separator) will be typeset in display-style math, and (ii) there's no need to wrap the text-material (after the & symbol) in \text macros.

enter image description here

\documentclass{article}
\usepackage{mathtools} % for "dcases*" environment
\begin{document}
\[
\widehat{L}(u,v) = 
\begin{dcases*}
   1                         & if $u=v$ and $d_v\ne 0$ \\
   -\frac{1}{\sqrt{d_u d_v}} & if $(u,v)\in E$ \\
   0                         & otherwise
\end{dcases*}
\]
\end{document}