# Definition of a function.

As an introductory to real analysis, I have been introduced to the formal definition of a function, and that it needs to consist of 3 things.

If $f : X \to Y,$

Then it needs 'A well defined rule that assigns a unique element $f(x) \in Y$ to each $x \in X.'$

This is the third element, ( the other two being the domain and codomain).

I understand what this means, but for me, as I need to remember the definition, it seems a little 'backwards'.

Is the following sentence an equivalent statement, as it makes much more sense to what I see to be the notion of a function?

'A well defined rule that assign each element $x \in X$ to a unique element $f(x) \in Y.$

• See Wolfram's definition, it is worded similarly to yours, but less ambiguous: "More formally, a function from $A$ to $B$ is an object $f$such that every $a \in A$ is uniquely associated with an object $f(a) \in B$." – A. Webb Mar 14 '17 at 19:11
• How about, "$f: X \to Y$ is a relationship between $X$ and $Y$ such that each $x \in X$ is related to exactly one $y \in Y$" – A. Webb Mar 14 '17 at 19:18
• @A.Webb the second statement seems to make the most sense, is it correct? – Gurjinder Mar 14 '17 at 19:21
• Yes. Keep in mind the point is that the expression $f(x) = y$, that you probably take for granted, actually makes sense: (1) $f(x)$ is defined, that is has a value in $Y$, and (2) $f(x)$ has only one value in Y, so that we can say $f(x) = y$ rather than say $y \in f(x)$. This (right-)uniqueness is really just saying if $f$ relates $x$ to $y_1$ and $f$ relates $x$ to $y_2$ then $y_1 = y_2$. – A. Webb Mar 14 '17 at 19:44

## 1 Answer

Your sentence doesn't make sense, for example let's define function $f(x)=kx$ where $k=0$, now for each $x ∈ X$, $f(x)=0$ and $y$ is not unique, it's the same value. So not for each element $x ∈ X$, there is unique $f(x) ∈ Y$.

• Do you think the definition OP was given suffers from the same ambiguity regarding 'unique'? I'm just curious. – pjs36 Mar 14 '17 at 19:14
• Mmm, good point. – Gurjinder Mar 14 '17 at 19:24
• @pjs36 would there be an alternative word, instead of 'unique', for which my statement would make sense? – Gurjinder Mar 14 '17 at 19:25
• @Gurjinder It's tricky, but I think saying "exactly one" is perhaps a better option: "a rule that assigns to each $x \in X$ exactly one $f(x) \in Y$." Depending on how things are quantified (something I don't pay much attention to), "unique" works, but as this answer points out, it can be misinterpreted. To answer the original question, I think your statement is equivalent to the definition you were given (although it's a bit odd to think of assigning $x$'s to $f(x)$'s, IMO) and either is fine. – pjs36 Mar 15 '17 at 4:13