2

Intuitively, a function is a rule that takes something as an input and gives an output. It can also be stated as that a function is a rule that maps elements from a set to the elements of a different or the same set. Both the above statement can be regarded as almost same. Everything was a fine till I came to know the set-theoritic definition of a function.

According to that, a function is a set of ordered pairs such that all the first component of pairs which come from the same set, is related to the second component of pairs which also come from a common set. But function is like something I stated above and set is just a collection of things having something common. How can set do the work of function?

I understand that each function can correspond to a set of oredered pairs in which first component is input and second component is the output but still set can't be thought same as a function. Function is a rule. Set is just a collection. How does the intuition of function connect to the set theoritic definition of function?

Apologies if I sound like a overthinker.

Thanking in advance.

EDIT: Function takes something and if function is defined as a set that it should behave in the same way but set does not behave in that way.

Also, I think that the definition might be for checking whether something is function or not. Since we can create a unique set out of every function, so may be the definition is not for defining what a function is (because we understand that informally) but for defining what can be a function.

  • The correspondence between 'function as a rule' and 'function as a set of ordered pairs of input and output' can be thought of as similar to 'set builder form' vs 'set roster form'. – Raad Shaikh Apr 03 '22 at 09:39
  • 1
    You should read this as "a mapping rule contains the same information as a set of pairs", i.e., given the mapping rule you can obtain the set of pairs, and the other way around, given the set of pairs you can reconstruct the mapping rule (on input $x$, look up the unique pair $(x,?)$ whose first entry is $x$, then return the second entry). And it is common philosophy in mathematics that objects which can be reconstructed from each other are regarded as the same, even though they look very different. – M. Winter Apr 03 '22 at 10:32
  • Having said that, you do nothing wrong to think of functions as rules and consider the set of pairs as an alternative representation thereof. Another common representation of a real function is a graphical plot, and many people think of these things as the actual function before they encounter the mapping rule picture. – M. Winter Apr 03 '22 at 10:33
  • @M.Winter The reconstruction of mapping rule from set of pairs is also a mapping rule where set of pairs take place of an equation or whatever. From this it seems that the set of pairs is a part of the process of function. But the definition states that the set itself is the function. – Vedant Chhapariya Apr 03 '22 at 10:47
  • @VedantChhapariya, I think you should see this "set of ordered pairs" concept as an implementation of the notion of function in some particular foundational theory. That doesn't mean that "set of ordered pairs" is what a function actually is, necessarily, but it's useful because it lets us reason about functions inside set theory. M. Winter's first comment is spot on, in my opinion. It's a bit like how some people implement real numbers as equivalence classes of Cauchy sequences, but some people use Dedekind cuts. I think neither of these is what the real numbers actually are. – Izaak van Dongen Apr 03 '22 at 21:51
  • The meaning of an expression has two aspects : extensional and intensional. The intentional aspect of " President of the USA " is the concept ( idea) that is expressed ( " chief of the executive power of the republic that is called USA") ; but the extensionalaspect or denotation is the set of all persons that satisfy the concept. Applied to fucntions: the " rule" is the intensional aspect, the set of ordered pairs is the extensional aspect. – Vince Vickler Apr 05 '22 at 09:50

3 Answers3

1

There are indeed two ways to look at a function intuitively.

(I prefer the word "mapping" to "function", incidentally, as it allows one to mentally step back from the first way and allow a wider context.)

The first way is, as you say, a "process" which "does something" to a number, pushing it through a black box and poking another number out of the other end.

This is the usual way of introducing them at school, and while it is adequate for those purposes, it's a bit limiting.

So, rather than think of a function as a "dynamic" thing, which works by (metaphorically) "turning a handle", consider it like this.

Let $f$ be an arbitrary function.

Let $A$ be the set of numbers $f$ "works on". This is known as the "domain" of $f$.

Let $B$ be the set of all the numbers of which could possibly come out of the "output" of $f$, given that you poke an element of $A$ into the "input". This is known as the "codomain" of $f$.

(At this stage we don't know whether, for any $y \in B$, that there are any $x \in A$ such that $f(x) = y$ -- this is often one of the things we are going to have to work out specifically.)

We know that $A$ and $B$ are sets, and "exist" in our minds statically.

If we conceptually lay all the elements of $A$ down the left hand side of the page, and all the elements of $B$ down the right hand side of the page, we can (in theory) draw a line from each element $x$ of $A$ to the element $y$ of $B$ such that $f(x) = y$. Each line is uniquely defined by its end points: the $x$ in $A$ and the $y$ in $B$.

So, we can define that "line" by writing it as $(x, y)$, where it is understood that $x$ comes from $A$ and $y$ comes from $B$. The order matters -- the first element must be from $A$, and the second element must be from $B$. This is called an ordered pair.

Now, the set of every ordered pair from $A$ to $B$ is written as $A \times B$, and in set-theoretical shorthand can be defined as: $$A \times B = \{(a, b): a \in A, b \in B\}$$

Now, a function is a subset of $A \times B$ where for every $a \in A$, there is only one $(a, b)$, where $b$ can be any element of $B$.

In fact, it is those specific values of $b$, of which only one is associated with any given value of $a$, which define $f$.

Note of course that the same value of $b$ can be associated with more than one value of $a$, and some elements of $B$ may not be associated with any value of $a$ at all.

Does this help?

Prime Mover
  • 5,005
1

I agree that conceptually it feels like there is a difference: a function does something, while a set just sort of sits there.

Still, there is an important way in which a function can be represented by a set.

First, think of how we can represent a function by a table, for example:

\begin{array}{c|c} n&f(n)=n^2\\ \hline 0&0\\ 1&1\\ 2&4\\ …&…\\ \end{array}

Ok, but looking at a function that way, we can also see it as a set of pairs:

$$\{<0,0>,<1,1>,<2,4>,…\}$$

… and that’s really all there is to it: given such a set, you can always figure out the function that it represents: the left wlement of each pair is the argument that goes into the function, and the right element is the function value for that argument. Of course, as others have pointed out, you can’t have two pairs $<a,b>$ and $<a,c>$ with different $a$ and $b$ in the set of pairs.

Bram28
  • 100,612
  • 6
  • 70
  • 118
0

A function is a relation $f\subseteq A\times B$, where $A\times B$ is the cartesian product of sets $A$ and $B$, which has two additional properties:

  1. $f$ is left-total, i.e. $\forall a\in A\exists b\in B : afb$.

For each $a\in A$ there exists $b\in B$ with $afb$.

  1. $f$ is right-unique, i.e., $\forall a\in A\forall b,b'\in B: afb\wedge afb'\Rightarrow b=b'$.

For each $a\in A$ and $b,b'\in B$, if $afb$ and $afb'$, then $b=b'$. (If there exist two, they are equal).

Thus for each $a\in A$, there exists at least one (left-total) and at most one (right-unique) $b\in B$ such that $afb$. Hence, we can write $f(a)=b$. This definition is purely set-theoretical.

Wuestenfux
  • 20,964
  • 1
    For a novice, your notational style is compact to the point of obscurity. Would you object to your notation being expanded to be more clear? I understand completely what is meant, but newer students less familiar with the abstract set-theoretical notion of a function being a subset of the trivial relation may have considerably more trouble with it. – Prime Mover Apr 03 '22 at 09:52
  • This definition just makes function a set but function is a machine (Wikipedia states this). How can a set be a machine? – Vedant Chhapariya Apr 03 '22 at 09:56
  • @VedantChhapariya See my own answer. A "machine" is just one way to look at a function. – Prime Mover Apr 03 '22 at 10:11