What is meant by a function on a set. This question was probably asked many times, but i couldn't find by searching. And i figure that i'll get an answer faster then by searching.
We we say :

functions on M

Does that mean that the function maps from $M$ to $M$, that it's image lies in $M$, or that it's arguments are in $M$ or is it very context dependent ?
 A: In general, it means "functions with domain $M$, but the codomain could be anything."
Often, however, there's context established early in some document, as in, "When we speak of functions in this topology book, we always mean continuous functions." You need to be certain that you're aware of such context. And even the notion of equality of functions can be context-dependent -- sometimes analysts talk about functions being equal when they're equal almost-everywhere.
On a slightly-related note, the sets involved in defining a function have varying names used for them. When you write $f(x)$, the element $x$ is supposed to be in the domain of $f$; the resulting value, $f(x)$ is supposed to be in a set that gets called two different things: some folks call it the "range" (this was popular in the 1960s, when I was learning this stuff), others called it the codomain. If $f$ has domain $D$, we can form the set $S = \{f(x) \mid x \in D \}$. This, too, has two names. Some folks call it the "range", and others call it the image. Because of the name-clash with the other use of "range", it's probably a good idea to stick with "codomain" and "image" and leave "range" out of it.
For a decent description of what a function really is, consider looking at Halmos's Naive Set Theory. When I say "what it really is", I mean "a set theoretic object that has all the properties that we want a function to have, so that we can use it as our notion of a function." There may be other equally good notions of functions that are equivalent to the one in Halmos, of course. Once you have one workable one, you can just go with it, and pretty soon forget the details and just use the properties that you were trying to model.
