2

This question was asked before:

  1. How to break a long equation?
  2. How can I split an equation over two lines

But what I want to ask is a bit complicated than both.

\begin{equation}\label{eq:dual_algo}
\begin{aligned}
Z_{t+1}^i &= \underset{Z^i\succeq 0, \operatorname{tr(Z^i)=1}}{\text {argmax}}
 & & \langle \mathcal{A}_d^*(D^i)-\sum_{j:(i,j)\in \mathcal{E}} [Y_t^{ij}
-\alpha X_t^j],Z^i \rangle \\ & & &- \frac{|\mathcal{N}_i\alpha|}{2}\|Z^i\|_F^2\\ 
X_{t+1}^i &= \underset{X^i\succeq 0, \operatorname{tr(X^i)=1}}{\text{argmax}} 
& &\langle \sum_{i:(i,j)\in \mathcal{E}} [Y_t^{ij}+\alpha X_t^j],X^j \rangle \\
& & &- \frac{|\mathcal{N}_j\alpha|}{2}\|X^j\|_F^2
 \\
Y_{t+1}^{ij} &= Y_{t}^{ij} - \alpha (Z_{t+1}^j -Z_{t+1}^i)
\end{aligned} 
\end{equation}   

The following is what I get:

enter image description here But I want the following:

enter image description here

Therefore, there are a few requirements:
1. Equations cannot exceed the border
2. Three = should be aligned
3. Right-hand-side description should be aligned (the first two are too far away from "argmax")
4. The fractional part should also be aligned.

It is double column.

How do I fix it?

3 Answers3

3

Hope this will be helps:

\begin{equation}\label{eq:dual_algo}
\begin{aligned}
Z_{t+1}^i &= \underset{Z^i\succeq 0, \operatorname{tr(Z^i)=1}}{\text {argmax}}  \langle \mathcal{A}_d^*(D^i)-\sum_{j:(i,j)\in \mathcal{E}} [Y_t^{ij} -\alpha X_t^j],Z^i \rangle \\
 & \quad  - \frac{|\mathcal{N}_i\alpha|}{2}\|Z^i\|_F^2\\
X_{t+1}^i &= \underset{X^i\succeq 0, \operatorname{tr(X^i)=1}}{\text{argmax}} \langle \sum_{i:(i,j)\in \mathcal{E}} [Y_t^{ij}+\alpha X_t^j],X^j \rangle \\
& \quad - \frac{|\mathcal{N}_j\alpha|}{2}\|X^j\|_F^2 \\
Y_{t+1}^{ij} &= Y_{t}^{ij} - \alpha (Z_{t+1}^j -Z_{t+1}^i) 
\end{aligned}
\end{equation}

To align the description give \quad or \qquad. enter image description here

Saravanan
  • 1,475
2

I propose a solution based on alignedat, the fleqn environmen from nccmath and the \smashoperator and \mathrlap commands, from mathtools:

\documentclass[twocolumn]{article}
\usepackage{mathtools, nccmath}
\DeclareMathOperator\argmax{argmax}
\usepackage{lipsum}

\begin{document}
\lipsum[1]

\begin{fleqn}[1em]
  \begin{equation}\label{eq:dual_algo}
    \begin{alignedat}{2}
      Z_{t+1}^i &= \underset{\substack{Z^i\succeq 0, \\\operatorname{tr(Z^i)=1}}}{\argmax}
      & \hspace{1.25em}&\begin{aligned}[t] \langle \mathcal{A}_d^*(D^i) & -\mathrlap{\smashoperator{∑_{j:(i,j) ∈ \mathcal{E}}} [Y_t^{ij}
        -αX_t^j],Z^i \rangle}
      \\ %
      &  - \frac{|\mathcal{N}_i\alpha|}{2}\|Z^i\|_F²
      \end{aligned}\\
      X_{t+1}^i &= \underset{\substack{X^i\succeq 0,\\ \operatorname{tr(X^i)=1}}}{\argmax}
      & &\begin{aligned}[t]\langle \smash{\smashoperator{∑_{i:(i,j) ∈ \mathcal{E}}}} [Y_t^{ij} & +αX_t^j],X^j \rangle \\
      & - \frac{|\mathcal{N}_j\alpha|}{2}\|X^j\|_F²
      \end{aligned}\\
      % \\
      Y_{t+1}^{ij} &=\mathrlap{ Y_{t}^{ij} - α(Z_{t+1}^j -Z_{t+1}^i)}
    \end{alignedat}
  \end{equation}
\end{fleqn}
\lipsum[2-6]

\end{document} 

enter image description here

Bernard
  • 271,350
1

It's difficult to give advice, as we don't know the page setup.

From the picture, it seems you have \usepackage{times}, which is wrong because math would be typeset in an incompatible font.

Note how \argmax and \tr are defined; I used some tricks for squeezing the equations as much as possible.

\documentclass[twocolumn]{article}
\usepackage{mathtools}
\usepackage{mathptmx}

\usepackage{lipsum} % just for the example

\DeclareMathOperator*{\argmax}{argmax}
\DeclareMathOperator{\tr}{tr}

\begin{document}

\lipsum*[2]
\begin{equation}\label{eq:dual_algo}
\begin{aligned}
Z_{t+1}^i &= 
  \!\begin{multlined}[t][.75\columnwidth]
  \argmax_{\substack{Z^i\succeq 0,\\ \tr(Z^i)=1}}
  \Bigl\langle
    \mathcal{A}_d^*(D^i)-\smashoperator{\sum_{j:(i,j)\in \mathcal{E}}} 
     \,[Y_t^{ij}-\alpha X_t^j],Z^i
  \Bigr\rangle \\[-2ex]
  - \frac{|\mathcal{N}_i\alpha|}{2}\|Z^i\|_F^2
  \end{multlined}
\\[1ex]
X_{t+1}^i &= 
  \!\begin{multlined}[t][.75\columnwidth]
  \argmax_{\substack{X^i\succeq 0,\\ \tr(X^i)=1}}
  \Bigl\langle\,
    \smashoperator[r]{\sum_{i:(i,j)\in \mathcal{E}}} \,[Y_t^{ij}+\alpha X_t^j],X^j
  \Bigr\rangle \\[-2ex]
  - \frac{|\mathcal{N}_j\alpha|}{2}\|X^j\|_F^2
  \end{multlined}
\\[1ex]
Y_{t+1}^{ij} &= Y_{t}^{ij} - \alpha (Z_{t+1}^j -Z_{t+1}^i)
\end{aligned} 
\end{equation}   
\lipsum[1-10]

\end{document}

enter image description here

egreg
  • 1,121,712