# Missing { inserted?

I keep getting the error:

Missing { inserted.


and I don't know what I'm doing wrong. I just started using Latex and have no clue what I'm doing. below is what I have done.

\documentclass{article}

\usepackage[utf8]{inputenc}

\usepackage{amsmath}

\begin{document}

\section{Problem 5}

\begin{align*}

\\ b + 2y &= a

\\ \frac{b}{2} + y &= \frac{a}{2}

\\ y &= \frac{a-b}{2}

\\ 2y &= a-b

\\(x+b)^2 + (\frac{b}{2})^2&=r

\\(a-x)^2 + (\frac{a}{2})^2&=r

\\(x+b)^2 + (\frac{a}{2})^2&=(a-x)^2 + (\frac{a}{2})^2

\\x^2 + 2bx + b^2 + \frac{b^2}{4} &=a^2 -2ax + x^2 + \frac{a^2}{4}

\\2bx + \frac{5b^2}{4} &= -2ax + \frac{5a^}{4}

\\ \frac{2bx+2ax}{2} &= \frac{\frac{5a^2}{4}}-\frac{{5b^2}{4}}{2}

\\ bx + ax &= \frac{5a^2}{8} - \frac{5b^2}{8}

\end{align*}

\end{group*}

\end{document}

• (there is one typo on line 13)
– Jack
Commented May 20, 2017 at 15:21
• \\  is end of line not start, so omit the first \\ also you can not have blank lines within the environment. Commented May 20, 2017 at 15:23
• please always post full (small) document that shows the problem, your example can not be run to reproduce the error, also what is this enviornment? \end{group*} Commented May 20, 2017 at 15:24
• In addition to what David has already pointed out. \\2bx + \frac{5b^2}{4} &= -2ax + \frac{5a^}{4} Did you perhaps forget to type in the superscript for 5a?
– Troy
Commented May 20, 2017 at 15:26
• Hi! My teacher put in the \end{group} (but I took it out) and I'm pretty sure the \\ can go at the beginning of a line or the end. I have it at the beginning and all is going well. Thanks!
– Jack
Commented May 21, 2017 at 1:22

TeX gives you a lot of help to find the problem.

With the code as posted the error is

Runaway argument?

! Paragraph ended before \align* was complete.
\par
l.12

?


which is telling you that the blank line (paragraph end) on line 12 isn't allowed inside align*.

So if you remove the blank lines and run it again

You get the error

! Missing { inserted.
\endgroup
l.23 \end{align*}


This is slightly more obscure as for technical reasons in align such errors are always reported as being on the last line, however it tells you that the {} matching is wrong, or actually in this case a^} should have been a^{2}}

then, running it again, the error is

! LaTeX Error: \begin{document} ended by \end{group*}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.25 \end{group*}


I have no idea what that is intended to be so simply delete that line. It then runs without error but with excessive space before the display as there is an empty row as the first line before the first \\ so re-arranging that produces

\documentclass{article}

\usepackage[utf8]{inputenc}

\usepackage{amsmath}

\begin{document}

\section{Problem 5}

\begin{align*}
b + 2y &= a\\
\frac{b}{2} + y &= \frac{a}{2}\\
y &= \frac{a-b}{2}\\
2y &= a-b\\
(x+b)^2 + (\frac{b}{2})^2&=r\\
(a-x)^2 + (\frac{a}{2})^2&=r\\
(x+b)^2 + (\frac{a}{2})^2&=(a-x)^2 + (\frac{a}{2})^2\\
x^2 + 2bx + b^2 + \frac{b^2}{4} &=a^2 -2ax + x^2 + \frac{a^2}{4}\\
2bx + \frac{5b^2}{4} &= -2ax + \frac{5a^{2}}{4}\\
\frac{2bx+2ax}{2} &= \frac{\frac{5a^2}{4}}-\frac{{5b^2}{4}}{2}\\
bx + ax &= \frac{5a^2}{8} - \frac{5b^2}{8}
\end{align*}

\end{document}