\date{Jan 2023}



Lets define etities, relations and facts of the graph
    \item entities:\\
            $\mathcal{G} =$ 

        \item hi

removing part of my code shows that the problem here is with the left and right and i can't figure out why.

would appreciate the help

file.tex|18 error| Missing $ inserted.
file.tex|23 error| Missing $ inserted.
file.tex|23 error| Missing } inserted.
file.tex|23 error| Extra }, or forgotten \endgroup.

this is my error msgs.

  • Perhaps you should explain what exactly you are trying to do here. It might seem more relevant to use the bmatrix env (you are already loading amsmath) instead of \left\{\begin{tabular}{l} ... \end{tabular}\right\}
    – daleif
    Jan 9, 2023 at 12:04

2 Answers 2


\left and \right TeX primitives are working only in math mode. If you use them outside math mode, TeX reports the error.

The reason is: \left and \right primitives scale the delimiters in respect to the math axis as horizontal axis of the delimiters. And the position of the math axis is known only in the math mode.


The \left and \right style delimiters can only be used in math mode, as wipet’s answer explains.

In your example, the issue is that you are ending math mode too soon: the whole definition of G should be within math mode, and your tabular environment should probably be matrix instead. Generally, matrix works just like tabular except that it’s designed to be used inside math mode, and it puts its contents in math mode. It’s the right thing to use for matrices, column/row vectors, and any similar kind of mathematical arrays.

A good rule of thumb is that any mathematical expression should be inside math mode. If you find yourself putting parts of a mathematical expression outside math mode, like your example has here, that’s almost always a sign you’re doing something not quite right, and that there’s a better way to do it that you should be looking for.

You must log in to answer this question.

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