# Referencing an equation in a set of equations

Is there a set way of referencing a single equation from a set? I have three equations numbered together (as, let's say, (2.3)). I prefer numbering them as a set since they are directly related and it looks much cleaner than individually numbering them. How would I go about referencing, for example, the third of these alone?

• Hi, welcome. Could subequations be an option, see tex.stackexchange.com/questions/38716/… for an example. Aug 3 '19 at 6:32
• Hello! That is precisely what I was looking for. It means that all equations still have to be numbered, but it looks way more elegant. Thanks! Aug 3 '19 at 6:52
• @TorbjørnT. -- Please leave a "token" answer so this nice question doesn't get lost. Aug 4 '19 at 14:19

To refer to something using the \label/\ref mechanism it must have a number. For your case you could use the subequations environment from amsmath. All numbered equations in such an environment will be numbered 1a, 1b, etc, instead of 1, 2, etc. Cross references can be made to either the set of equations, or to a subequation.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations} \label{equationgroup}
\begin{gather}
z=x \label{eqA} \\
a=b \label{eqB} \\
f=g \label{eqC}
\end{gather}
You can have text in between here.
$$h=i$$
\end{subequations}

Refer to \eqref{equationgroup} or for example \eqref{eqB}.
\end{document}