[Tex/LaTex] Difference between equation and equation* enviroment

environmentsequationsmath-mode

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.

Best Answer

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