2

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: enter image description here

  • 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

You need to use an inner math environment along with cases

enter image description here

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{equation}
    \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{equation}
\end{document}
| improve this answer | |
  • What's the reason for the aligned environment inside the cases environment? – Bernard Oct 28 '14 at 14:15
  • 1
    @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
2

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}

enter image description here

@ kills \arraycolsep, adding its argument instead.

| improve this answer | |
2

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

 \documentclass{article}
 \usepackage{amsmath}
 \begin{document}
 \begin{equation}
 \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{equation}
 \end{document}
| improve this answer | |
1

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

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

\begin{document}

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

\end{document} 

enter image description here

| improve this answer | |
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.