# Error when typing Matrix and Binomial coefficients

New guy here, I am just trying to study LaTeX from the very beginning. I am using TexShop on a Mac, and now I am reading George Grätzer's Short Course.

Here's my question, when I type Binomial coefficients or Matrices in TexShop, I get an error. What's my problem?

This is my code

\documentclass[11pt, oneside]{article}
\usepackage{geometry}
\geometry{letterpaper}
%\geometry{landscape}
%\usepackage[parfill]{parskip}
\usepackage{graphicx}
%convert eps --> pdf in  pdflatex
\usepackage{amssymb}

\title{Brief Article}
\author{The Author}
%\date{}

\begin{document}
\maketitle
%\section{}
%\subsection{}

$\binom{ \frac{n^{2} - 1}{2} }{n + 1}$

$\begin{matrix} a + b + c & uv & x - y & 27\\ a + b & u + v & z & 134 \end{matrix}$

\end{document}
-
Add a % character in that line where you state 'convert eps --> ' etc. That is a comment line –  Christian H. Feb 17 at 4:14
@Christian Dear Sir, could you be a little more specific? –  Ave Maleficum Feb 17 at 4:14
Sorry, I pressed the Enter key too fast... –  Christian H. Feb 17 at 4:15
@Christian No,that's a mistake, in the origin TexShop, it has % –  Ave Maleficum Feb 17 at 4:19
I meant, it should be a comment line. –  Christian H. Feb 17 at 4:20

Add the line \usepackage{amsmath} in the preamble. amssymb is meant for special symbols.

\documentclass[11pt, oneside]{article}
\usepackage{geometry}
\geometry{letterpaper}
%\geometry{landscape}
%\usepackage[parfill]{parskip}
\usepackage{graphicx}
%                            convert eps --> pdf in  pdflatex
\usepackage{amssymb}

\title{Brief Article}
\author{The Author}
%\date{}

\begin{document}
\maketitle
%\section{}
%\subsection{}

$\binom{ \frac{n^{2} - 1}{2} }{n + 1}$

$\begin{matrix} a + b + c & uv & x - y & 27\\ a + b & u + v & z & 134 \end{matrix}$

\end{document}
-
Thank you, Sir, it works! By the way, I think they should tell a newbie to add this line in the first place. –  Ave Maleficum Feb 17 at 4:21
Perhaps you used an oldfashioned documentation or some illdesigned template; nevertheless, it is important, that it works now. –  Christian H. Feb 17 at 4:25
@AveMaleficum -- gratzer makes this recommendation: "Use the amsart document class for all your articles." (first steps in latex, p.xvi) amsart automatically loads amsmath and incorporates amsthm and amsfonts so the user has no need to load them explicitly. otherwise, amsart differs from article mainly in the structure of the front matter; the body of an article is, for all practical purposes, able to be switched between amsart and article with no requirements other than loading the aforementioned packages. –  barbara beeton Feb 17 at 14:17