3

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.P.
  • 9,728
NESHOM
  • 205
  • 3
    I would just add $i \neq j$ after $i,j = 1, \dots, n$. – Calle Apr 02 '15 at 14:49
  • @NESHOM Could you clarify what you are writing? Certainly $y$ can't be $f(i,j)$ for all those pairs $(i,j)$, except this $f$ is constant on that set of indices? – Christoph Apr 02 '15 at 15:09
  • @Christoph basically I have a long equation that works for any pair of j and j belonging to the range from 0 to n. – NESHOM Apr 02 '15 at 15:27
  • How about $|{1,\dots,n}\setminus{i,j}|=n-2$ ;-) It implies everything you have in your situation. – Stefan Hamcke Apr 02 '15 at 15:41
  • One thing I would like to clarify is whether $1,2,..,n$ or $1,2,\dots,n$ is more standard. I have heard the latter as the standard, but I suspect this is outdated. See Steven C. Howell's comment to https://math.stackexchange.com/a/543145/120721 – Cyriac Antony Aug 19 '19 at 09:48

3 Answers3

5

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$.

Christoph
  • 24,912
  • thanks, but how about if I have more than one constraint that can't be presented inline with text. This is the reason I'd like to have them in front of the equation. – NESHOM Apr 02 '15 at 15:38
  • Please try make a precise example of what you want to write. Style choices heavily depend on the exact circumstances. – Christoph Apr 02 '15 at 15:41
  • Basically I have three constraints 1) $i,j=1,...,n$ 2) $i \neq j$ , and 3)$L_j \neq L$. So I don't think it is appropriate to show them all inline. – NESHOM Apr 02 '15 at 15:52
  • I don't think writing "for distinct integers $1\le i,j\le n$ such that $L_j\neq L$" is too bad. – Christoph Apr 02 '15 at 15:54
  • +1 for "Don't force mathematical texts to ..... contain more symbols than words". Less symbols improve readability a lot. – Cyriac Antony Aug 19 '19 at 09:40
2

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} $$

  • Thanks, but i and j can't be float numbers like 1.5. They are integer. How can I show this as well? – NESHOM Apr 02 '15 at 15:26
  • @NESHOM: If it is clear from the context that $i,j$ need to be integers, then it's fine. This is the case, for example, if you previously defined $f$ as a function on pairs of integers. – A.P. Apr 02 '15 at 15:44
  • Well, you can specify that $f: \mathbb{N} \to \mathbb{N} $ – Kirill Dubovikov Apr 02 '15 at 15:46
2

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.

A.P.
  • 9,728
  • thanks, these seem to be inline equations, how about a numbered equation (with no text)? – NESHOM Apr 02 '15 at 15:47
  • With LaTeX can add text in displayed equations too: the macro is \text. If you really wish to not use it, then you should do like Christoph suggests and write the text either just before or just after the equation. This is the preferred form. – A.P. Apr 02 '15 at 15:52
  • You are right if the equation is as simple as y=f(i,j), but my equation is already more than half page width, and imagine that most of the journals are in two column format, so I am trying the make it as short as possible in width. – NESHOM Apr 02 '15 at 15:58
  • @NESHOM Yet another reason to just write your conditions in the text! – Christoph Apr 02 '15 at 15:59
  • I prefer the former because I think using belongs to symbol makes it less readable. I agree people read it as `in', but this translation is a small inconvenience in reading. – Cyriac Antony Aug 19 '19 at 09:44