# Line up equations

I want to line up my two equations by the two first equal signals so I wrote this

\begin{align}
\left\
\begin{matrix}
\Delta l &= \Delta l_1 + \Delta l_2\\
N &= N_1(\Delta l_1)=N_2(\Delta_2)\\
\end{matrix}\right.
\end{align}


But I'm getting this:

• Welcome to TeX.SE. While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that reproduces the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. – Peter Grill Oct 28 '14 at 2:31

## 4 Answers

You need to use an inner math environment along with cases

In this case you don't really need to use align and simply equation would yield identical results as above

## Notes:

• As what you have clearly is not a matrix you should not use the matrix environment.

## Code: align

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{align}
\begin{cases}
\begin{aligned}
\Delta l &= \Delta l_1 + \Delta l_2\\
N &= N_1(\Delta l_1)=N_2(\Delta_2)\\
\end{aligned}
\end{cases}
\end{align}
\end{document}


## Code: equation:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{cases} \begin{aligned} \Delta l &= \Delta l_1 + \Delta l_2\\ N &= N_1(\Delta l_1)=N_2(\Delta_2)\\ \end{aligned} \end{cases}
\end{document}

• What's the reason for the aligned environment inside the cases environment? – Bernard Oct 28 '14 at 14:15
• @Bernard -- the question asked for the two equals signs to be aligned. cases doesn't ordinarily do that; it aligns the lines at the beginning. – barbara beeton Oct 28 '14 at 15:23

If you like matrix-like tools, maybe array will be suitable for you.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$\left\{ \begin{array}{@{}r@{\;=\;}l} \Delta l & \Delta l_1 + \Delta l_2\\ N & N_1(\Delta l_1)=N_2(\Delta_2)\\ \end{array} \right.$

\end{document}


@ kills \arraycolsep, adding its argument instead.

I have another idea, maybe split will be suitable for you.

 \documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\left\{ \begin{split} \Delta l &= \Delta l_1 + \Delta l_2\\ N &= N_1(\Delta l_1)=N_2(\Delta_2)\\ \end{split}\right.$$
\end{document}


One can have a slightly simpler syntax with the empheq package (which loads mmathtools, hence amsmath):

\documentclass{article}
\usepackage[overload]{empheq}

\begin{document}

[left=\empheqlbrace] \!\begin{aligned} Δ l &= Δ l_1 + Δ l_2\\ N &= N_1(Δ l_1)=N_2(Δ_2) \end{aligned}

\end{document}


• Why empheq? Just \left\{\begin{aligned}...\end{aligned}\right. is sufficient. – egreg Oct 28 '14 at 18:59
• @egreg: I think that it's more expressive and (slightly) simpler to use the optional argument to the equation environment, that's why. – Bernard Oct 28 '14 at 19:08