# How to use a Right Bracket for Several Numbered Equations?

I have a list of equations in the array or align environment. My goal is to wrap a number of them with a right bracket and have an expression to the right of the bracket, and preserve the equation number on the right side of the page. Yow can see an example below. My current issues are:

1. I cannot control the alignment of the equations with the bracket. I would like these equations to begin at the same point.

2. The numbering of the equations with the bracket is lost.

Here is how I want my equations to look:

\begin{alignat}{3}
\text{min}  \quad z   & & \text{[Optimization Problem]}\nonumber \\
&\text{s.t. }  \\
& f_a(x)=1 & \forall a \in A\\
&\left .
\begin{array}{cc}
&f_b(x)=1+2+3\\
&g_b(x)=1\\
\end{array}
\right \}&\forall b\in B
\end{alignat}

• Welcome to TeX.SE! Can you show with some hand written equation, how you like to have aligned your equations? Commented Nov 24, 2016 at 21:10
• Your code shows a right bracket. Commented Nov 24, 2016 at 21:29
• Thank you, I have been reading for a while but have not had the need to ask or the knowledge to answer until now. I updated a picture of how I would like my equations to look like. Commented Nov 24, 2016 at 21:33
• You might see if any of the solutions to this question can be adapted to a right bracket (the cases environment is similar to yours but with a left bracket).
– Emma
Commented Nov 24, 2016 at 22:17

I made a solution where the brace is done with the bigdelim package. Therefore I need to put the top equation of the braced set to be in an array.

\usepackage{bigdelim}

\begin{alignat}{2}
\text{min}  \quad z   & & & \text{[Optimization Problem]}\nonumber \\
&\text{s.t. }  \nonumber \\
& f_a(x)=1 & & \forall a \in A \\
&
\begin{array}{@{}lc}
f_b(x)=1+2+3 & \rdelim\}{2}{2mm}\\
\end{array} & \\
& g_b(x)=1
& & \raisebox{.5\baselineskip}[0pt]{$\forall b\in B$}
\end{alignat}


• I am having trouble running this solutions. It returns the error undefined control sequence. I made sure I added \usepackage{bigdelim}, but it does not work. Commented Nov 25, 2016 at 18:33

You can move the bracket and domain for the lower two equations into position:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{alignat}{3}
\text{min $z$} & \qquad\rlap{[Optimization Problem]} \nonumber \\
f_a(x) &= 1 & \forall a \in A \\
f_b(x) &= 1 + 2 + 3
\raisebox{-.5\baselineskip}[0pt][0pt]{$\left.\kern-\nulldelimiterspace \begin{array}{ @{} c } \mathstrut \\ \mathstrut \end{array} \right\}$} \\
g_b(x) &= 1 &
\hspace{4em} % To move content left/right
\raisebox{.5\baselineskip}[0pt][0pt]{$\forall b \in B$}
\end{alignat}

\end{document}

• Thank you! I have a couple of questions: How can I extend the bracket so that it covers more equations? Also, if one of the equations is longer, e.g. f_b(x)=1+2+3+4+5, it overlaps with the brackets. How can I prevent this from happening? Commented Nov 24, 2016 at 21:56
• @SeptimusG: I keep the brace and domain around the middle of the construction and move it just up/down in the same manner as I did above. You'll use more \mathstruts if there are more equations to cover. I use two because you're bracing two equations.
– Werner
Commented Nov 24, 2016 at 22:22

I propose this, based on alignat and rcases from  mathtools:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}%

\begin{document}

\begin{alignat}{2}
\min z & & & \tag*{\small[Optimization Problem]} \\
\text{s.t. }\raisebox{0pt}[0pt][0pt]{\rule[-2.5\baselineskip]{0.5pt}{3\baselineskip}}\; & f_a(x)=1 & & ∀ a ∈ A \\
& \negmedspace \begin{rcases}f_b(x)=1+2+3\\[2.5pt]%
g_b(x)=1
\end{rcases}
&\quad & ∀ b ∈ B
\end{alignat}

\end{document}


• This is quite nice but it does not number the equations in the bracket separately. Commented Nov 24, 2016 at 22:43
• Oh! I didn't notice this point. Do you want them to be numbered (2) (3) or (2a) (2b)? Commented Nov 24, 2016 at 22:49
• Either way is fine :) Commented Nov 24, 2016 at 22:53

Refer to a simple solution given by Stefan Kottowitz at https://latex.org/forum/viewtopic.php?t=30012 which I have reproduced below

\documentclass{article}
\usepackage{empheq}

\begin{document}

\begin{empheq}[right=\empheqrbrace]{align}
2x+y    &=  1 \\
8x*y    &= 12 \\
12x/c^2 &= 10
\end{empheq}

\end{document}
`
• Welcome to TeX.SE! The brackets should be only on the last two equations. Commented Jul 10, 2020 at 5:51