Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there a mathematical symbol that means "For every element"? I want the meaning to have similar function as an iteration, say for loop.

share|improve this question
What about the "for all" quantifier, i.e. $\forall$? –  dtldarek Jun 19 '12 at 14:15
I don't think that counts since it takes all elements at once and is not iterable. –  drum Jun 19 '12 at 14:16
@drum: If I understand your last comment, no; unless you happen to have some enumeration indexed by $\mathbb{N}$, in which case the usual way of writing it is "for $i=1,2,3,\ldots$" –  Arturo Magidin Jun 19 '12 at 14:17
In writing, you'll probably be better off being clear and using words, not symbols. –  lhf Jun 19 '12 at 14:20
Your question would be much clearer if you gave an example of an actual use. Maybe you are looking for induction? E.g. "By induction over $i\ge 2$, define $a_i=a_{i-1}+a_{i-2}$." This applies to any well-ordered set. –  Generic Human Jun 19 '12 at 15:32

4 Answers 4

up vote 3 down vote accepted

From your comments, it seems that you want to take the elements of your index set in a specific order, as in an iteration.

There is no single symbol for that; the general shorthand only works when the index set has order type $\omega$, that is, it is indexed by $\mathbb{N}$, in which case the standard way of signaling this would be "for $i=1,2,3,\ldots$".

share|improve this answer

This should work.

$\forall x\in A\cdots$

share|improve this answer
Just to make sure I follow, this means something along the lines of "for all x containing member A", right? –  Lemony-Andrew Apr 16 at 5:45
For all x in A. You have it backwards. –  ncmathsadist Apr 16 at 13:21

I still think the universal quantifier is the answer you are looking for.

From the wording you use e.g. "loop" and "iteration", I infer that your confusion might be coming form the fact that in mathematics there are no variables only constants (here I using the meaning from computer science). For example when you define $x = 2$, even if mathematician would say it is a variable, in fact (in computer science sense) it is a constant: you set $x$ only once, and afterwards it does not change. If it would, then we would have a contradiction i.e. $x = 2 \land x \neq 2$ (please note, that if there are other $x$-es in the text, it just means that those are different constants, but with the same name).

So, when computer scientist wrote

for i from 2 to n do 
    a[i] := a[i-1] + a[i-2]

then mathematician would write $\forall i \in \{2,\ldots,n\}.\ a_i = a_{i-1} + a_{i-2}$. The order does not matter, $a_i$-s are constants that are defined by such recursive formula and that's it. You might not know how many solutions there are (none, single, many?), but usually you do if the formula is simple enough. You don't care how to compute it, how much time would it take or worry if you have enough memory to calculate it--those problems are just uninteresting :-)

Welcome to mathematics!

P.S. Naturally, there are domains of mathematics (notably theoretical computer science :D) in which you do care about such things, I am just teasing you ;-)

share|improve this answer

The very concept of "doing something in some order" doesn't really make sense in mathematics. Things are defined once and for all, the whole set exists "all the time". This has the great advantage that there is no ambiguity: "do you mean, the variable at position $n$ before or after we looped past it?"

If you come from imperative programming, you may be surprised that it's possible to do any useful stuff when you're not allowed to modify something after its definition. But it's quite possible – also in programming! What you could write in C as

int v[14];
v[0] = first_value;
for(int i=1; i<14; ++i)
  v[i] = function_for_next(v[i-1]);

can also be written, without explicit mention of an "order" in which the set is traversed, as recursive buildup of e.g. a linked list. In Haskell,

v = vBuild 0 firstValue
     where vBuild 14 _ = []
           vBuild i lastValue
               = lastValue : vBuild (i+1) (functionForNext lastValue)

or simply

v = take 14 $ iterate functionForNext firstValue

This also works for arbitrarily more complicated examples, in fact you only need a very simple notational system to calculate anything that can be calculated at all. And in mathematics, you're usually not so much interested in how to calculate results (so it's not a problem if some calculations are a bit less efficient without explicit state, mutable variables, iterations etc.), but it's always very important that expressions aren't ambiguous so you can prove various properties.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.