We’ll get really close to finding out why functions have minimums or maximums in this section. In order to do that, we’re going to need a few more tools. We’ll start with functions from , which are one dimensional in nature. Why are they one dimensional? The superscript on the first is implicitly a , i.e. in that we’re looking at functions of one independent variable. Soon we’ll generalize the results to dimensions, and eventually to infinitely many dimensions, but we have to start with one dimension.
For now, we’ll introduce the ideas of completeness as well as some terminology surrounding functions and how confusing that terminology is. To do that, we’ll look at expanding the field we introduced in Step 1.
This part is easy. In the fields we use, we want there to be an ordering: a way of comparing whether two elements are greater than, less than, or equal to each other (or any combination of those). Check the Wikipedia article for ordered fields, for more information, but the most fundamental points for a given field are:
1. If then for all .
2. If and then for all .
There are more points to ordered fields than are listed here but I just want to emphasize, it’s exactly what you think it is: we let inequalities into the mix. This branch of mathematics is called order theory
Recall from last time that of all the number sets, only the rationals and reals were fields (because they’re the only ones that have both additive and multiplicative inverses). So in our case, both and are ordered fields, but has no ordering. (Is ? Such questions don’t make sense in .) We’re eventually going to show that we need to get rid of rationals as an option because we want our field to have a property called completeness (which we get into later).
Next, we need to learn what a function is and the terrible terminology surrounding it.
2.1 Definition: a function
A function is a map that takes elements from a set of inputs and assigns them to elements in a set of outputs where each input is related to exactly one output.
For us, those inputs and outputs will be number sets, obviously. We now need to get into the confusing topic of the domain and range of a function. How are the domain and range confusing? First we will clarify some notation.
We give the name to a mapping or a rule that associates inputs to unique outputs. So is just a name, and if the set of inputs is and the set of outputs is we tend to use the notation . The element is sometimes referred to as the argument of the function. If we let be an arbitrary element from the input set , then is it traditional to write and interpret it as an element of .
Let me repeat that one more time for clarity (and I’m stealing this formulation from Sir Tim Gowers’ blog):
If is a function from to and is an element of , then is an element of .
We are going to take a step into abstraction. What if I had an element from the input set , and an element from the output set , i.e. . A function can be any way of associating with each a unique . I might not be able to write down this function as something that I can do with symbols involving ‘x’. Both functions and sets can become extremely weird without trying very hard. (Can you picture what the set of all continuous functions from to looks like? What about the set of all sets?)
If I have a function and I have some rule for taking elements from a set , it could very well be that my rule doesn’t work properly in mapping everything in to elements in . Why won’t the rule work? The limitation could be due to, for example, the rules of math, limits in the English language, or rules in place by requiring that be a field (a set with some rules for addition, subtraction, multiplication, and division). It may not be any of those, but the point is that the rule you’re using might not fully map to all of the output set, , and that’s okay. If , then is called the image of (or the image of under . The set of all images is called the image of .
Let’s give names to and . We’ll call the domain and the codomain. I’d like to start phasing out the use of the term ‘range’ because it is extremely confusing. See the Wikipedia article on the range of a function and notably, the graphic on the right. “Sometimes ‘range’ refers to the image and sometimes to the codomain.” Some examples:
If you’ve never seen the symbol before, it stands for the set of non-negative real numbers: .
So what is the domain of ? Surely, it’s just . What’s the codomain of ? It’s as well, but the image of here is only the non-negative real numbers, . For , the domain is , the codomain is , and the image is .
“Two functions are considered equal if they have the same domain and the same codomain and they do the exact same thing to everything in the domain. In other words, there is more to a function than what it does.” This is from Sir Tim Gowers’ blog again, but the examples are simple enough and appear on the Wikipedia article for codomain. So I’m going to try not to be tricky and say something like “if and , are h and j the same function? Ha! Tricked you! They’re not, I didn’t tell you the domain and codomain are different for both you get a D minus!”
I’ll leave you with one question that doesn’t have an objective answer. Is it wrong to think of functions like as a function without thinking about its domain, codomain, and image, or should we always think of functions as having a rule (even if that rule isn’t something simple like ), a domain, and a codomain? Some people say yes, functions should be treated as rules, domains and codomains while others say no, it’s fine to think about the rule itself and ignore the domain and codomain in most cases. I don’t know the answer, but I will try not to trick you as we continue.
Ok, so I’ve given you what a field is, and now we know what a function is. I’m going to define a function called a metric, but we’re not going to analyze this metric for minimums, we’re going to use it to add some structure to the underlying sets and (the domain and codomain, which in reality are going to be subsets of , i.e. ). In one dimension we will use the terms ‘set’ and ‘space’ to be synonymous. This isn’t proper, but we’ll correct the situation when we get to dimensions. If I haven’t said it explicitly yet, we want and to be fields or subsets of fields (i.e. ), and recall so far only and fit the bill for this field .
2.2 Definition: a metric
A metric on a set is a function (called the distance function or simply the distance)
where for all the following conditions are satisfied:
A few things to explain here. First, the symbols mean that we need to take an element from and then choose another element (possibly the same one, but a second time) from . So the terminology is that what we label is going to be a function of two arguments, both from the same set . You will sometimes see this written . So, metrics always need to be mapped to the non-negative real numbers; I never said was explicitly over the reals, but it is. I’m not trying to trick you.
The symbol, if you’ve never seen it before, means that whatever is on the left implies what is on the right, and vice versa. Finally, note that we don’t need an ordered field for a metric space, only a set. (We can define metrics on the complex numbers for example, but the field of complex numbers does not have a total ordering that makes any sense.)
The most common metric you’re used to is the Euclidian metric, which is just the Euclidian distance you’re probably familiar with: . Note that I used the colon version to define here, and I did that to outline the fact that the square root of the square of something is the absolute value (in one dimension). Either one works, and they’re the same thing (in one dimension).
I’m going to go back to the image from before to see what we’ve done.
We’ve added on a function that applies to the set to give some structure. Don’t think of as functions we’re interested in finding the minimums of. We may want to use the absolute value as a function and find the minimum of it in the future, but for now we are just adding structure to . Imbuing a set with structure in this way is called giving a toplogy.
In general, we have the following set of inclusions.
We’ll get to what pre-Hilbert and normed spaces are, but it’s interesting that we jumped right to metric space. Given what we know about Venn diagrams, metric spaces are also toplogical spaces, so why didn’t I start there? All we need to know is that the properties of importance we get from our set being a topological space are:
1. What it means for a set to be open
2. What it means for a set to be closed
3. What continuous functions are
4. What neighbourhoods are
Topological spaces have something called a pseudometric, which lets definitions of open, closed, etc. to be written easily. Having a metric instead of a pseudometric just makes things easier. This subject is called topology and there are many great books to introduce you to the subject. So, just to reiterate – while we’re playing in the metric space topology, we’re going to be talking about some concepts that relate to all metric spaces being topological spaces, and some properties (such as completeness) which only apply to the substructure afforded by metrics.
We’re playing in the metric space land. I didn’t include continuity in the topological space structure but that’s where it lives. If a metric space satisfies the property of completeness we get what we call a complete metric space. Note that the words written above the spaces are where we can define them. Just because I’m playing with topological spaces, doesn’t mean all the spaces I will play with will be open or closed. Similarly, I can see if a property satisfies being ‘complete’ once I’m in a metric space. If it does satisfy this, then I’m playing in a sub-category of metric spaces called complete metric spaces. Normed spaces that are complete (whatever that means) are called Banach spaces, and pre-Hilbert spaces that are complete (again, whatever that means) are called Hilbert spaces. Banach spaces have metrics (they have to: they’re a subset of normed spaces, which are a subset of metric spaces). In normed and Banach spaces we’ve just added more structure on top of there already being a metric. See here for more.
You probably already know these, and this will be far from formal. I plan on writing a formal post on these concepts once we start looking at functions in dimensions, and you can find the link for that here, (which I’ll add once I make it).
Open sets in (one dimension) have round brackets, like the set (3,4). Closed sets have square brackets, like the set [0,1]. The open bracket means it doesn’t include its endpoint, a closed bracket means it includes the endpoint. Sets like the above are called intervals if they don’t have holes in them (this property of not having holes in them is called connected). A set such as is not connected, hence not an interval.
Sets such as are also considered open. Sets such as are closed as well. Intervals such as are sometimes called left-open or half-open intervals. Similarly, are called right-open, for obvious reasons.
2.3 Definition: boundedness of a set
A set of real numbers is called bounded from above if there is a real number such that for all . The number is called an upper bound of .
A set of real numbers is called bounded from below if there is a real number such that for all . The number is called a lower bound of .
A set is bounded if it has both lower and upper bounds.
This is a healthy reminder that is not a real number. If there is a subset, say of , i.e. , a subtle point here is that the upper bound, if it exists, doesn’t have to belong to the subset. The open set has any number greater than or equal to 1 as an upper bound. Indeed, every element of is less than , i.e. for all . The number is thus an upper bound on the set. We want the smallest of these so-called upper bounds, and the smallest upper bound for this set would be . In a similar way, there are an infinite number of lower bounds of , but the largest such lower-bound is . The reason we don’t look for the maximum element of the set is that for there is no maximal element. There is also no minimal element. The least upper bound is called the supremum of and is written , where here . The infimum is the greatest lower bound: . Obviously, we don’t run into this problem for closed sets: their supremums and infimums lie in the sets themselves. When this happens we can think of the supremum as the max of a set and the infimum as the minimum, but now you can see the subtle difference. Let . Then and . One other subtlety is that if sets have no upper bound there can be no supremum. Let . Then does not exist. The same is true for the infimum.
This is the crux of this post. We’ll finally get to what completeness means and why it’s important. Sequences are just lists of numbers. A few examples:
1. 2, 4, 6, 8, 10, … A sequence of positive, even numbers.
2. 1, 1, 2, 3, 5, 8, … The Fibonacci Sequence
3. 1, 4, 9, 16, 25, … A sequence of squares of the natural numbers
4. The harmonic sequence
Sequences can be thought of as functions from the set of natural numbers to whatever number set the sequence is in. You can think of examples 1-3 as having elements in or in , for example. Example 4 could have either or as its underlying set.
If we let all of the terms in the Fibonacci Sequence be matched to terms with a subscript denoting their position in the sequence
we can treat as the generic term. It’s normal to treat functions from the set of natural numbers as whereby the function’s argument appears as a subscript instead of an argument in brackets. The function for the Fibonacci Sequence can be thought of as or or anything in between.
2.4 Definition: a convergent sequence
A sequence is said to converge to a limit if , if exists.
One of the problems with this definition, is that if the terms are say , the number that they converge to might be a real number, i.e. . That’s not a very desirable property of convergent sequences. There’s something called a Cauchy sequence that we need to investigate, and we’ll do it in the context of a metric space.
2.5 Definition: a Cauchy sequence
A sequence in a metric space (where A is the underlying field and is the metric) is called a Cauchy sequence if for every positive real number there is a positive integer such that for all natural numbers , it holds that .
In one dimension with the Euclidian metric, this is the same as .
Cauchy sequences have elements that get arbitrarily close together. Check out the Wikipedia article for more. Cauchy sequences are essentially convergent sequences but you don’t have to define what the limit is. This may seem like a weird definition: why can’t we just let two consecutive terms get closer to each other, something like ? Terms getting ‘close’ to one another in this sense isn’t a good enough criteria for convergence.
2.6 Theorem: convergent sequences are Cauchy sequences
Every convergent sequence is a Cauchy sequence. Not all Cauchy sequences are convergent.
The long and short of this is that Cauchy sequences converge. The problem is that the limit of a Cauchy sequence can sometimes leave the set of numbers that the elements in the sequence are in. What?
The sequence consists of rational numbers, i.e. for all . The sequence looks something like . The sequence, however, converges to a number that is not a rational number: . We can write a sequence in but its limit is outside of . We say that the rationals are incomplete because of this property.
2.7 Definition: completeness
A metric space in which every Cauchy sequence converges to an element in is called complete.
Notice that the definition of completeness relies on the underlying space to be a metric space. If you go back to the large Venn diagram above, you can see I put completeness as being a property of metric spaces. It turns out, there’s an idea of completion of a set, where you can take an incomplete set like and complete it. If you do such a thing, you get the real numbers . No matter what sequence you create, if its terms are in and it is a Cauchy sequence, its limit will be in .
We had a lot going on here. Two separate thoughts happened: we added a lot of structure to our set . We quickly defined what a function is so that we could define a function called a metric. A metric can be defined on any arbitrary set: the underlying set does not need to be an ordered field, however the codomain of a metric is the set of non-negative reals. We then called the set together with a metric a metric space, and using that metric space we defined a property called being complete. It’s worth re-iterating that completeness is a property of some metric spaces, and metric spaces that are complete are called complete metric spaces.
The real numbers are an ordered field. We didn’t ask that our set be a field in the definition of the metric . We want to be a subset of a complete ordered field, . We like complete ordered fields because we can do calculus on them.
A subset of a field is not necessarily a field on its own. A subset like loses the fact that while , its multiplicative inverse isn’t. Finally, I haven’t said it yet we will also want to be a subset of a complete ordered field, and also for there to be a metric on .