In the advanced algebra post I recently tried to use latex to express mathis using 3 x 3 matrices and had problems

Here was my attempt to write the 3 x 3 identity matrix - I put the following code in between $\displaystyle and $

\left(\begin{array}{ccc}1&0&0\\0&1&0\\0&0&1\end{ar ray}\right)

Can someone please tell me my error here?

Further, does anyone know of a brief and easy to use document describing how to present matrices in latex?

Peter