4

Here what I have done so far. I want the middle space to reduce a bit.

\documentclass[10pt]{article}
\usepackage{amsmath, amsthm, amssymb}
\begin{document}
\begin{align}
\Vert\mathbf{R}\Vert_F^2  & \le  \Vert\mathbf{R}\Vert_F^2 +\lambda\Vert 
\mathbf{B}^{'}\Vert_F^2-\sum_{k=1}^{m}\Vert \mathbf{B}^{'}\mathbf{A}\Vert_F^2 & & = 
\Vert\mathbf{R}\Vert_F^2 +\lambda\Vert \mathbf{B}^{'}\Vert_F^2-\sum_{k=1}^{m}\Vert
\mathbf{b}_k\mathbf{a}_{[k]}\Vert_F^2 \nonumber \\
& = \Vert\mathbf{R}\Vert_F^2 +\lambda\sum_{k=1}^{m}\Vert \mathbf{b}_k\Vert_2^2 -
\sum_{k=1}^{m}\Vert \mathbf{W}_k\Vert_F^2 & &= \Vert\mathbf{R}\Vert_F^2 -
\sum_{k=1}^{m}\Vert    \mathbf{b}_k\Vert_2^2\Vert\mathbf{a}_{[k]}\Vert_2^2 +\lambda m 
\label{eq6} 
\end{align}
\end{document}    
  • 1
    What does ^{'} signify? It it signifies the transpose operation, it should probably be written as ', i.e., not raised and made smaller by the ^{...} "wrapper". – Mico Dec 18 '14 at 6:45
7

You can add some negative space, for example \hspace*{-1em} before the last =

MWE

\documentclass[10pt]{article}
\usepackage{amsmath, amsthm, amssymb}
\begin{document}
\begin{align}
\Vert\mathbf{R}\Vert_F^2  & \le  \Vert\mathbf{R}\Vert_F^2 +\lambda\Vert
\mathbf{B}^{'}\Vert_F^2-\sum_{k=1}^{m}\Vert \mathbf{B}^{'}\mathbf{A}\Vert_F^2 & \hspace*{-1em} & =
\Vert\mathbf{R}\Vert_F^2 +\lambda\Vert \mathbf{B}^{'}\Vert_F^2-\sum_{k=1}^{m}\Vert
\mathbf{b}_k\mathbf{a}_{[k]}\Vert_F^2 \nonumber \\
& = \Vert\mathbf{R}\Vert_F^2 +\lambda\sum_{k=1}^{m}\Vert \mathbf{b}_k\Vert_2^2 -
\sum_{k=1}^{m}\Vert \mathbf{W}_k\Vert_F^2 & \hspace*{-1em} &= \Vert\mathbf{R}\Vert_F^2 -
\sum_{k=1}^{m}\Vert    \mathbf{b}_k\Vert_2^2\Vert\mathbf{a}_{[k]}\Vert_2^2 +\lambda m
\label{eq6}
\end{align}
\end{document}  

Output

enter image description here

Anyway, as you can see, the equation is still too long to fit in the lines. I'd suggest to insert some more breaks:

\documentclass[10pt]{article}
\usepackage{amsmath, amsthm, amssymb}
\begin{document}
\begin{equation}
\begin{aligned}
\Vert\mathbf{R}\Vert_F^2  & \le  \Vert\mathbf{R}\Vert_F^2 +\lambda\Vert
\mathbf{B}^{'}\Vert_F^2-\sum_{k=1}^{m}\Vert \mathbf{B}^{'}\mathbf{A}\Vert_F^2 \\
& = \Vert\mathbf{R}\Vert_F^2 +\lambda\Vert \mathbf{B}^{'}\Vert_F^2-\sum_{k=1}^{m}\Vert
\mathbf{b}_k\mathbf{a}_{[k]}\Vert_F^2 \\
& = \Vert\mathbf{R}\Vert_F^2 +\lambda\sum_{k=1}^{m}\Vert \mathbf{b}_k\Vert_2^2 -
\sum_{k=1}^{m}\Vert \mathbf{W}_k\Vert_F^2 \\
& = \Vert\mathbf{R}\Vert_F^2 -\sum_{k=1}^{m}\Vert
\mathbf{b}_k\Vert_2^2\Vert\mathbf{a}_{[k]}\Vert_2^2 +\lambda m
\label{eq6}
\end{aligned}
\end{equation}
\end{document} 

Output

enter image description here

Notice the use of equation and aligned instead of align to avoid using \nonumber.

  • @VinayakAbrol you're welcome – karlkoeller Dec 18 '14 at 6:30
  • An aligned environment with a single alignment point is equivalent to the split environment. Using \lVert and \rVert, as needed, instead of the plain \Vert might produce better spacing in some cases. It certainly makes the code easier to read and debug... – Mico Dec 18 '14 at 6:48
3

Here is how I would do it:

\documentclass{article}

\usepackage[margin = 4cm]{geometry}
\usepackage{mathtools}

\newcommand*\Vector[1]{\mathbf{#1}}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\DeclarePairedDelimiter{\something}{\lbrack}{\rbrack}

\begin{document}

\noindent Either
\begin{alignat}{2}
  \norm{\Vector{R}}_{F}^{2}
  &\le \norm{\Vector{R}}_{F}^{2} + \lambda \norm{\Vector{B}'}_{F}^{2}
       -\sum_{k = 1}^{m} \norm{\Vector{B}'{\mkern -2mu}\Vector{A}}_{F}^{2}
  &&= \norm{\Vector{R}}_{F}^{2} + \lambda \norm{\Vector{B}'}_{F}^{2}
      -\sum_{k = 1}^{m} \norm{\Vector{b}_{k}\Vector{a}_{\something{k}}}_{F}^{2} \nonumber \\
  &= \norm{\Vector{R}}_{F}^{2} + \lambda \sum_{k = 1}^{m} \norm{\Vector{b}_{k}}_{2}^{2}
     -\sum_{k = 1}^{m} \norm{\Vector{W}_{k}}_{F}^{2}
  &&= \norm{\Vector{R}}_{F}^{2} - \sum_{k = 1}^{m} \norm{\Vector{b}_{k}}_{2}^{2}
      \,\norm{\Vector{a}_{\something{k}}}_{2}^{2} + \lambda m 
\end{alignat}
or
\begin{align}
  \norm{\Vector{R}}_{F}^{2}
  &\le \norm{\Vector{R}}_{F}^{2} + \lambda \norm{\Vector{B}'}_{F}^{2}
       -\sum_{k = 1}^{m} \norm{\Vector{B}'{\mkern -2mu}\Vector{A}}_{F}^{2} \nonumber \\
  &= \norm{\Vector{R}}_{F}^{2} + \lambda \norm{\Vector{B}'}_{F}^{2}
     -\sum_{k = 1}^{m} \norm{\Vector{b}_{k}\Vector{a}_{\something{k}}}_{F}^{2} \nonumber \\
  &= \norm{\Vector{R}}_{F}^{2} + \lambda \sum_{k = 1}^{m} \norm{\Vector{b}_{k}}_{2}^{2}
     -\sum_{k = 1}^{m} \norm{\Vector{W}_{k}}_{F}^{2} \nonumber \\
  &= \norm{\Vector{R}}_{F}^{2} - \sum_{k = 1}^{m} \norm{\Vector{b}_{k}}_{2}^{2}
     \,\norm{\Vector{a}_{\something{k}}}_{2}^{2} + \lambda m 
\end{align}

\end{document}

output

Notice the use of \DeclarePairedDelimiter from the mathtools package.

  • 1
    In the pursuit of perfection, I'd be tempted to add \, (thinspace) between the two adjacent norm expressions in the final row. I'd also replace all instances of ^{'} with ', or I'd write ^{\prime}. – Mico Dec 18 '14 at 6:53
  • 2
    following Mico in pursuit of perfection, i'd be tempted to make all the delimiters uniform in size -- the sub/sup on the version with \Vector{B}^{\prime} look more nicely spaced than those on the shorter ones. however, i agree with karlkoeller that aligned is preferable to align and lots of \nonumbers – barbara beeton Dec 18 '14 at 14:44
  • @Mico The \, is already used. :) I've now implemented ^{\prime}. – Svend Tveskæg Dec 18 '14 at 15:40
  • @barbarabeeton ^{\prime} inplemented. The align is because I guess the reference is only to the last expression. – Svend Tveskæg Dec 18 '14 at 15:41
  • 2
    @SvendTveskæg Using ' is easier than ^{\prime} and completely equivalent; also '' is equivalent to ^{\prime\prime} and so on. Instead ^{'} is wrong. – egreg Dec 18 '14 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.