When I enter the following:

R(\theta )=\left[ \begin{ matrix } cos\theta & 0 & sin\theta \\ 0 & 1 & 0 \\ -sin\theta & 0 & cos\theta \end{ matrix } \right]

Here's a screen capture of the output: http://s9.postimage.org/4x9ayhov3/equation.png.

All the elements are concatenated as one single line, i.e. & and \\ are ignored.

The expected output should be: http://s13.postimage.org/b7glvwvuv/equation2.png.

Hope to get some help here. Thanks!