One of the things in math that has always irked me a bit is the inability to express the points on a circle elegantly using a function. For example, is an equation for points on a circle centered at with a radius of , but if we wanted to express that in a form, there isn’t a great way to do this. You’d be stuck with two functions:
In math class, you learn that a function is something that takes a number for an input, does some math on the number, and finally outputs an answer. And typically in English, “functions” as a thing imply a many-to-1 relation, typically denoted ; that is, any input will always yield a single, numerical answer.
Always a single answer, you say?
What if ? Then is , which shouldn’t count as a single answer, right?
That’s right. doesn’t count as an answer, because it’s a placeholder we use to convey the idea that there isn’t an answer. So are functions actually many-to-0-or-1?
Well, not really, thanks to Domains. But to talk about why, we need to first talk about function mapping.
The term range is actually ambiguous in mathematics. In literature, range has been used in the past to denote both the images and codomain of functions. In high school, when we say range in the context of “Domain and Range”, we’re actually talking about images, and since we don’t really use codomains, there are no issues in practice. But to avoid confusion, I’ll use image in place of range.
We denote the domain and codomain of functions as
where is the domain and is the codomain. Recall that the domain is the set of values that are valid/allowed to be plugged into the function, i.e. the function is well-defined only for inputs in the domain. For example, for the function , the domain is set to
the set of all reals except zero. Which means that isn’t even a valid input for . In face, when we say that the relationship between inputs and outputs of a function are , the refers to members in the domain, and the refers to members in the image. Indeed, functions are, in fact, strictly many-to-1.
Ok so back to the original problem: expressing something like , or a relation as a “function”. Where do we begin?
Introducing: binary relations. Binary relations are similar to functions, but instead of using an input-to-output model of thinking, both of the “input” and “output” are used as arguments. In fact, a binary relation can be considered the set of pairs that makes the expression true. The weird notation can be thought of as just a “function” that takes and as inputs and outputs “true” or “false”, also known as a predicate.
“Domains” and “codomains” from functions have an analogy for binary relations too. In English, binary relations are usually instantiated by the following phrase:
A binary relation over the sets and …
which creates a set whose elements are ordered pairs from , where ”” is the cartesian product. This makes a subset of , expressed as
In formal notation, we can also define the relation by , replacing with a predicate expression. For example, we can define a binary relation
over the set . Then, we can say and . We finally have something that represents a complete circle, rather than a semicircle with open ends.