# How can I label for a collection of equations? [duplicate]

Possible Duplicate:
Separate labels in cases

I want to label each equation in a collection of equations as in the example below. How can I do this?

-

## marked as duplicate by Peter Grill, Thorsten, Marco Daniel, lockstep, Stefan Kottwitz♦Oct 25 '12 at 6:18

I was crazy enough to do so. It is a cases environment, with each line numbered. I'm still not sure what the question is asking, though. – Andrew Uzzell Oct 22 '12 at 14:55
I guess that subnumcases would be the answer. On the other hand, if you need to refer to all the lines, it's probably better to use only one number for the whole equation. After all, it's the definition of one function; what does (1) refer to? To "0", to "if x>0" or to both? – egreg Oct 22 '12 at 15:27
Just use \eqref{eq:first}-\eqref{eq:last} if you are using the amsmath package and (\ref{eq:first})-(\ref{eq:last}) if you do not use it.