# How can I number a few equations together

i would like to write few equations, but all the equations will get only once numbered and in the middle (right side) of the equations. e.q. if i write 3 equations, the number will be to the right of the second equation line and if i have 2 equations, then the number will between the two equations and at the right side.

in addition i would like to have something like "&" (align) that i could align my equations at certain points.

Example:

a   = x_{ij}
(1)
b_j = y_j


where of course the number of equation doesn't take a all line space.

• Would simply using \notag in conjucture with \begin{align*} or \tag with \begin{align} solve your problem ? Nov 18, 2011 at 15:04
• Nov 18, 2011 at 15:10
• @N3buchadnezzar but then the tag won't be vertically centered if there's an even number of lines in the equation. Nov 18, 2011 at 15:12

The amsmath package provides the split environment. You can use a split environment inside an align environment or inside an equation environment; a little example:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
\begin{split}
a   &= x_{ij} \\
b_j &= y_j
\end{split}
\end{align}

\end{document} • You do not need align to get alignment, your example will work fine with an equation instead of align. Nov 18, 2011 at 15:14
• @TorbjørnT. Yes; however, for consistency reasons, I always use array when I use the alignment characters &. I will rephrase my answer. Nov 18, 2011 at 15:22
• I wouldn't advise to use align other than when it's necessary and moreover the usage of split is "wrong", as LaTeX will never use \abovedisplayshortskip with it. With aligned inside equation it will, if the line preceding the alignment is short; this is preferable for a singly numbered display. Nov 18, 2011 at 16:08

The amsmath package has many facilities, among which the aligned environment that does similarly to align, but produces a block usable in a bigger formula:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{aligned}
a   &= x_{ij} \\
b_j &= y_j
\end{aligned}
\end{equation}

\end{document}


What's the difference with split? That aligned, like align, allows many alignment points.

Although amsmath functionality is preferred, there are a multitude of ways this can be achieved. Here's one using only an array: \documentclass{article}
\begin{document}
\begin{equation}
\renewcommand{\arraystretch}{1.2}% To spread out the equations
\begin{array}{r@{\;}l}
a =& x_{ij} \\
b_j =& y_j
\end{array} \label{eq}
\end{equation}
\end{document}


It has the same layout - in terms of input - to the align environment. Moreover, it now also straight-forward to combine the equations using a brace (say) - achieved using a \left. and \right\} pair: \documentclass{article}
\begin{document}
\begin{equation}
\renewcommand{\arraystretch}{1.2}% To spread out the equations
\left.\begin{array}{r@{\;}l}
a =& x_{ij} \\
b_j =& y_j
\end{array}\right\} \label{eq}
\end{equation}
\end{document}


rcases (from mathtools) also provides the above functionality, but is usually intended for a different purpose. As such, the spacing/alignment is not as expected. One can use the undocumented \newcases to define a comparable alternative. Below I've adapted rcases to have a right-aligned first column, and introduce a \thickmuskip between the two "columns", similar to what one would expect around ordinary and relation atoms: \documentclass{article}
\usepackage{mathtools}% http://ctan.org/pkg/mathtools
\makeatletter
\newcases{Rcases}{$\mskip\thickmuskip$}{%
\hfil$\m@th{##}$}{$\m@th{##}$\hfil}{.}{\rbrace}
\makeatother
\begin{document}
\begin{equation}
\begin{Rcases}
a   &= x_{ij} \\
b_j &= y_j
\end{Rcases} \label{eq}
\end{equation}
\end{document}

• could also mention rcases from mathtools... Mar 29, 2012 at 8:53