[Tex/LaTex] How to put a curly brace in the right of three lines within an align-environment

alignbraces

I have a question concerning how to add a curly brace at the right side of three lines in an align-environment. The following is an example of what I'm speaking about:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,amsthm, amsfonts,amssymb, enumerate}

\begin{document}
\begin{align}
&\rlap{\textbf{Optimization model}}
\nonumber \\
&                  && z=\sum_{i\in I} x_i\cdot y_i \cdot z_i \rightarrow \max
\nonumber \\
&\text{s.t.} && x_i \le b_i, 
             &  i\in I, \\
&            && x_i \le y_i,
             &  i \in I,  \\
&            && y_i \le z_i,
             &  i\in I,  \\
&            && z_i \le x_i,
             & i\in I, \\
&            && x_i, y_i, z_i \in \mathbb{R}_{+},
             & i\in I. 
\end{align}
\end{document}

There are five lines of constraints (after the "s.t."). I would like to make a curly brace over the first parts of the second, third and fourth line (i.e. over x_i \le y_i, y_i \le z_i and z_i \le x_i) and write a single "i \in I" in the right of this brace. I hope it was possible to understand it.

Can you please tell my how to achieve this? (The general style of this align-environment should not be changed.)

PS: Here is a picture of how it should look like:
curly brace in the right of the first parts of lines 2 up to 4

Best Answer

With help of mathtools package you can use rcases environment.:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,amsthm, amsfonts,amssymb}
\usepackage{mathtools}% <-- new package for rcases

% for show just the equation ...
\usepackage[active,displaymath,tightpage]{preview}
    \setlength\PreviewBorder{1em}


\begin{document}
\begin{align}
&\rlap{\textbf{Optimization model}}
\nonumber \\
&                  && z=\sum_{i\in I} x_i\cdot y_i \cdot z_i \rightarrow \max
\nonumber \\
&\text{s.t.} && x_i \le b_i,                        &  i\in I, \\
&            && %\!\!% first approximation of  misalignment compensation ...
                \negthickspace% for compensation of rcases misalignment
                \begin{rcases}  
                x_i    \le y_i \\
                y_i    \le z_i \\
                z_i    \le x_i
                    \end{rcases}                    & i\in I, \\
&            && x_i, y_i, z_i \in \mathbb{R}_{+},   & i\in I.
\end{align}
\end{document}

Hope that this is what you like to achieve. enter image description here

Edit: Better alignment is achieved if you instead of \!\! you use \negthickspace. It is approximately \mkern-5mu as suggest Bernard in his answer. The picture is replaced with new, where this \negthickspace is used. Use of alignat instead of align is probably more correct selection, but final result is the same.

Related Question