1
\begin{align}\label{flicker4}
\[{\rm{rank}}\left[ {\begin{array}{*{20}{c}}
E&0&{{B_d}}\\
C&{{D_d}}&0\\
0&0&{{D_d}}
\end{array}} \right] = n + {\rm{rank}}{D_d} + {\rm{rank}}\left[ {\begin{array}{*{20}{c}}
{{B_d}}\\
{{D_d}}
\end{array}} \right],\]

\end{align}
3
  • Welcomew to TeX. SE¨. Please extend your code snippet to complete small document with \documentclass{...} on the beginning and \end{document} of its end.
    – Zarko
    Commented May 4, 2017 at 22:00
  • 3
    you can not nested equation environment (\[ ... \] ) inside align environment!
    – Zarko
    Commented May 4, 2017 at 22:02
  • Crosslink: Half of the error is caused by Paragraph ended before \align was complete - TeX - LaTeX Stack Exchange.
    – user202729
    Commented Oct 9, 2022 at 5:09

1 Answer 1

3

There are a few problems with your code. First of all:

  • Empty lines are not allowed inside a display math environment
  • align is already a math environment, so you shouldn't use \[ .. \] inside it.

The code below has some additional suggestions, including using bmatrix instead of array, using equation instead of align because there is only one line and no alignment needed, removing a lot of unnecessary braces, and defining a new operator instead of using \rm (which has been deprecated for twenty-odd years).

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\rank}{rank}
\begin{document}
\begin{equation}\label{flicker4}
\rank
\begin{bmatrix}
E & 0   & B_d \\
C & D_d & 0   \\
0 & 0   & D_d
\end{bmatrix} = n + \rank D_d +
\rank \begin{bmatrix}
B_d\\
D_d
\end{bmatrix},
\end{equation}
\end{document}
4
  • I'm not a mathematician, so I'm not actually entirely sure if \rank should be defined as an operator. If someone knows better, please let me know or just edit my code. Commented May 4, 2017 at 22:06
  • I‘d say it’s quite OK to make it a \nolimits operator, exactly as you did (i.e., just be careful not to say \DeclareMathOperator*{\rank}{rank}!).
    – GuM
    Commented May 4, 2017 at 22:47
  • 1
    Defining the command as \rk would be shorter to type, and I don't think it's already defined.
    – Bernard
    Commented May 4, 2017 at 23:10
  • @Bernard Shorter to type, perhaps harder to remember. Commented May 5, 2017 at 6:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .