LaTeX equation cases (left and right braces)

\[
x = \begin{cases}
1 \\
2 \\
3
\end{cases}
\]

\[ x = \begin{cases} 1 \\ 2 \\ 3 \end{cases} \]

Conditions

\[
y = \begin{cases}
3 & (x = 1) \\
4 & (x < 4)
\end{cases}
\]

\[ y = \begin{cases} 3 & (x = 1) \\ 4 & (x < 4) \end{cases} \]

Fraction

\[
x = \begin{cases}
\frac{1}{2} \\
\frac{1}{3}
\end{cases}
\]

\[ x = \begin{cases} \frac{1}{2} \\ \frac{1}{3} \end{cases} \]

The command \frac writes a small fraction in the cases environment. The dfrac outputs the display style fraction as follows.

\[
x = \begin{cases}
\dfrac{1}{2} \\
\dfrac{1}{3}
\end{cases}
\]

\[ x = \begin{cases} \dfrac{1}{2} \\ \dfrac{1}{3} \end{cases} \]

The aligned environment increases the spacing between vertical fractions.

\[
x = \begin{cases}
\begin{aligned}
\dfrac{1}{2} \\
\dfrac{1}{3}
\end{aligned}
\end{cases}
\]

\[ x = \begin{cases} \begin{aligned} \dfrac{1}{2} \\ \dfrac{1}{3} \end{aligned} \end{cases} \]

\[
x = \begin{cases}
\begin{aligned}
\dfrac{1}{2} \\[3em]
\dfrac{1}{3}
\end{aligned}
\end{cases}
\]

\[ x = \begin{cases} \begin{aligned} \dfrac{1}{2} \\[3em] \dfrac{1}{3} \end{aligned} \end{cases} \]

Right brace

\[
\begin{rcases}
4 & (x=2) \\
9 & (x=3)
\end{rcases} = y
\]

\[ \begin{rcases} 4 & (x=2) \\ 9 & (x=3) \end{rcases} = y \]

LaTeX equation

LaTeX