# Is my definition of functions correct?

I'm planning to tackle all my work by learning all the definitions and statements relevant to my subjects by rewriting them in my own style. Below, I've stating the definition of a function in my own way using quantifiers. Can you please tell me if writing in this way is ok and correct? and if it makes logical sense? My work on self-teaching maths has never had the chance to be criticised which doesn't make me as confident as I would like. Also, is learning topics in maths by working with the definitions and important statements first by applying examples, non-examples, counter-examples first, then reading all relevant information in-between and the proofs later a better method of study?

Definition Let $$X$$ and $$Y$$ be sets. A function or mapping $$f$$ from a set $$X$$ to a set $$Y$$, denoted $$f:X\rightarrow Y$$, is a rule such that $$\forall{x}\in{X}, \exists{y}\in{Y}$$ s.t $$y=f(x)$$.

• How do you define “rule”? And what does $f(x)$ mean? – José Carlos Santos Jan 21 '19 at 17:57
• would it be better to write 'consists of a rule' and ' $y=f(x)$, where $f(x)\in{Y}$' ? – user636392 Jan 21 '19 at 18:00
• The rule is '$\forall{x}\in{X}, \exists{y}\in{Y}$ s.t $y=f(x)$.' – user636392 Jan 21 '19 at 18:02
• Why better? If you don't define the meaning of rule, nothing will change. – José Carlos Santos Jan 21 '19 at 18:02

## 2 Answers

Your definition of function is wrong in the first place because it carries a circular reference, hence is no definition.

If $$f$$ is yet to be defined then also $$f(x)$$ is yet to be defined and something that is not defined already cannot be used in a definition (unless it is some primitive notion that has no definition at all).

You cannot define function $$f$$ by means of $$f$$ or something depending on $$f$$ (in your case $$f(x)$$) itself.

A correct definition is:

• Function $$f$$ from set $$X$$ to set $$Y$$ is a subset of $$X\times Y$$ such that for every $$x\in X$$ there is exactly one $$y\in Y$$ with $$\langle x,y\rangle\in f$$.

Here $$f$$ is defined by means of cartesian product and ordered pair, which are supposed to be defined already.

• I really love the way you've defined a function this way. Most of the books I've been reading always define functions by using them in the definition, and I'm sure I've came across other definitions that use a similar structure which doesn't sit well with my intuition. – user636392 Jan 21 '19 at 18:56
• Glad you like it. This definition is used commonly in set-theory. Also observe that on base of this definition we can now define $f(x)$: it is the unique $y\in Y$ that satisfies $\langle x,y\rangle\in f$. If this is in your luggage then you can move on and also use terms as rules/prescription. Then the statement that e.g. function $f:\mathbb R\to\mathbb R$ is "prescribed by the rule" $x\mapsto x^2$ is just another way of saying that $f=\{\langle x,x^2\rangle\mid x\in\mathbb R\}$. – drhab Jan 21 '19 at 19:04

While your definition encapsulates the "spirit" of the definition, it is not correct. A more formal and proper definition abandons the ambiguity of "rule:"

Let $$X$$ and $$Y$$ be sets. A function or mapping $$f$$ from a set $$X$$ to a set $$Y$$, denoted $$f:X\rightarrow Y$$, assigns to each $$x \in X$$ a single element $$f(x) \in Y$$, denoted $$x \mapsto f(x)$$.

That's all that's really necessary.

You could alternatively use $$y$$ in lieu of $$f(x)$$, but the latter notation more clearly denotes $$f(x)$$ as being the image of $$x$$ under $$f$$ in my opinion.