Possible Duplicate:
Problem with defining shortcuts for TikZ matrices.
When I use the code below to draw a tikzpicture in the body of my document, it works just fine. However, when I define a command and try to use it, I get a Missing $ inserted error.
\documentclass[11pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{matrix, shapes, backgrounds}
\newcommand{\matrixa}{
\begin{tikzpicture}[>=latex]
\matrix (A) [matrix of math nodes,%
left delimiter = (,%
right delimiter = )] at (0,0) {%
\cdot & \cdot & \cdot \\
\cdot & \cdot & \cdot \\
\cdot & \cdot & \cdot \\
\\ };%
\end{tikzpicture}}
\begin{document}
\matrixa
\end{document}