I was reading principles of mathematical analysis by Walter Rudin chapter 2 when a confusion about the definition of a function cropped up. (Read definition in comment below) I had thought that functions were maps from a set called the domain to another called the codomain. From what i knew before, these maps should not be one-many. Otherwise it would simply be a Relation not a function. But the book in its definition does not talk about the fact that functions should not be one-many. Infact it doesnt differentiate between a general mapping and a function and puts no restriction on what a function can be. So my question is where exactly is the mistake?
UPDATE: The discussion till now points that maybe the "an" word in the definition points towards uniqueness of image $f(x)$ of an element $x$ in the domain. I have also commented below regarding "well-defined functions" and "not well-defined functions". I think the notion of "well-defined"ness has got to do with differences in the output for the same input in various "forms" rather than just an element in the domain mapping to various elements in the range. Hence it does not in anyway interfere with the notion that a "function" cannot be one-many. Also to make things clear, Rudin uses the word "or" in conjunction with the word "mapping" and "function". Hence he is essentially saying that the mapping is a function and a function is a mapping. Which also implies that relations in general are not mapping. Please correct me if I've been wrong.