# problem in equation begining [closed]

I wrote the code of the equation but i have an error while writing Jij, any help?

$$J_i_j = \left\{ \begin{array}{l l} \frac{1}{k}exp\left(-\frac{{||x_i - x_j||}^{2}}{{2a}^{2}}\right) \quad x_i is nearest neighbor of x_j,\\ 0 \quad \text{else} \end{array} \right.$$

-

## closed as too localized by Werner, Thorsten, Qrrbrbirlbel, Marco Daniel, Hendrik VogtApr 6 '13 at 7:10

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Use J_{ij}... – Werner Apr 6 '13 at 4:28
Hi, it is better to visit our chat room first. – kiss my armpit Apr 6 '13 at 4:29
Thanks alot, it worked – SMH Apr 6 '13 at 4:30

I have to use J_{ij} instead of J_i_j thanks to Werner.

-
 $$J_{ij} = % group subscript with braces \begin{cases} % use cases macro for piecewise functions \frac1K\exp % capital K, \exp, you don't have to type braces around single characters \left(-\dfrac{\|x_i - x_j\|^2} {2a^2}\right) % \dfrac for display fraction bigger ,\| for double |, less braces & x_i \text{ is nearest neighbour of } x_j,\\ % use & in cases mode, 0 & \text{else} % \text{} \end{cases}$$

-