190

What I have are two equations with align and I want one single equation number to refer to this system of equations. To illustrate, I have

\begin{align}
  dr_t &= \kappa ( \theta - r_t ) dt + \sigma_r r^{\xi} dW_t \\
  dA_t &= \mu A_t dt + \sigma_A^{\alpha} dZ_t,
\end{align}

1 and I want neither

\begin{align}
  dr_t &= \kappa ( \theta - r_t ) dt + \sigma_r r^{\xi} dW_t \nonumber \\
  dA_t &= \mu A_t dt + \sigma_A^{\alpha} dZ_t,
\end{align}

enter image description here nor

\begin{align}
  dr_t &= \kappa ( \theta - r_t ) dt + \sigma_r r^{\xi} dW_t \\
  dA_t &= \mu A_t dt + \sigma_A^{\alpha} dZ_t, \nonumber
\end{align}

enter image description here

but having a single number in the middle. I know this can be achieved by nesting an array inside of an equation but then some symbols (sums, etc.) look differently and I thought there had to be a better way of doing this.

4 Answers 4

216

Use aligned instead.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{aligned}
  dr_t &= \kappa ( \theta - r_t ) dt + \sigma_r r^{\xi} dW_t \\
  dA_t &= \mu A_t dt + \sigma_A^{\alpha} dZ_t, 
\end{aligned}
\end{equation}
\end{document}

enter image description here

3
  • @TH. I have a question: Is it possible to place text between these two equations?
    – user124471
    Sep 11, 2014 at 8:34
  • @TH. @Paul Koer You need \\ after dW_t, otherwise both equations will be concatenated in the same line
    – DavidC.
    Mar 17, 2017 at 22:15
  • 1
    Environments equation and align serve similar kinds of purposes. Whereas the purpose of split or alignedis quite distinct: i.e. they typically fit inside equation, align*, etc. Jul 12, 2017 at 5:14
65

Here's a slightly better way to do this (IMO):

Using the split environment within an align will produce one equation number, vertically centered within the split (so long as there's not a page break involved, as discussed here).

Note that you can have individual labels for each equation by adding \label{} to the end of each line before the line break \\

For example:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document} 

\begin{align}
  E_1&=A+B \label{eq:1}\\
   \begin{split}
    E_2&=(C-D)E_1 \label{eq:2}\\
    &\quad +[(1-R)+R(1-Y)\\
    &\quad +\pi(1-\delta)]E_2\\
    &\quad +F\cdot E_3
   \end{split}\\
  E_3 &=(\pi\cdot \chi)-(R\cdot E_1)-(RY\delta\cdot E_2) \label{eq:3}
\end{align}

\end{document}

which gives:

enter image description here

42

This is really a comment on TH.'s accepted answer (which should stay that way). Using just one aligned doesn't work if you have multiple columns: they are separated by only a small space, since aligned "shrinks to fit". The workaround is to use one aligned per column, and wrap the whole thing in a larger align, like so:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
 \begin{align}
  \begin{aligned}
   x &= y \\       f(x) &= f(y)
  \end{aligned}
  &&
  \begin{aligned}
   a &= b \\       g(a) &= g(b)
  \end{aligned}
 \end{align}
\end{document}

This should produce two pairs of equations, each aligned at the equals sign, and with one equation number centered between the lines.

enter image description here

3
  • It would seem better to wrap the whole thing in a larger equation, and separated the aligned by using a \quad or two.
    – Teepeemm
    Nov 13, 2019 at 18:33
  • I disagree; explicit positioning is exactly what we use aligned to avoid. If you want greater control (and I don't think this is visually critical enough to warrant designing your document code around this goal) you can play with the column spacing.
    – Ryan Reich
    Nov 15, 2019 at 18:30
  • One problem is that when the equations on different columns have different heights, the horizontal alignment gets screwed.
    – stafusa
    Feb 11, 2020 at 14:09
9

Using

\begin{equation}
\begin{split}
  dr_t &= \kappa ( \theta - r_t ) dt + \sigma_r r^{\xi} dW_t \\
  dA_t &= \mu A_t dt + \sigma_A^{\alpha} dZ_t,
\end{split}
\end{equation}

will produce one equation number that is vertically centered on the group of equations.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .