! Undefined control sequence. why

Noob here: first time using Latex and can't seem to write one line of code without getting ! Undefined control sequence. error. Here is the line it has a problem with:

$$\left \{ x\in\mathbb{Z}:-2\leq x< 7 \right \}$$


And here is the rest of my document for context:

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{amstext}
\begin{document}

\section{Chapter 1: Sets}
\subsection{Introduction to Sets}
Write each of the following sets by listing their elements between braces:
\begin{enumerate}

\item Problem 3
$$\left \{ x\in\mathbb{Z}:-2\leq x< 7 \right \}$$

\end{enumerate}

\end{document}

• Try to add the package amssymb.
– Fran
Apr 4 '15 at 22:00
• Welcome to TeX.SX! When reporting errors it is always best to post the complete error, that can make it easier to understand what is going on. (Your example makes it easy to figure what the problem is though, and it is a fairly common one. See e.g. tex.stackexchange.com/questions/38769/…) Apr 4 '15 at 22:16

You forgot to use amssymb. Also, you are better off using $ ... $ rather than . In general, using LaTeX is not for the faint of heart; the challenges ahead of you are much greater.

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{amstext}
\usepackage{amssymb} % Missing in your example.
\begin{document}
\section{Chapter 1: Sets}
\subsection{Introduction to Sets}
Write each of the following sets by listing their elements between braces:
\begin{enumerate}
\item Problem 3 $\left \{ x\in\mathbb{Z}:-2\leq x< 7 \right \}$
\end{enumerate}
\end{document}


• The white space in the document had me for a sec! Oct 14 at 14:32