# Real Analysis/Functions

| Real Analysis Inverse Functions | Inverse Functions→ |
Functions are a component of mathematics so fundamental, it appears in every branch going forward. Although in elementary mathematics, the understanding of a function may be trivial at best, in practice, functions allow you to prove even the most fundamental aspects of mathematics. Even the exposure chapters in this book, which provides basic introduction to higher mathematics using the concepts of this book as a stepping stone, use it. Thus, the concept of making functions rigorous will be of utmost importance—and will be handled in this chapter.

## Construction

We will assume that you have an intuitive understanding of functions. If not, they can be found in either earlier mathematics wikibooks; the Algebra book and the Calculus book, or found in the higher mathematics wikibooks; the Discrete Mathematics. This should indicate just how fundamental these concepts are. It is safe to say that although a rigorous understanding of functions may not be needed going forward, understanding its structural component and how theorems rely on it will be essential in your mathematical career.
The definition of a function is as follows:
Yes, that is it. The definition of a function relies on very little; the concept of a function hinges only on set theory. Although this definition may sound a little too simplistic, it surprising is not. The intuitive notion of a function is perfectly satisfied. Certain properties of functions can be described from this definition through a definition argument or derived. Namely the intuitive properties of
* An input value must output some value based on the function definition.
* One input cannot output more than one value.
* The same input should yield the same output.
* The domain and range of the function should be derivable (in mathematics, an existence proof is sufficed).
* The operations governing numbers must also apply predictably for functions.
These will be described in depth in the following sections.

### Definitions

Many properties can be cleared by simply defining them. After all, the function is already defined as a very specific kind of set, which means a lot of properties can be derived simply through its definition. In fact, we will use our textbox notation to define them easily.
| Definition of ƒ(a)Given a, the variable b in the ordered pair (a,b). In writing, this is called the value at f of a or any similar combination of words. | Definition of input valueGiven the statement $f(a)=b$, the variable a | Definition of output valueGiven the statement $f(a)=b$, the variable b |
| Definition of ƒ(a)Given a, the variable b in the ordered pair (a,b). In writing, this is called the value at f of a or any similar combination of words. | Definition of a Domain of a Function ƒA set composed of the variable a of every ordered pair (a,b). | Definition of a Range of a Function ƒA set composed of the variable b of every ordered pair (a,b). |
To maintain the scope for this wikibook, we will not rigorously prove the necessity of these definitions. Why? They rely almost essentially on set theory and its associating theorems, formulas, and operations. Although this wikibook uses set notation, this wikibook is primarily concerned with rigorously defining elementary mathematics and exposing readers to higher mathematics. In effect, we will assume that the proof for these definitions as merely an axiomatic statement. However, you are free to prove them for personal reasons.

### Notation

There are many different ways to notate functions. The multitude of different notation styles is due to the plethora of mathematical fields, each of which demand certain types of information from our function. Given that this wikibook is on Real Analysis, we do not necessarily need the function definition requiring the numbers accepted for the domain and range to be explicit. Instead, we will primarily rely on these types of notation, with the last one being used rarely.
List of Function Notation :
| Notation | Read as |
| $f={\text{ insert definition here}}$ | N/A |
| $f(x)={\text{ insert definition here}}$ | N/A |
| $x\rightarrow f$ | x arrow [insert what ƒ is defined as here] |
In this wikibook, we will primarily use the first two forms of notation, with the first one being used the most. Why? It melds the definition of function and variable, which will be a useful concept moving forward in higher mathematics. It also saves space as other operations (which you will learn later) often have special notation for f(x). f(x) can also easily be mistaken as f(a), which refers to an actual value, unlike f(x), which refers to a definition.

### Properties

