# Horizontal alignment across nested aligned

Is there a way to left align the first 2 rows with the last one?

\documentclass{article}
\usepackage{amsmath}
\begin{equation*}
\left\{{\begin{aligned}
&\left.{\begin{aligned}
&A+B=X\\
&B+C=Y\end{aligned}}\right\}2A+B+C=X+Z\\
&C+A=Z
\end{aligned}}\right.
\end{equation*}
\end{document}


\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\left.\smash{\raisebox{-.7\baselineskip}{\left\{\begin{aligned} A+B&=X\\ B+C&=Y\\ C+A&=Z \end{aligned}\right.}}
\rule{0pt}{1.3\baselineskip}
\right\}
2A+B+C=X+Z
\end{equation*}
\end{document}

• I see @egreg beat me to it, this has a bit more handwork getting the vertical spacing right but has full alignment on the three = rather than relying on A B and C being similar width. – David Carlisle May 17 '13 at 22:04

There are three spaces you don't take into account.

1. A \left...\right construction has a thin space before and after it;
2. An empty delimiter produces a space as wide as \nulldelimiterspace;
3. aligned has a thin space before it (see Why is there a \, space at the beginning of the "aligned" environment?).

Here's how remove those spaces:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\setlength{\nulldelimiterspace}{0pt} % locally set the added space to zero
\left\{\begin{aligned}
&\!\left.\!\begin{aligned}
&A+B=X\\
&B+C=Y\end{aligned}\right\}2A+B+C=X+Z\\
&C+A=Z
\end{aligned}\right.\!
\end{equation*}
\end{document}