6

I am pretty new to Latex and I was wondering what is the difference between:

\begin{equation}
\end{equation}

and

\begin{equation*}
\end{equation*}

I am always using the first one, but in what instance would you use the latter, or is there any difference between them at all?

I couldn't find any answers of this question on this forum.

1
  • 10
    The former adds an equation number, the latter doesn't.
    – egreg
    Apr 22, 2020 at 8:52

1 Answer 1

15

The non-starred version provides a numbered equation, which you can easily refer to with \label and \ref. The starred version does not provide the equation number, while keeping the same format, and has an equivalent in \[ ... \].

\documentclass{article}

\usepackage{amsmath}

\begin{document}

The non-starred version provides a numbered equation, which you can easily refer to with \verb^\ref^, like so: \ref{euler}
\begin{equation}
    e^{i\pi} + 1 = 0
    \label{euler}
\end{equation}
The starred version does not provide the equation number, while keeping the same format.
\begin{equation*}
    e^{i\pi} + 1 = 0
\end{equation*}
Unnumbered, displayed equations can also be obtained with \verb^\[ ... \]^.
\[
    e^{i\pi} + 1 = 0
\]

\end{document}

enter image description here

3
  • 1
    Very good explanation :-)
    – Sebastiano
    Apr 22, 2020 at 11:49
  • 3
    It might be added that \[ ... \] is equivalent to equation*, but rather than using that shorthand, it may be desirable to use the longer form to make it easy to decide later to number an equation for reference, so that the only change needed would be to remove the * and add a \ref. Apr 22, 2020 at 14:33
  • Thanks for the suggestion @barbarabeeton! I've updated the answer accordingly Apr 22, 2020 at 14:40

You must log in to answer this question.

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