How to show range in equation for multiple variables? I'd like to show in the below equation that variables $i$ and $j$ need to be chosen from the range $1$ to $n$, but I am not sure how to properly show this. Can somebody please show me the proper notation for this?

$y=f(i,j) \qquad i,j = 1,...,n$

Variables $i$ and $j$ are integer and can not be equal to each other. Should I use $\in$ sign instead?
Thank you
 A: My advice: Don't force mathematical texts to be formal and contain more symbols than words.

We have
  $$f(i,j) = 0$$
  for all pairs of distinct integers $1\le i,j\le n$.

A: You can use the following notation
$$
y=f(i,j),\;\;\; 1 \leq i,j \leq n
$$
Also, if you want to specify that i and j are integers you can specify it with function domain and codomain:
$$
f: \mathbb{N} \to \mathbb{N} 
$$
A: For example, you could say

$y = f(i,j)$ for integers $1 \leq i,j \leq n$ with $i \neq j$

or (which is what I would use)

$y = f(i,j)$ for distinct $i,j \in \{1,\dotsc,n\}$

Note that if you are not defining $y$ for every viable pair $(i,j)$, you should add some after for.

Since you seem worried that you can put text only in inline formulas, the following is LaTeX code would insert my second example as a displayed formula
\[
  y = f(i,j) \quad \text{for distinct } i,j \in \{1,\dotsc,n\}
\]

or you could always write the additional condition right after the formula
\[
  y = f(i,j)
\]
for distinct $i,j \in \{1,\dotsc,n\}$


Note: Even if you could write this only in symbols, you should avoid it, especially if you're writing for publication. Professional mathematicians don't write with too many symbols because that would make the text look garbled and hard to understand.
