I am new to TEX world . I am now working on thesis in TEX . I have the following code to show a table .
\begin{center}
\begin{tabular}{ | l | c | r | l | c | r| l | c | }
\hline
\textbf{Basic} & \textbf{x_1} & \textbf{x_2} & \textbf{x_3} & \textbf{s_1} & \textbf{s_2} & \textbf{s_3} & \textbf{b} \\ \hline
s1 & 2 & 1 & 0 & 1 & 0 & 0 & 10 \\ \hline
s2 & 1 & 2 & -2 & 0 & 1 & 0 & 20 \\ \hline
s3 & 0 & 1 & 2 & 0 & 0 & 1 & 5 \\ \hline
Z & -2 & 1 & -2 & 0 & 0 & 0 & 0 \\ \hline
\hline
\end{tabular}
\end{center}
But TexMaker IDE shows the following error .
! Missing $ inserted.<inserted text>$ \textbf{Basic} & \textbf{x_1}
A snapshot of my error is provided below :

Here is my code :

Where is the error ?
\textbf{$x_1$}but then you need math bold fonts. – percusse Jun 18 '14 at 11:24_is a math-char. I would suggest you to do: $\mathbf{x_1}$ for thexs. It however, requiresamsmath. Also all numbers should be typeset in$$to get mathematical fonts, see http://tex.stackexchange.com/questions/185193/what-is-the-necessity-of-around-numbers – nickpapior Jun 18 '14 at 11:25\textsubscriptfrom thesubscriptpackage (in the LaTeX bundlefragments). – Bernard Jun 18 '14 at 11:55