I'm very surprised by these comments. Are there really books that define "range" so that f(X) can be a proper subset of the range of f? If you all have seen it, then I guess I have to believe it, but honestly, if it had been only two of you saying it instead of three, I would have assumed that you're both really drunk.
OK, I need to think this through to see if I can make sense of it. I will write down my thoughts. (Sorry, this will be a long post, but it will at least be useful to everyone who wants to understand the definitions of the term "function").
The idea behind the definition of "function" is that we should be able to think of a function f:X→Y as a rule that takes each member of the set X to exactly one member of the set Y. But to properly define the term in the framework of ZFC set theory, we must specify which
set f is. Since there are many sets that we can think of as
representing a rule like that, there are also many ways to make the concept of "function" (that we already understand on an intuitive level) mathematically precise. These are two similar, but not equivalent, ways to make the concept mathematically precise:
Definition 1
A set ##f\subset X\times Y## is said to be a
function from X into Y, if
(a) For all ##x\in X##, there's a ##y\in Y## such that ##(x,y)\in f##.
(b) For all ##x,x' \in X## and all ##y\in Y##, if ##(x,y)\in f## and ##(x',y)\in f##, then ##x=x'##.
X is said to be the
domain of f. Y is said to be a
codomain of f. f is also called the
graph of f. So the function and its graph is the same thing.
Definition 2
A triple ##f=(X,Y,G)## is said to be a
function from X into Y, if
(a) For all ##x\in X##, there's a ##y\in Y## such that ##(x,y)\in G##.
(b) For all ##x,x' \in X## and all ##y\in Y##, if ##(x,y)\in G## and ##(x',y)\in G##, then ##x=x'##.
X is said to be the
domain of f. Y is said to be the
codomain of f. G is said to be the
graph of f.
If we use definition 1, then a function has many codomains. If f is a function from X into Y and Y is a subset of Z, then Z is also a codomain of f. If we use definition 2, each function has exactly one codomain.
Definition 1 is slightly simpler, and seems to be the more popular one in the literature. It also seems desirable to have a definition that only admits
one function that (for example) "takes every real number to its square". If we use definition 2, there are infinitely many such functions. For example, there's one with codomain {x in ℝ|x≥0}, one with codomain ℝ, one with codomain ℂ, etc.
But definition 2 at least has the advantage that it makes phrases like "f is surjective" unambiguous. If f is a function from X into Y, then it can only mean that f is surjective onto Y. But if we use definition 1, and Y is a subset of Z, it can also mean that f is surjective onto Z.
If we use one of these definitions, then it seems very strange to me to use the word "range" for the set Y. For example, the complex number -1+i would be in the range of the function ##f:\mathbb N\to\mathbb C## defined by f(n)=n+1 for all natural numbers n. This makes me wonder if there is
any English word that would be less appropriate here than "range". Maybe those 7 words that George Carlin liked to talk about.
There is however a definition that doesn't require us to mention the codomain (or even the domain) at all. The trick is to first define an ordered pair (a,b) (where a and b are arbitrary sets) by (a,b)={{a},{a,b}}.
Definition 3
A set f whose members are ordered pairs is said to be a
function if
(a) For all sets x,x',y, if ##(x,y)\in f## and ##(x',y)\in f##, then ##x=x'##.
If we use
this definition, then it wouldn't make much sense to define the term "codomain" at all. We would define the domain X by
$$X=\Big\{x\in\bigcup\Big(\bigcup f\Big)\Big|\exists y\in\bigcup\Big(\bigcup f\Big)\ (x,y)\in f\Big\}.$$ The range f(X) can be defined similarly. I think this approach is much harder to understand (we need to know things like why ⋃(⋃f) is a set), so I wouldn't recommend it. The concept of "codomain" seems to be unnecessary, but if it makes the definitions simpler, then I don't mind using it.
Conclusion: I can see why someone might want to leave out the word "codomain", but not why anyone would want to define "range" differently. To be honest, I'm thinking that if it's really common to call the codomain "the range", then it's probably like the pronunciation "nucular" (damn you Jack Bauer) or the word "irregardless". It started with a misunderstanding, and then people started copying the mistake. Finally, so many people were doing it wrong that we started saying that it's not wrong anymore.
By the way, someone who doesn't have "codomain" in their vocabulary, and defines the range of f as the set f(X), shouldn't have any use for the term "surjective" (="onto"), because every function is surjective onto its range.
One of the reasons why I have no idea what terminology is common in English is that I first learned this from a book written in Swedish. The sets X,Y and f(X) were respectively called "definitionsmängd" (=definition set), "målmängd" (target set) and "värdemängd" (value set). I think those terms are much more intuitive than the English ones.