How to get only one vertically centered equation number in align environment with two equations
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}
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:
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.