# How to add space in the mathematical mode of latex

After writing some mathematical expressions, I want to add space between comment and expression.

E.g.

\begin{align*}

f(x) &= x^2-2x+1 (it's a comment) \\

\end{align*}

The above latex code does not put space between "(it's a comment) " and function?  How can I add space?

by (51.1k points)

You can use \quad for single spacing and \qquad for double spacing.

For single spacing

\begin{align*}
f(x) &= x^2-2x+1 \quad (it's a comment) \\
\end{align*}

for double spacing

\begin{align*}
f(x) &= x^2-2x+1 \qquad (it's a comment) \\
\end{align*}