Constrained optimization problems are almost everywhere in engineering research.

A mathematical description of those problems with a single objective is

to minimize or maximize an objective function

over a set of decision variables under a set of constraints.

There are different ways to format optimization problems;

personally, I follow the format used in the book “Convex Optimization

For example, a general optimization problem has the form

This is generated by the following $\LaTeX$ code:

\begin{equation*}
\begin{aligned}
& \underset{x}{\text{minimize}}
& & f_0(x) \\
& \text{subject to}
& & f_i(x) \leq b_i, \; i = 1, \ldots, m.
\end{aligned}
\end{equation*}

As seen in the code, the formatting is done by the aligned environment,

which is defined in the amsmath package, so you need to include the following line in the preamble:

 \usepackage{amsmath}

Unlike the tabular environment, in which you can specify the alignment of each column,

in the aligned environment, each column (separated by &) has a default alignment,

which alternates between right and left-aligned.

Therefore, all the odd columns are right-aligned and all the even columns are left-aligned.

We conclude with a real example:

The above problem is formulated for completing low-rank positive semidefinite matrices.

It is convex, or more precisely, it is a semidefinite program.  The corresponding $\LaTeX$ code is

\begin{equation*}
\begin{aligned}
& \underset{X}{\text{minimize}}
& & \mathrm{trace}(X) \\
& \text{subject to}
& & X_{ij} = M_{ij}, \; (i,j) \in \Omega, \\
&&& X \succeq 0.
\end{aligned}
\end{equation*}

Totui