2
\begin{align*}
    Z &= \begin{multlined}[t]
        \sum_{k=0}^{N-1} \tr \bigl\{ Q^{-1} \bigl[ (P_{k+1} + x_{k+1}^N     x_{k+1}^{N\prime}) - (P_{k+1,k}^N + x_{k+1}^N x_k^{N\prime}) A' \\
        - A (P_{k,k+1}^N + x_k^N x_{k+1}^{N\prime}) + A(P_k^N + x_k^N     x_k^{N\prime})A' \bigr] \bigr\}
    \end{multlined} \\
    &= \begin{multlined}[t]
        \tr \bigl\{ Q^{-1} \bigl[ (P_{k+1} + x_{k+1}^N     x_{k+1}^{N\prime}) - (P_{k+1,k}^N + x_{k+1}^N x_k^{N\prime}) A' \\
        - A (P_{k,k+1}^N + x_k^N x_{k+1}^{N\prime}) + A(P_k^N + x_k^N     x_k^{N\prime})A' \bigr] \bigr\}
    \end{multlined}
\end{align*}

renders as Obviously the vertical spacing within the second multlined environment is too cramped, and if not for the sum providing a buffer the spacing in the first one would be too cramped as well. How can I fix this?

teerav42
  • 391

1 Answers1

1

I don't think multilined is needed here. Consider the following code instead:

\documentclass{article}

\usepackage{amsmath}

\DeclareMathOperator{\tr}{tr}

\begin{document}

\begin{align*}
    Z &= \smash[b]{\sum_{k=0}^{N-1}} \tr \bigl\{ Q^{-1} \bigl[ (P_{k+1} + x_{k+1}^N     x_{k+1}^{N\prime}) - (P_{k+1,k}^N + x_{k+1}^N x_k^{N\prime}) A'\\[1ex]
      &\hspace{4em}  - A (P_{k,k+1}^N + x_k^N x_{k+1}^{N\prime}) + A(P_k^N + x_k^N     x_k^{N\prime})A' \bigr] \bigr\}\\[1ex]
    &=  \tr \bigl\{ Q^{-1} \bigl[ (P_{k+1} + x_{k+1}^N     x_{k+1}^{N\prime}) - (P_{k+1,k}^N + x_{k+1}^N x_k^{N\prime}) A' \\[1ex]
      &\hspace{4em}  - A (P_{k,k+1}^N + x_k^N x_{k+1}^{N\prime}) + A(P_k^N + x_k^N     x_k^{N\prime})A' \bigr] \bigr\}
\end{align*}

\end{document}

enter image description here

I inserted a \smash command to ignore the depth of the \sum, then manually added a 1ex vertical space after each line. You can adjust the 1ex to suit your needs, as well as the 4em horizontal space for the trailing lines. Note the [b] option for \smash, which smashes the depth but not the height. (Thanks for the edit @egreg.)

Sandy G
  • 42,558