# Bracketing equations across multiple lines

I'm sure this one is a hoary old chestnut that's been answered before, but i can't find that answer....I have set of equations (schematically) displayed thus, using amsmath:

\begin{align*}
a &= x1  &y &=1,\\
&= x2  &  &=2,\\
&= x3  &  &=3.
\end{align*}


What I want to do is put the second 'column' of equations (the "y=" results) inside a single set of brackets that spans all three rows. Just can't see how...?

A short solution with the [left=.., right=..] keys of empheq:

\documentclass{article}
\usepackage{empheq} %% loads mathtools, hence amsmath

\begin{document}

\begin{empheq}[left ={\begin{aligned}
a &= x1 \\ &= x2 \\ &= x3
\begin{aligned}
y &=1,\\
&=2,\\
&=3.
\end{aligned}
\end{empheq}

\end{document}


Something like this?

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
\left.
\begin{aligned}
a   &=  x_1 \\
&=  x_2 \\
&=  x_3
\end{aligned}
\right\}
\left\{
\begin{aligned}
y   &=  1 \\
&=  2 \\
&=  3
\end{aligned}
\right\}
\end{equation*}

\end{document}


EDIT

Here are some other approaches to this. The second one needs \usepackage{blkarray} in your preamble

\begin{equation*}
\left.
\begin{array}{r}
a   =   x_1 \\
=   x_2 \\
=   x_3
\end{array}
\right\}
\left\{
\begin{array}{r}
y   =  1 \\
=  2 \\
=  3
\end{array}
\right\}
\end{equation*}

\bigskip

\begin{center}
\begin{blockarray}{r\}c\{r\}}
$a = x_1$ & \quad & $y = 1$ \\
$= x_2$ & \quad & $= 2$ \\
$= x_3$ & \quad & $= 3$
\end{blockarray}

• Just the job - similar to tomacs' solution, thanks – ionh Nov 30 '17 at 18:15
• @ionh Well I am glad to help, if this answer solved your problem please mark it as accepted by clicking the check mark next to the answer. see: How does accepting an answer work? for more information. – Cragfelt Nov 30 '17 at 18:18
• @ionh Btw, first Tomacs' answer was different than mine. I posted mine and then he edited his. – Cragfelt Nov 30 '17 at 18:24
• Sorry Cragfelt! I was editing my answer, while you posted your one. – user91669 Nov 30 '17 at 18:36

Try this:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\left.
\begin{aligned}
a &= x1  &&&y &=1,\\
&= x2  &&&  &=2,\\
&= x3  &&&  &=3.
\end{aligned}
\right\}
\end{equation*}
\end{document}


Maybe this:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\begin{aligned}
a &= x1\\
&= x2\\
&= x3
\end{aligned}