4

I am trying to put an array inside a single left curly bracket

I can make it work when it is closed by a right curly bracket like so

\begingroup\Large
\begin{equation*}
y_{GxBxP|G[i,j,k|i]} = \left\{ 
\begin{array}{l} 1\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (0.0, 0.1)\\
                 2\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (0.1, 0.2)\\
                 3\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (0.2, 0.3)\\ 
                 \cdots\\
                 99\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (9.8, 9.9)\\
                 100\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (9.9, 10.0)\\
                 \end{array} \right\}
\end{equation*}
\endgroup

But when try to remove the closing curly bracket it doesn't work

\begingroup\Large
\begin{equation*}
y_{GxBxP|G[i,j,k|i]} = \left\{ 
\begin{array}{l} 1\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (0.0, 0.1)\\
                 2\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (0.1, 0.2)\\
                 3\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (0.2, 0.3)\\ 
                 \cdots\\
                 99\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (9.8, 9.9)\\
                 100\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (9.9, 10.0)\\
                 \end{array} 
\end{equation*}
\endgroup

What am I doing wrong?

4

Each \left requires an accompanying \right, so you can't just remove it in hopes that it goes away. This is because the \left...\right construct is used to scale the (extensible) delimiters based on the contents within it. So, one without the other doesn't provide the delimiting range within which to scale.

So, what do you do if you don't want an opening or closing delimiter? Use \left. or \right.. Note that this inserts a small space (\nulldelimiterspace).

With that in mind, you're probably looking for

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\[
  y_{GxBxP|G[i,j,k|i]} = \left\{ 
    \begin{array}{l}
        1\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (0.0, 0.1)  \\
        2\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (0.1, 0.2)  \\
        3\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (0.2, 0.3)  \\ 
        \vdots                                              \\
       99\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (9.8, 9.9)  \\
      100\ \text{if} \ z_{GxBxP|G[i,j,k|i]} \in (9.9, 10.0)
    \end{array}
  \right.
\]

\end{document}

Although, cases already provides what you're looking for here:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\[
  y_{GxBxP|G[i,j,k|i]} = \begin{cases}
      1      & \text{if } z_{GxBxP|G[i,j,k|i]} \in (0.0, 0.1)  \\
      2      & \text{if } z_{GxBxP|G[i,j,k|i]} \in (0.1, 0.2)  \\
      3      & \text{if } z_{GxBxP|G[i,j,k|i]} \in (0.2, 0.3)  \\ 
      \vdots &                                              \\
     99      & \text{if } z_{GxBxP|G[i,j,k|i]} \in (9.8, 9.9)  \\
    100      & \text{if } z_{GxBxP|G[i,j,k|i]} \in (9.9, 10.0)
  \end{cases}
\]

\end{document}

Here's another option with some eqparbox alignment for the LHS of each condition:

enter image description here

\documentclass{article}

\usepackage{amsmath,eqparbox}

\begin{document}

\[
  y_{GxBxP|G[i,j,k|i]} = \begin{cases}
    \eqmakebox[LHS][r]{  1}    & \text{if } z_{GxBxP|G[i,j,k|i]} \in (0.0, 0.1)  \\
    \eqmakebox[LHS][r]{  2}    & \text{if } z_{GxBxP|G[i,j,k|i]} \in (0.1, 0.2)  \\
    \eqmakebox[LHS][r]{  3}    & \text{if } z_{GxBxP|G[i,j,k|i]} \in (0.2, 0.3)  \\ 
    \eqmakebox[LHS][r]{\vdots} &                                                 \\
    \eqmakebox[LHS][r]{ 99}    & \text{if } z_{GxBxP|G[i,j,k|i]} \in (9.8, 9.9)  \\
    \eqmakebox[LHS][r]{100}    & \text{if } z_{GxBxP|G[i,j,k|i]} \in (9.9, 10.0)
  \end{cases}
\]

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.