# how to use math mode inside align* [closed]

why does this give an error?

\begin{align*}
$\sum_{i=0}^K n_{\text{i}} * P * 1000$
\end{align*}


why cant I use align* for my math formula which includes a summation?

-

## closed as too localized by zeroth, lockstep, Marco Daniel, egreg, cgniederMar 10 '13 at 19:09

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Remove the dollar signs. align already enters math mode. The dollar signs are for inline math. –  Peter Grill Mar 10 '13 at 6:16
Additionally, if your summation index i is used in the further formula, it's still a variable and should not be set in \text{i} but just as i. In this case especially (for math) to distinguish the variable i from the complex unit \text{i} - or as i prefer even \textrm{i}. –  Ronny Mar 10 '13 at 7:15

In addition to the comments above, the align and align* environments need the amsmath package. Here is a working example.

\documentclass{article}

\usepackage{amsmath}

\begin{document}
\begin{align*}
\sum_{i=0}^K n_i * P *  1000
\end{align*}
\end{document}


In most circumstances one would not use * for multiplatication, a blank is sufficient, or \times can be used instead for "emphasis". Also, your example contains no alignment point, so probably the ams environment equation* (for a single line) or gather* (if there are multiple lines) would be more appropriate.

-
Or \cdot for those who are used to those kind of things... :) –  zeroth Mar 10 '13 at 12:00
@zeroth Yes, that's a good alternative. –  Andrew Swann Mar 10 '13 at 12:01