“File ended while scanning use of \math@egroup” error [closed]

The error mentioned above is preventing me from compiling my code. Here's what I think is the related code:

    \begin{enumerate}

\item[\textbf{5.9}]To every pair $A, B$  of vector spaces one can assign the vector space $Hom(A,B)$ consisting for all homomorphisms from $A$ to $B$. If $f: A_1 \rightarrow A_2$ and $g: B_1 \rightarrow B_2$ are morphisms in $\mathbf{Vec_{\mathbb{R}}$, then the vector space homomorphism $Hom(f,g): Hom(A_2, B_1) \rightarrow Hom(A_1, B_2)$ is given by $\phi \mapsto g \circ \phi \circ f$." \vspace{11pt}\\

\end{enumerate}


Any help would be appreciated. I tried moving the code to a different .tex file but the same error occurred, so I don't think the error is specific to the file.

closed as off-topic by diabonas, Kurt, koleygr, Troy, ZarkoOct 15 '17 at 2:42

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Welcome to TeX.SE! Please make your code snippet compilable ... – Kurt Oct 14 '17 at 22:04
• That's still not a full document, which would begin with \documentclass{...}, include the necessary packages and have a \begin{document} ... \end{document} environment... Anyway, there is a closing brace missing in $\mathbf{Vec_{\mathbb{R}}$, which is probably the source of the error. – diabonas Oct 14 '17 at 22:15
• I'm voting to close this question as off-topic because it is about a trivial syntax mistake that was solved in the comments. – diabonas Oct 14 '17 at 22:19
• @diabonas yes sorry I'd answered while you were commenting:-) But to make an answer more or less worth while I expanded it to show how to read the error message to locate the error. But if people vote to close that's OK too:-) – David Carlisle Oct 14 '17 at 22:23
• @DavidCarlisle No problem, +1 to your answer, just wanting to make sure the question gets off the unanswered list ;) – diabonas Oct 14 '17 at 22:26

$\mathbf{Vec_{\mathbb{R}}$


is missing a }

Note the full error message which you did not show highlights the mis-matched brace:

Runaway argument?
{Vec_{\mathbb {R}}$, then the vector space homomorphism$Hom(f,g): Ho\ETC.
! File ended while scanning use of \math@egroup.
<inserted text>
\par
<*> pp565

?


The runaway argument messages shows you that the brace { before Vec doesn't have a matching } and tex ran off the end of the file looking for it.

unrelated but Vec and Hom will be typeset in math italic designed to make them look like V * e * c not as a word. use

\DeclareMathOperator\Vec{Vec}


then use \Vec to get much better spacing.

• Wow, there are LOTS of "File ended while scanning…" questions here! If only we could re-write this error message :) – Will Robertson Oct 15 '17 at 1:10