% This is a template and examples file for LaTeX. It is not intended to be a 
% primer on LaTeX. For that, go to chapter 1 of "Math into LaTeX, 3rd edition,"
% by George Gratzer. It's available online at 
% http://www.ctan.org/tex-archive/info/mil/mil.pdf.
% It has a big gallery of typeset mathematical formulas that covers most of 
% what you'll need to know.

% You should choose one of the following opening lines for your document. The 
% first one just gives you a basic article style for your document.
\documentclass{article}
%\documentclass{amsart}
%\documentclass[12pt]{article}
%\documentclass[12pt]{amsart}
% The "amsart" document class looks a bit different from the "article" class, 
% and also includes a "proof" environment that can be useful.
% The 12pt option just makes the print bigger. If you use this in combination 
% with the "fullpage" package, below, then you get about the same amount of 
% information on a page as with the default page and font sizes.



% You should ALWAYS load these packages, unless you're creating a 
% non-mathematical document.
\usepackage{amsmath,amssymb,latexsym}
% These packages provide some useful fonts and environments.
\usepackage{mathrsfs,amsthm}
% Full page printing; recommended with the 12pt option in the opening line.
%\usepackage{fullpage}
% You may like the palatino font better than the default computer modern.
%\usepackage{palatino}

% You can create "theorem" environments with whatever sort of name you want. 
% The optional arguments here just affect how these environments are numbered 
% within the document. All "theorem" environments are numbered consecutively.
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{remark}[theorem]{Remark}

% User-defined commands are invaluable; these are just of few of mine.
\newcommand{\R}{\mathbb{R}}                  % real numbers
\newcommand{\C}{\mathbb{C}}                  % complex numbers
\newcommand{\Z}{\mathbb{Z}}                  % integers
\newcommand{\Q}{\mathbb{Q}}                  % rational numbers
\newcommand{\mx}[1]{\mathbf{#1}}             % name of matrix (or vector)
\newcommand{\inv}{^{-1}}                     % inverse
\newcommand{\norm}[1]{\left\| #1 \right\|}   % norm
\newcommand{\id}{\mathrm{id}}                % identity function
\newcommand{\conj}[1]{\overline{#1}}         % complex conjugate
\newcommand{\clos}[1]{\overline{#1}}         % closure (of a set)
\newcommand{\bdy}{\partial}                  % boundary (of a set)
\newcommand{\til}{\widetilde}                % the regular \tilde is too small
% You should use \renewcommand only sparingly; these are personal preferences 
% of mine for certain notation.
\renewcommand{\emptyset}{\varnothing}
\renewcommand{\Re}{\mathrm{Re}}
\renewcommand{\Im}{\mathrm{Im}}

\begin{document}

\title{Title of Your Document Here}
\author{Your Name Here}
\date{\today}  % can replace \today with a specific date, if desired.

\maketitle

\noindent
Here's what my user-defined commands do:
\begin{itemize}
\item $\R$, $\C$, $\Z$, $\Q$, $\emptyset$
\item $\mx{A}\inv$, $\norm{\mx{A}}$
\item $\id : \mx{x} \mapsto \mx{x}$
\item $\conj{z} = \Re(z) - i\,\Im(z)$  % the \, makes a small space
\item $\clos{X} = X \cup \bdy{X}$
\item Compare the previous two with $\bar{z}$ and $\bar{X}$; for complex 
conjugate, the ``bar'' command is all right, but it's too small for closure.
\item Compare $\tilde{x}$ and $\tilde{AB}$ with $\til{x}$ and $\til{AB}$.
\end{itemize}

See Remark~\ref{R:sampleremark}, below, about numbering theorem environments.

\begin{theorem}\label{T:samplethm}
This is Theorem~\ref{T:samplethm}.
\end{theorem}

\begin{corollary}\label{C:samplecor}
This is Corollary~\ref{C:samplecor}. It follows Theorem~\ref{T:samplethm}.
\end{corollary}

\begin{remark}\label{R:sampleremark}
Now you see the effect of numbering theorem environments consecutively. Doing 
so makes it easier to find them when you reference them elsewhere in a paper.
\end{remark}

In the ``amsart'' document class, you can also change the styles of various 
theorem environments; for example, if you don't want remarks italicized, but 
you do want to keep them in the numbering system. Ask me for more info.

Gr\"{a}tzer leads you pretty well through the labeling process (though maybe 
not in chapter 1; I don't remember). It's another invaluable feature of 
\LaTeX, and it's good to get in the habit of labeling almost everything, so 
that you can refer to it elsewhere in the paper without worrying about what 
the reference number will end up being. You can label equations, too, as in 
Equation~\eqref{E:sampleeqn} below.

\begin{equation}\label{E:sampleeqn}
S^1 = \left\{ 
      \begin{pmatrix} x \\ y \end{pmatrix} \in \R^2 \mid x^2 + y^2 = 1
      \right\}
\end{equation}

\end{document}
