how many instances of "(" are there in:
millions of years ago, people started noticing that some quantities in nature depend on the others. they studied these dependencies in a chaotic way, and one day they decided enough is enough and they need a unified theory, and that’s how the theory of functions started to exist, at least according to history books.
if you think that you already know enough about functions, feel free to scroll to the bottom of this document, and follow the link to a mutliple-choice quiz that you can use to test your knowledge.
we will use cartesian product of sets to define functions in an elegant way. since it is quite hard to understand the definition when you are seeing it for the first time, we will start by examples of functions and by pointing out the most important properties that the function must satisfy.
we can think of a function as a rule. to each input value we assign exactly one output value according to this rule.
consider the function \( h:\mathbb n\to\mathbb z \) defined in the following way:
\[ h(x)=x-17.\]
this is a function that takes a positive integer as an input and produces an integer as an output. if the input is \( 22 \) then we write \( h(22)=5 \). let us evaluate this function for several more inputs: \( h(37)=20 \), \( h(100)=83 \), \( h(3)=-14 \).
we can represent this graphically as:
another way to represent a function is by ordered pairs:
\[ (1,-16), (2,-15), (3,-14), \dots, (25,8), (26,9), (27,10), \dots\]
the first number in the pair is the input, while the second is the corresponding output. this list of ordered pairs uniquely represents our function \( h \).
consider the following function \( g:\mathbb n^2\to\mathbb n \): \[ g(x,y)=x+y.\]
this function takes an element of \( \mathbb n^2 \). elements of \( \mathbb n^2 \) are ordered pairs of positive integer. to each positive integer this function assigns its sum. thus we have \( g(3,17)=20 \), \( g(17,17)=34 \), \( g(11,96)=107 \), etc.
we can again write our function \( g \) in a similar way as we did before:
\[ \big((1,1),2\big), \big((1,2),3\big), \big((1,3),4\big), \big((1,4),5\big),\dots \]
\[ \big((2,1),3\big), \big((2,2),4\big), \big((2,3),5\big), \big((2,4),6\big),\dots \]
\[ \big((3,1),4\big), \big((3,2),5\big), \big((3,3),6\big), \big((3,4),7\big),\dots \]
\[ \dots\dots\dots\]
consider the first element in the list: \( \big ((1,1),2\big) \). this is one ordered pair. its second component is 2. its first component is another ordered pair: \( (1,1) \). the entire thing \( \big ((1,1),2\big) \) means that if the input is \( (1,1) \) the output is \( 2 \).
user
There are sixty-four "("s.
assistant