I’ve got good news and bad news. The good news is that you’re finally going to have a rigorous sense of functions. In calculus you sort of insist that you know what they are, but you really only have a generic (albeit relatively accurate) sense of what they are. Now you get some real depth.
The bad news is you’re in for a hell of a lot of jargon. I’m going to go through, piece by piece, and try to define everything. LET’S DO IT.
“Let A and B be nonempty sets. A function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a) = b if b is the unique element of B assigned by the function f to the element a of A. If f is a function from A to B, we write f : A→B.”
As you might guess, that sounds trickier than it is. Basically it’s saying you have two number sets. A function is a way to identify each number in A with exactly one number in B. This should sound pretty much like how you intuitively think of functions – a function receives an input value then spits up an output.
The book notes that you can also call functions “mappings” or “transformations.” As I recall, we’ll be using “mapping” frequently.
“If f is a function from A to B, we say that A is the domain of f and B is the codomain of f. If f(a)=b, we say that b is the image of a and a is a preimage of b. The range of f is the set of all images of elements of A. Also, if f is a function from A to B, we say that f maps A to B.”
WOOF. Okay, let’s break that down. The first sentence just means “f maps A to B. The generic term for the input set (A) is “domain” and the generic term for the output set (B) is “codomain.” Input set and output set would’ve been a lot prettier, but so it goes.
The second sentence talks about images and preimages. Think of these as just specific members of A and B. So, you take a as your preimage, run the function f on it, and the image (b) gets spat out. According to wikipedia, image/preimage terminology can also refer to a subset. So, basically “preimage” refers to an element or set of elements within the domain. “Image” refers to the same, but in the codomain.
Then they talk about the range. You may be saying to yourself “what the hell is the difference between a codomain and a range?!” Well, it’s slight, and in a lot of contexts I’m told they’re more or less used interchangeably. The technical difference as I understand it is this: The range is all of the images (i.e. elements that are output) you can arrive at from the preimages (i.e. elements of input). You could stipulate a codomain that’s actually larger than the range, containing elements you can’t reach with the function and set of preimages in question. In other words, you have a domain and a codomain. Your function maps between them. The elements of the codomain you can actually reach by this method are called the range.
Why would this matter? Well, I suppose you might start with two sets A and B and then want to figure out different ways to map between. In that case, for one set of values in A, different functions would have different ranges in B.
Okay, let’s keep on going.
The book talks about functions being “equal” and says that two functions are equal if the share a domain, codomain, and the function between the two connects the same elements. Makes sense. If you have two functions, but they map from one set to another exactly, you must actually have two versions of the same function. For example f(x) = x+1 is the same as f(x) = x+1-1+1. Even though you’re, so to speak, running a different operation, you have the some sets and the same connected elements between them. This may seem obvious enough, but in higher math, being able to say “this is actually the same as that” can often really simplify things.
Wow, that ended up a bit wordier than I expected. I’m gonna split this section into since the second half is reallllllly important to understand.
Next stop: One-to-one and onto