Proof of Uniqueness in Input :
| Given that a is the common member of {{a},{a,b}} and c is the common member of {{a},{a,b}} and they both should be equal (which means what comprises the set must be the same, a = c. ||
| Case 1: b = a. | Case 2: b ≠ a. |
| {{a},{a,b}} = {{a},{a,a}} = {{a},{a}} = {a} | b must exists as a member in the set {{a},{a,b}}. This is also true for {{a},{a,d}}, because they are equal. |
| Because they both must be equal, d = a too. | Because b ≠ a., it's not in the set {a}, it must be in the set {a,d}, which implies that b = d. |
| $\blacksquare$ ||
This verifies the nature of equality of a function; for two functions to be equal, both the inputs and outputs must be equal.

### Operations

Functions obey many of the same operations as normal numbers. However, one key difference is the domain of the function, which may change depending on the operator.
List of Operations for Functions :
| Name | Notation | Domain |
| Addition | $(f+g)(x)=f(x)+g(x)$ | domain f ∩ domain g |
| Subtraction | $(f-g)(x)=f(x)-g(x)$ | domain f ∩ domain g |
| Product | $(f\cdot g)(x)=f(x)\cdot g(x)$ | domain f ∪ domain g |
| Division | $\left({\dfrac {f}{g}}\right)(x)={\dfrac {f(x)}{g(x)}}$ | domain f ∪ domain g \ {a : g(a) = 0} |
| Composition | $f\circ g(x)=f(g(x))$ | domain g ∪ {g(x) : f(g(x)) ∈ domain f} |
Given the scope of this wikibook, we will not rigorously prove the necessity of these definitions. Why? They rely almost essentially on set theory and its associating theorems, formulas, and operations. Although this wikibook uses set notation, this wikibook is primarily concerned with rigorously defining elementary mathematics and exposing readers to higher mathematics. In effect, we will assume that the proof for these definitions as merely an axiomatic statement. However, you are free to prove them for personal reasons.

## Theorems

In terms of functions, there are a small pair of theorems that prove one of the most fundamental aspects of elementary mathematics — that is the idea of algebra. Although the following theorem will not sound related to algebra, it actually validates the nature of the process. One major transition between elementary mathematics and higher mathematics is the recognition that algebraic manipulations is a kind of proof as well. Because of this, the first proof you could have read in this wikibook (if you follow it linearly) is this theorem. Examples of how this theorem relates to algebra are to follow after.
$a=b$
$f(a)=f(b)$

#### Proof

This proof relies on the function definition and the axioms relating equality. As a reminder, f(x) references the definition of a function, not the value of f at x.
Proof of Algebra's Validity :
| Given the definition of a function, we can state that the variable a can map to the value at f of a, which we will call x in this proof. | ${\begin{aligned}f&=\{\ldots ,\{\{a\},\{a,x\}\},\ldots \}\implies \\a&\rightarrow x\end{aligned}}$ |
| Because b = a and that we are working with a function f, we can claim that b can also map to the value at f of a. | ${\begin{aligned}f&=\{\ldots ,\{\{b=a\},\{b=a,x\}\},\ldots \}\implies \\b&\rightarrow x\end{aligned}}$ |
| Combined together, the relationship becomes clear. | $a=b\implies a\rightarrow x=b\rightarrow x\implies x=x$ $\blacksquare$ |

#### Example

A proper analysis on what algebra is can help solidify the theorem and its importance. As an example, we will use a simple equation $17=3x+2$ to illustrate our point. The following explanation is written below.
| Explanation | Algebra | Expressed via our Theorem |
| First, we will subtract both sides by 2. It is equivalent to creating a function $f=x-2$ and then applying our theorem. Next, we will divide both sides by 3. Note that this is also equivalent to creating another function $g=x/3$ and then applying our theorem. Note that by then, we have essentially solved our question. We just apply the equivalence property axiom and "reverse" the position of x and 5 for aesthetic purposes. | ${\begin{aligned}17&=3x+2\\17-2&=3x+2-2\\15&=3x\\{\frac {15}{3}}&={\frac {3x}{3}}\\5&=x\\x&=5\end{aligned}}$ | ${\begin{aligned}17=3x+2&\implies f(17)=f(3x+2)\\&\implies 15=3x\implies \\g(15)=g(3x)&\implies 5=x\\&\implies x=5\end{aligned}}$ |
The similarity is not by chance. Turns out, the notion of algebra is actually this property applied over and over again. Even the limitations of algebra can be answered using this property. Most famously is the relationship of squaring (in which squaring an equation seemingly introduces a new value that may be incorrect. For example, the quadratic equation), which can be easily answered by saying simply, "algebra does not guarantee reversibility". Note that our proof actually validates the process of even squaring, as it is not a biconditional relationship. In fact, the most bizarre thing about this theorem is that it doesn't justify reversibility. What is reversibility?