[Tex/LaTex] What does Misplaced \cr in latex error mean

errors

What does it mean

! Misplaced \cr.
\math@cr@@@ ->\cr 
In latex error.

in this document

    \documentclass[12pt]{article}
    \usepackage{amsmath,amsfonts,amsthm,amssymb,color}
    \usepackage[T1]{fontenc}
    \usepackage{mathtools}
    \begin{document}
     \begin{align*}
     \begin{pmatrix }
    \int_0^1 f(s) ds  \\
    int_0^\om g(s) ds 
     \end{pmatrix}
     \end{align*}

\end{document}

Best Answer

Your example generates

! LaTeX Error: Environment pmatrix   undefined.

because of the spurious space in \begin{pmatrix } and

! Undefined control sequence.

because \om is not defined.

It does only generates the error in the subject line if you ignore those errors and let TeX recover. Subsequent errors are nearly always spurious.

In this case \cr is the TeX primitive for a new line in an aligment which is used in the definition of \\. because the inner pmatrix did not start because of the first error, TeX takes the \\ as ending the outer alignment row inside the group, which is an error.