I'm new to the field of statistics. While reading a book, I came across some symbols or code-like text (shown below) which I was not able to interpret. I tried Google, but it couldn't help either. I remember seeing similar text in this site and so I'm posting this question here. What is this text and how to read this? Please give some pointers to understand this kind of text.

\mbox{output} & = & \left\{ 
0 & \mbox{if } \sum_j w_j x_j \leq \mbox{ threshold} \\ 
1 & \mbox{if } \sum_j w_j x_j > \mbox{ threshold} 
\end{array} \right. \tag{1}

Please feel free to edit the question or move it the right place if this is not the right place to ask.

  • $\begingroup$ I just edited the formatting in your question... but now that I re-read it I think I may have answered the question by doing it... Maybe you just wanted to know what $\LaTeX$ is? $\endgroup$
    – nico
    Commented Mar 4, 2014 at 7:26
  • $\begingroup$ @Glen_b: note that the original question had some (unformatted) LaTeX in it... as said in my previous comment maybe I should not have edited it... waiting for the OP to explain if it's a problem of math or not... $\endgroup$
    – nico
    Commented Mar 4, 2014 at 7:29
  • $\begingroup$ this is the book from where I copy pasted that code neuralnetworksanddeeplearning.com/chap1.html $\endgroup$
    – StrikeR
    Commented Mar 4, 2014 at 7:34
  • $\begingroup$ StrikeR, that all renders properly for me (it looks like mathematics not LaTeX code). My guess is you're blocking javascript in some way (I run noscript myself and have encountered the problem many times, so that's why I'm guessing that's your problem with that page) $\endgroup$
    – Glen_b
    Commented Mar 4, 2014 at 7:36
  • $\begingroup$ @StrikeR: do you see those as code such as \begin{eqnarray} or do you actually see some mathematical notation? In the former case you should probably check you have JavaScript running correctly in your browser. That site (as this one) uses a JS engine called MathJax to render LaTeX code into math. $\endgroup$
    – nico
    Commented Mar 4, 2014 at 7:37
  • $\begingroup$ @Glen_b I have checked that link opening in other computer and it is being displayed in the form of mathematical formulae instead of this code. So, it must be the javascript problem, I'll try to look into that. And I rolled back the question as you asked. $\endgroup$
    – StrikeR
    Commented Mar 4, 2014 at 8:16

1 Answer 1


Just copy the text on this website in the textfield without formatting it as code and you will see that it renders as:

\begin{eqnarray} \mbox{output} & = & \left\{ \begin{array}{ll} 0 & \mbox{if } \sum_j w_j x_j \leq \mbox{ threshold} \\ 1 & \mbox{if } \sum_j w_j x_j > \mbox{ threshold} \end{array} \right. \tag{1}\end{eqnarray}

or as a graphic:

enter image description here

Hence, you simply need to add it into a online or offline LaTeX converter.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .