When writing an optimization problem, use “minimize” or “maximize” instead of “min” or “max”, and “subject to” instead of “such that” or “s.t.”.

Correct Incorrect
\[\begin{aligned} \operatorname{minimize} \quad & f(x) \\ \operatorname{subject~to} \quad & Ax = b. \end{aligned} \] \[ \begin{aligned} \operatorname{min} \quad & f(x) \\ \operatorname{s.t.} \quad& Ax = b. \end{aligned} \]

The reason that “$\operatorname{min} f(x)$” is objectionable is that the “min” is (by convention) an operator that is short for “minimum”, so the expression “$\operatorname{min} f(x)$” stands for the minimal value of $f$ . Similarly, by convention “s.t.” stands for “such that”, so “$\operatorname{min} f(x)$ s.t. $Ax = b$” should be read as “the minimum value of $f(x)$ such that $Ax = b$ (as an aside, it would be better to format this expression as “$\min{f(x) : Ax = b}$”). In contrast, “$\operatorname{minimize} f(x)$” is a statement of the goal of the optimization problem with the constraints of the problem given after “subject to”. (As Stephen P. Boyd notes, we could read “s.t.” as an abbreviation of “subject to”, and the same could be said for “min” and “minimize”, but doing so causes use to use the same symbols for different things, which should be avoided.)

We use the following code when writing optimization problems. In the preamble, we define \minimize, \maximize, and \subjecto macros, as follows:

% Usage: \minimize_{\x \in \reals}
\newcommand*{\minimize}{\operatorname*{minimize}} 
% Usage: \maximize_{\x \in \reals}
\newcommand*{\maximize}{\operatorname*{maximize}} 
\newcommand{\subjectto}{\operatorname{subject~to}}

The starred version of the \operatorname macro causes subscripts to be placed below the text in display equations. For \subjectto, we use a fixed-width nonbreaking space “~” in \operatorname to preserve the space in the name (using \textup{subject to} would also preserve the space, but will sometimes appear as different font if different fonts are configured for math vs. text).

In the document body, we write an optimization problem as

\begin{align*}
    \minimize_{x \in \reals^n} \quad & f(x) \\
    \subjectto                 \quad & Ax \leq 0 \\
                                     & Bx = 0.
\end{align*}

If space is a concern, you may abbreviate “subject to” as “subj. to” (\operatorname{subj.~to}).