[Tex/LaTex] “Illegal character in array arg”

arrays

Beginner here, I have been trying to use Overleaf after writing on ShareLaTex but the text isn't being correctly read. This is the original code:

\left\{
\begin{array}{11}
  \frac{x^2+2x}{x+1} \geq 0 \\
  x > -1 \\
\end{array} 
\right.

And this is the error I get:

LaTeX Error: Illegal character in array arg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...                                              

l.43 \begin{array}{11}

What did I do wrong?

Best Answer

Your code works in the following way (see Troy's comment)

\documentclass{article}
 \begin{document}
\[
\left\{
\begin{array}{l} % not \begin{array}{11}
  \frac{x^2+2x}{x+1} \geq 0 \\
  x > -1 \\
\end{array} 
\right.
\]
\end{document}

but it is better:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\left\{
\begin{aligned}
  \frac{x^2+2x}{x+1} &\geq 0 \\
  x &> -1 \\
\end{aligned} 
\right.
\]
\end{document}