\documentclass[11pt]{article}
\usepackage{amsmath,amssymb,amsthm} %these packages let you use standard math symbols etc.
\newtheorem{theorem}{Theorem}
\newtheorem{exercise}{Exercise}
\newtheorem{definition}{Definition}
\newcommand{\ZZ}{\mathbb{Z}}
\title{My Homework}
\author{My Name}
\date{}
\begin{document}
\maketitle %this is what makes the title from the data above
\section*{Trappe-Washington, Chapter n, Exercise m}
Your text goes here. Here's an example displayed equation
\[
\mathcal{S} = \left\{ \begin{pmatrix} a & b \\ c & d \end{pmatrix} : a,b,c,d \in \ZZ \right\}
\]
and here's another
\[
3 \equiv 7 \pmod 4.
\]
In a paragraph, you might latex `mod' a different way: for example, notice the difference here: $3 \equiv 7 \bmod 4$. Look up symbols you don't know at {\tt detexify.kirelabs.org}.
Here's an example theorem.
\begin{theorem}
There are infinitely many primes.
\end{theorem}
\begin{proof}
The number $2$ is certainly prime (it is divisible only by $1$ and itself), so there is at least one prime.
Suppose, for a contradiction, that there are only finitely many, say $n$ of them, and list them as follows:
\[
p_1, \ldots, p_n.
\]
Then consider the integer
\[
N = p_1 p_2 \cdots p_n + 1
\]
which has a remainder of $1$ when divided by any of the $p_i$. Therefore it is not divisible by any of the $p_i$. But it is certainly greater than $1$ and hence divisible by some prime, which must not be in our finite list. By this contradiction, the theorem is proved.
\end{proof}
\section*{An exercise for you}
Here's a definition from class.
\begin{definition}
Let $a, b \in \ZZ$, where $a \neq 0$. We say that \emph{$a$ divides $b$} (and write $a \mid b$), if there exists an integer $k$ such that $b = ak$.
\end{definition}
Do the following exercise:
\begin{exercise}
Here's a statement of a potential theorem: ``Let $a,b \in \ZZ$ be non-zero. If $a \mid b$ and $b \mid a$, then $a = b$.'' This theorem is actually (slightly?) false. Try to prove it and in doing so, discover the problem and correct it. Latex a corrected theorem and proof, written very carefully. I will grade you on how nicely Latex'd it is, and on your exposition. Be neither too brief, nor too wordy. Don't include extraneous information, but don't just include equations, either. Please \emph{do} use scrap notes before you start Latex'ing.
\end{exercise}
\end{document}