[Tex/LaTex] \begin{align*} … \end{align*} is not working

align

I am getting an error in the following code on my LaTeX template. But the same code is running on MathJax.

\begin{align*}
    1. {\log_{a}a} = 1\  \mbox{log of a number to the same base is 1}

\end{align*}

Please help.

Best Answer

The error is due to the blank line, but also do not use align or align* for 1-line equations with no alignment, the vertical spacing will be wrong. If the 1. is not mathematics but part of an enumerated list then perhaps

\begin{enumerate}
\item $\log_{a}a = 1$ log of a number to the same base is $1$
\end{enumerate}