# align optimization problem with multiple conditions

I am using the following environment to align optimization problem statements from Typesetting an optimisation problem

\documentclass{report}
\usepackage{amsmath}

\newcommand{\norm}[1]{\lVert#1\rVert_2}

\begin{document}

\begin{subequations}
\begin{alignat}{2}
&\text{subject to} &      & \alpha + (\beta*\gamma)\geq 0,\label{eq:constraint1}\\
&                  &      & \beta \geq 0.\label{eq:constraint2}
\end{alignat}
\end{subequations}

\end{document}


How can I additionally align the "condition" at the \geq sign such that it looks like this:

I suggest using the optidef package instead, which is done for the layout of optimisation problems, and has several variants:

\documentclass{report}
\usepackage{amsmath, optidef}

\newcommand{\norm}[1]{\lVert#1\rVert_2}

\begin{document}

\begin{mini!}
{x}{ \norm{f(x)}^2 \label{eq:optProb}}{}{}
\end{mini!}

\end{document}


I changed the alignat parameter and added some &

\documentclass{report}
\usepackage{amsmath}

\newcommand{\norm}[1]{\lVert#1\rVert_2}

\begin{document}

\begin{subequations}
\begin{alignat}{3}
&\text{subject to} &      & \alpha + (\beta*\gamma) & \geq 0,\label{eq:constraint1}\\
&                  &      & \beta                   &\geq 0.\label{eq:constraint2}
\end{alignat}
\end{subequations}

% edit
\begin{subequations}
\begin{alignat}{3}

• Sorry. See the edit: I added & – NBur Jan 15 '19 at 17:25