# Why does \left break TeX rendering?

The following TeX breaks rendering, but if I remove the \left function, the TeX renders (but without the stretchy brace). I'm helping a colleague and I'm too new to LaTeX and TeX to know how to approach fixing this.

\ \ \small{w_{1}[n] } = \left{
\begin{array}{ll}
1 & \ \ \small{n=0,1,...,12}\\
0 & \ \ \text{otherwise} \\
\end{array}

-
You are missing the matching \right. (an empty delimiter). Is this in a TeX document? –  egreg Nov 26 '12 at 16:28

You wrote \left{ <stuff>. TeX is trying to make <stuff> into a left delimiter because { opens a group. You probably meant to write \left\{ <stuff>.

Moreover, you probably should just be using the cases environment from amsmath instead.

-
Combine your answer with the egreg's comment above to get the pretty perfect answer! ;-) –  Paul Gaborit Nov 26 '12 at 17:03
I edited the TeX to this, but it still doesn't render. \small{w_{1}[n] } = \left\{ \begin{array}{ll} 1 \ \ \small{n=0,1,...,12}\\0 \ \ \text{otherwise} \\\ \end \right {array} –  pwilkins Nov 26 '12 at 18:56
@pwilkins \right also needs to be followed by a delimiter, e.g., \right\}. If you don't want a right delimiter use \right. (including the dot!). –  cgnieder Nov 26 '12 at 19:11
Bingo! That's turned the trick. The original TeX didn't have the trailing brace so the 'dot' fixed it. Here's my working version: $$\small{w_{1}[n] } = \left\{ \begin{array}{ll} 1 \ \ \small{n=0,1,...,12}\\0 \ \ \text{otherwise} \\\ \end{array}\right.$$ –  pwilkins Nov 26 '12 at 19:11

Your use of the \small directive when TeX is in math mode can't work. (Moreover, the command \small is a switch and doesn't take an argument.) I suggest that you set up the MWE as follows instead:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$% begin display math w_{1}[n] = \begin{cases} 1 & n=0,1,\dots,12\\ 0 & \text{otherwise} \\ \end{cases}$ % end display math
\end{document}


-
I believe that the question refers only to MathJax; where \small has no effect, in my experiment. –  egreg Nov 26 '12 at 23:52
@egreg - in TeX's math mode, executing \small won't have an effect either, right? –  Mico Nov 27 '12 at 4:39
It issues a warning: `LaTeX Font Warning: Command \small invalid in math mode' –  egreg Nov 27 '12 at 7:23