TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there some standard way to create multiple display equations like the following

enter image description here

without having to use:

  1. \renewcommand*{\arraystretch}{2} (so that the two rows in the second equation don't get too close to each other)
  2. array environment (so that I can use \renewcommand*{\arraystretch}{2}. Can't use the align environment again)
  3. \displaystyle (so that things would be displayed the way they would if I used align)

as I've done below? My solution just seems like such a kludgy hack. There has to be a better/standard way...right?

      \pi(\mu \mid x) &= \frac{\pi(\mu)\,\mathcal{L}(x \mid \mu)}{p(x)} \\
                      &= \left\{
                                & \mbox{for} & \mu = 0 \\
                                & \mbox{for} & \mu \neq 0. \\
share|improve this question
Are you just looking for \begin{cases} ... \end{cases} -- en.wikibooks.org/wiki/LaTeX/… ? – eudoxos Oct 26 '11 at 2:42
up vote 7 down vote accepted

You can use the dcases environment provided by the mathtools package; this environment gives the same output as with cases (from amsmath) except that the rows are set in display style. A little example using the starred version dcases* in which the second column is set in font active just before the environment:



  \pi(\mu \mid x) &= \frac{\pi(\mu)\,\mathcal{L}(x \mid \mu)}{p(x)} \\
  &= \begin{dcases*}
    \frac{(1-w)\phi(x)}{p(x)} & for $\mu=0$. \\
    \frac{w\gamma(\mu)\phi(x-\mu)}{p(x)} &for $\mu\neq 0$.


enter image description here

share|improve this answer
I didn't know until I read your answer that the dcases environment of the mathtools package does such a good job of automatically setting the spacing between consecutive lines. Really neat! – Mico Oct 27 '11 at 2:21

If you want to get away from using an array, you could consider using the cases environment offered by amsmath. Also, there are other possibilities to \arraystretch and \displaystyle:

  1. The new line macro \\ of arrays, tabulars or cases can take an optional length argument: \\[<len>] indicating the length skip between rows. Here <len> refers to any known TeX lenth unit.
  2. Using cases leaves you free from array while still having the option to increase the "row skip" using Option 1. No need to specify a column alignment.
  3. amsmath provides \dfrac{<num>}{<denom>} which is the \displaystyle form of \frac{<num>}{<denom>}.

All these combined in the following MWE is probably what you're after:

enter image description here

\usepackage{amsmath}% http://ctan.org/pkg/amsmath
  \pi(\mu \mid x) &= \frac{\pi(\mu)\,\mathcal{L}(x \mid \mu)}{p(x)} \\
                  &= \begin{cases}
                         & \text{for $\mu=0$} \\[3ex]
                         & \text{for $\mu\neq 0$.}

All of these features come standard with amsmath, so no need to load any additional packages. Also note the use of \text for text in math mode. This is another feature provided by amsmath.

share|improve this answer
Wonderfully helpful. Never knew about \\[<len>]. I followed up with a question on it here. – lowndrul Oct 26 '11 at 15:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.