How to write this math term?

Since the other cases questions ask some specific questions about it, here's a working example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
g(n) = 
\begin{cases}
\frac{2}{3}n & \text{wenn } n \equiv 0 \mod 3,\\
\frac{4}{3}n + \frac{1}{3} & \text{wenn } n \equiv 1 \mod 3,\\
\frac{4}{3}n - \frac{1}{3} & \text{wenn } n \equiv 2 \mod 3.
\end{cases}
\]
\end{document}

The mathmode documentation is extremely helpful for answering these sorts of questions. You can find it on your system using texdoc or its equivalent.


\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
  g(n) = \begin{cases}
    \frac{2}{3} n &\ text{wenn } n \equiv 0 \mod 3 \\
    \frac{4}{3} n - \frac{1}{3} & \text{ wenn } n \equiv 1 \mod 3 \\
    \frac{4}{3} n + \frac{1}{3} & \text{ wenn } n \equiv 2 \mod 3
  \end{cases}
\end{equation*}

\begin{equation*}
  \def\arraystretch{1.3}%
  g(n) = \left\{\begin{array}{llll}
    \frac{2}{3} n & \text{wenn} & n \equiv 0 & \mod 3 \\
    \frac{4}{3} n - \frac{1}{3} & \text{wenn} & n \equiv 1 & \mod 3 \\
    \frac{4}{3} n + \frac{1}{3} & \text{wenn} & n \equiv 2 & \mod 3
  \end{array}\right.
\end{equation*}

\end{document}

Tags:

Math Mode