\documentclass{article} %this is the preamble

\begin{document} %this is the body

Hello world!
Let $f(x)$ be defined by the formula $f(x)=3x^2 + x - 1$ which is a polynomial of degree 2.
%Use dollar signs to enclose an expression in INLINE MATH MODE.

Hello world! 
Let $f(x)$ be defined by the formula $$f(x)=3x^2 + x - 1$$ which is a polynomial of degree 2.
%Use double dollar signs to enclose an expression in DISPLAY MATH MODE.
 
\end{document}
