\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}

\renewcommand{\qedsymbol}{$\blacksquare$}
\newcommand*{\QEDA}{\hfill\ensuremath{\blacksquare}}%

\begin{document}

\begin{proof}
Since $x_k$ is only conditionally summable, this means that the
sequence $s_n = \sum\limits_{k=1}^{n}|x_k|$ is not convergent. Note
that $s_n$ is a monotone increasing sequence that is not convergent,
hence it must be unbounded. But
$\sigma_n^+ = \sum\limits_{k=1}^{n}x_k^+$ and
$\sigma_n^- = \sum\limits_{k=1}^{n}x_^-$ are all subsequences of
$s_n$, and they are monotone increasing as well. Thus, they must me
also unbounded and
$\sum\limits_{k=1}^{\infty}x_k^+ = \infty = \sum\limits_{k=1}^{\infty}x_k^-$.
\end{proof}

\end{document}


I get the following error when I try to run my code, but I can't really find anything wrong with my code.

! Missing { inserted.
^
l.19   $\sigma_n^- = \sum\limits_{k=1}^{n}x_^ -$ are all subsequences of
?

• x_^- is wrong. You missed the k letter, i.e. x_{k}^- (otherwise the sum over the k index would not really be useful.) Apart from other issues, please use logical markup for such formulas – user31729 Feb 19 '17 at 22:53
• Thank you for the comment. What is logical markup? – user3000482 Feb 19 '17 at 22:58
• you should not be using \limits in inline math, it defeats most of the point of the inline style, and makes the text unreadable as a paragraph, as can be seen in the image in Au101's answer. – David Carlisle Feb 19 '17 at 23:35
• see tex.stackexchange.com/a/323375/1090 for more examples of using displaystyle (effectively what you get with \limits) in inline math – David Carlisle Feb 19 '17 at 23:37
• Perhaps tex.stackexchange.com/questions/301672/… will also be of interest? – Au101 Feb 20 '17 at 0:06

It's worth noting that in this case, the error message tells you where the problem is in your code

! Missing { inserted.
^
l.19   $\sigma_n^- = \sum\limits_{k=1}^{n}x_^ -$ are all subsequences of
?


The line is broken at the point where LaTeX ran into problems.

x_^- is your problem, although I think your troubleshooting is perhaps not helped by not putting braces around your subscripts and superscripts. This is an issue that comes up from time-to-time on here and I often recommend that you always use braces, even in the case of single-character sub-/superscripts, i.e.: x_{k}. This is a bit more of a pain to type it is true, and it could be argued that the braces are unnecessary clutter. On the other hand, it does make things easier for me to parse visually and you will never have the problem of forgetting to put braces around the superscript when you realise that x^n should have been x^{n + 1}. It's a good habit to get into and I think x_{k}^{+} is more immediately meaningful than x_k^+. To each their own, but just something to think about.

Anyway, if we apply the correction Christian Hupfer suggests in the comments:

$\sigma_n^- = \sum\limits_{k=1}^{n}x_k^-$ are all subsequences of


As in:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}

\renewcommand{\qedsymbol}{$\blacksquare$}
\newcommand*{\QEDA}{\hfill\ensuremath{\blacksquare}}%

\begin{document}

\begin{proof}
Since $x_k$ is only conditionally summable, this means that the
sequence $s_n = \sum\limits_{k=1}^{n}|x_k|$ is not convergent. Note
that $s_n$ is a monotone increasing sequence that is not convergent,
hence it must be unbounded. But
$\sigma_n^+ = \sum\limits_{k=1}^{n}x_k^+$ and
%% problem line below %%
$\sigma_n^- = \sum\limits_{k=1}^{n}x_k^-$ are all subsequences of
%% problem line above %%
$s_n$, and they are monotone increasing as well. Thus, they must me
also unbounded and
$\sum\limits_{k=1}^{\infty}x_k^+ = \infty = \sum\limits_{k=1}^{\infty}x_k^-$.
\end{proof}

\end{document}


All is well. Although I would urge you to move away from your pervasive use of \limits. In-line math mode sets the sub- and superscripts to the side for a very good reason, and that is preserving consistent line-spacing, with the appropriate amount of white space between the lines.