Not every conceivable mathematical operator have been defined in advanced. So you neeed to define it. Here is my usual methord
\usepackage{mathtools}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
Then \abs{x} = \lvert x \rvert, \abs*{x}=\left\lvert x \right\rvert and say \abs[\big]{x} = \bigl\lvert x \bigr\rvert.
In recent projects I've extended it a bit with
\usepackage{mathtools,etoolbox}
\DeclarePairedDelimiterX{\abs}[1]{\lvert}{\rvert}{\ifblank{#1}{{}\cdot{}}{#1}}
Then one can write \abs{}: \mathbb{R}\to[0,\infty) and \abs{} will added a centered dot to indicate an empty argument
Addition: Why is not a good idea to always autoscale, this image says it all

\absmacro is not predefined by most math-related packages I'm familiar with. However, it may easily be defined via\newcommand{\abs}[1]{\left\lvert#1\right\rvert}. This definition assumes implicitly that the macro will be used in math mode only. – Mico Aug 24 '12 at 15:20\left/rightis not a good idea in general, see my answer. – daleif Aug 24 '12 at 15:22\abscommand was defined in an example file distributed with ams document classes. unfortunately, instead of reading the instructions and using the designated template files to launch documents, many people start with the example file, rip (some) things out and put in their own material. this has led to many problems, and not just for authors. ams author packages are being revamped, and the definition of\abswill go away. it was only an example. – barbara beeton Aug 24 '12 at 17:26