\documentclass{article} 

% anything between a % and the end of the line is comment, ignored by the
% compiler.


\author{Sam Nelson}

\title{Sample \LaTeX Document}

\date{} % this leaves the date blank; LaTeX automatically includes the current
        % date otherwise

\begin{document}

\maketitle % use this to have LaTeX automatically make a title/author portion
           % You can also do this manually 

Basics: A blank line starts

a new paragraph. \LaTeX \ automatically indents each paragraph. To go
into math mode within a paragraph, use dollar signs: $ax^2+bx+c=0$. To make 
a centered equation, use backslash-square-brackets:

\[ax^2+bx+c=0.\]

To make a list of equations, use the ``equation array'' environment:
\begin{eqnarray*}
ax^2+bx+c & = & 0 \\
x^2+\frac{b}{a}x +\frac{c}{a} & = & 0 \\
\end{eqnarray*}

Here the \&s separate columns in a row and the double backslash ends
a row. This is also how to typeset a matrix:
\[
\left[\begin{array}{rrrr} % one 'r' for each column
1 & 2 & 3 & -1 \\
2 & 0 & 2 & 1 \\
\end{array}\right]
\]



\end{document}
