I would like to explicitly write out a n x n matrices in my paper, but once n \geq 11, I get compiling errors and it refuses to print the matrix. Here is what I have:
\documentclass{standalone}
\usepackage{amsmath,mathtools,amsthm}
\usepackage{array}
\begin{document}
$$\begin{bmatrix*}[r]
1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
-\fract{1}{2} & -\fract{1}{2} & \fract{1}{2}\sqrt{2} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2} & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2}& 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2} & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2} & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2} & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2} & \fract{-1}{2}\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1
\end{bmatrix*} $$
\end{document}
I do not see any errors for this 11 x 11 matrix. However, when I type this in a blank standalone document, I get an error that says: "Missing $ inserted. $$\begin{bmatrix*}[r]"
Is there another way to write an 11 x 11 (or larger) matrix so that it compiles? Or is it impossible to type matrices this large into LaTeX? (If it helps, I am using writelatex.com to compile my thesis.)

MaxMatrixCols. Its default value is10. If you need, say, 15 cols, issue the instruction\setcounter{MaxMatrixCols}{15}. (See also footnote 2 on page 10 of the user guide of the amsmath package.) – Mico Nov 18 '14 at 19:08\fractcommand; I assume you meant to write\frac. Similarly, there's nobmatrix*environment; trybmatrixinstead. The use of$$to enter and exit displaymath mode in a LaTeX document is deprecated; see Why is\[ ... \]preferable to$$ ... $$? for more information on this subject. Finally, you're getting the error message about the missing$because you're trying to use thestandalonedocument class without setting the optionpreview. – Mico Nov 18 '14 at 19:15\frac, and not\fract. I'm glad you pointed it out.
– Student4Life Nov 18 '14 at 19:31bmatrix*allows me to align right[r]or left[l]. If I usebmatrix, then some how it does not understand that I want a specific alignment. It will think[r]is in the first row first column and it will do a default center alignment.previewoption you mentioned: for future reference, how might I add that? – Student4Life Nov 18 '14 at 19:32\documentclass[preview]{standalone}. About thebmatrix*environment: You're absulutely correct, it does exist (as it's defined in the themathtoolspackage). – Mico Nov 18 '14 at 19:35