This error appears when you have accidentally forgotten a $ sign when exiting display math mode. # Common Causes Forgetting$ sign:

When writing in inline math mode, you must write your equation inside single dollar signs $...$. When writing in display math mode, you must write your equation inside double dollar signs $$...$$. If you accidentally forget a dollar sign when exiting display math mode as shown below, or equivalently, if you accidentally include an extra dollar sign when entering inline math mode, you will get an error.

The equation we would like to write is
 E=mc^2 $ This will generate an error which looks like main.tex, line 9 Missing$ inserted.

<inserted text> $l.9 I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed. To avoid this error, always make sure that your $s balance around math, i.e. there is the same number of \$s on the left of our mathematical expressions as there is on the right.