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


I know how to write an equation if I am maximizing over one condition. For example,

$\max_{0 \leq x \leq 1} f(x)$

But I an not sure how to write it if I have to maximize the function over two conditions and I would like the second condition to appear below the first condition. Any help is appreciated.

share|improve this question
Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – egreg Oct 13 '11 at 23:16
are you referring to "\substack" ?? It worked, thanks. – Srikanth Oct 13 '11 at 23:23
@egreg: Thanks for the suggestions. – Srikanth Oct 13 '11 at 23:25

You can use \substack, provided by the amsmath package:

\usepackage{amsmath}% http://ctan.org/pkg/amsmath
  \max_{0 \leq x \leq 1} f(x)

  \max_{\substack{0 \leq x \leq 1 \\ a \geq y \geq b}} f(x)

Substack as limits

It works similar to an array where multiple lines are separated using \\. Another alternative would be to use the \mathop - it produces the same result as above:

\usepackage{amsmath}% http://ctan.org/pkg/amsmath
  \mathop{\max_{0 \leq x \leq 1}}_{a \geq y \geq b} f(x)

\mathop makes it's argument an operator, which allows for the traditional limit placement using _ and/or ^ which adds it below/above the operator.

share|improve this answer
Thank you, very helpful!! – Srikanth Oct 13 '11 at 23:40

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.