Lesson 1 · Introduction to Series and Sigma (Σ) Notation

Types of Function

Optional MathematicsSubject
8 minEstimated read

Domain, Codomain, Range: the Words Every Type Uses

A function \( f: A \to B \) is a rule that sends every element of set A to exactly one element of set B. Set A is the domain. Set B is the codomain. When an element x is sent to y, we say y is the image of x, and x is a pre-image of y. The set of all images actually used is the range. The range is always a part of the codomain, but it does not have to be all of it.

Every type in this topic is a type of function, so the first check is always whether the relation is a function at all. On a graph, this is the vertical line test: if any vertical line cuts the graph at more than one point, one x has more than one y, and the graph is not a function. Try it on the eight graphs below before reading the table.

Graphs c, e and g: slide a vertical line across each one.
Graphs c, e and g: slide a vertical line across each one.
Graphs d, f and h: a loop or a closed curve fails the test.
Graphs d, f and h: a loop or a closed curve fails the test.
Graph i: separate horizontal steps.
Graph i: separate horizontal steps.
Graph j: a line with a peak and a slope.
Graph j: a line with a peak and a slope.
GraphWhat a vertical line doesFunction?
cMeets the curve once everywhereYes
dMeets the curve three times near the y-axisNo
eMeets the two crossing lines twiceNo
fMeets the oval twiceNo
gMeets the curve three times near the originNo
hMeets the curve once everywhereYes
iMeets only one step at a timeYes
jMeets the line once everywhereYes
Key idea

Functions are sorted by asking two separate questions. First: is every element of the codomain used? That decides onto or into. Second: does any image have more than one pre-image? That decides one to one or many to one.

Onto Function

Definition

Onto function: a function \( f: A \to B \) is onto if its range is equal to its codomain. Every element of B is the image of at least one element of A.

To test for onto, look at the codomain, not the domain. Go through each element of B and ask: does at least one arrow land here? If every element of B receives an arrow, nothing in B is left out, and the function is onto.

f₁ is onto: a, b and c in B each receive an arrow.
f₁ is onto: a, b and c in B each receive an arrow.
f₂ is onto: both 1 and 2 in B receive an arrow, even though one of them receives two.
f₂ is onto: both 1 and 2 in B receive an arrow, even though one of them receives two.

In f₂, two elements of A share the same image. That does not stop the function being onto. Onto only asks whether all of B is used, not how many arrows arrive at each element.

Into Function

Definition

Into function: a function \( f: A \to B \) is into if its range is a proper subset of its codomain. At least one element of B is not the image of any element of A.

Into is the opposite of onto. If even one element of B is left without an arrow, the range is smaller than the codomain and the function is into. Every function is either onto or into, never both.

g₁ is into: b and c in B receive no arrow.
g₁ is into: b and c in B receive no arrow.
g₂ is into: c in B receives no arrow.
g₂ is into: c in B receives no arrow.
Common mistake

An element of the domain with no arrow means the relation is not a function at all. An element of the codomain with no arrow is allowed, and it simply makes the function into. Do not mix up the two sets.

One to One Function

Definition

One to one function: a function \( f: A \to B \) is one to one if each image has a unique pre-image in the domain. Different elements of A always have different images.

To test for one to one, look at the arrows arriving in B. If no element of B receives two or more arrows, every image has only one pre-image, and the function is one to one. A one to one function can still be onto or into, so we often name both properties together.

h₁ is one to one and into: each image has one pre-image, but d in B is not used.
h₁ is one to one and into: each image has one pre-image, but d in B is not used.
h₂ is one to one and onto: each image has one pre-image, and every element of B is used.
h₂ is one to one and onto: each image has one pre-image, and every element of B is used.

Many to One Function

Definition

Many to one function: a function \( f: A \to B \) is many to one if at least one image has more than one pre-image in the domain.

If two or more arrows meet at the same element of B, that element is an image with several pre-images, and the function is many to one. For example, with \( f(x) = x^2 \), both 2 and \( -2 \) have the image 4, so squaring is many to one on a set that holds both.

i₁ is many to one and onto: two arrows meet at b, and a, b, c are all used.
i₁ is many to one and onto: two arrows meet at b, and a, b, c are all used.
i₂ is many to one and into: two arrows meet at one element, and d in B is not used.
i₂ is many to one and into: two arrows meet at one element, and d in B is not used.

Putting the Two Questions Together

Because the two questions are independent, every function gets one answer from each. That gives four possible combined names.

NameImage has two or more pre-images?Every element of B used?
One to one and ontoNoYes
One to one and intoNoNo
Many to one and ontoYesYes
Many to one and intoYesNo

Counting elements gives a quick check. If A has fewer elements than B, the function cannot be onto, because there are not enough arrows to reach every element of B. If A has more elements than B, the function cannot be one to one, because at least two arrows must land on the same element.

Constant Function

Definition

Constant function: a function \( f: A \to B \) is constant if every element of the domain has the same single image, so the range contains only one element. It is written \( f(x) = c \), where c is a fixed number.

In a constant function, the input makes no difference to the output. On an arrow diagram, every arrow ends at the same element. On a graph, every point sits at the same height, so the points lie on a horizontal line.

h(x): the points for x = 1, 2 and 3 are all at height 3, so \( h(x) = 3 \).
h(x): the points for x = 1, 2 and 3 are all at height 3, so \( h(x) = 3 \).
f(x): 1, 2 and 3 all go to the same image, 2, so \( f(x) = 2 \).
f(x): 1, 2 and 3 all go to the same image, 2, so \( f(x) = 2 \).

A constant function on a domain with more than one element is also many to one, since every element shares one image.

Identity Function

Definition

Identity function: a function is an identity function if the image of each element is the element itself, that is, \( f(x) = x \). Each element maps onto itself.

For an identity function the domain and the codomain are the same set, and the image and the pre-image are the same. So 1 goes to 1, 2 goes to 2, and 3 goes to 3. Its graph is a straight line through the origin, and each of its points has equal coordinates, like \( (1, 1) \), \( (2, 2) \) and \( (3, 3) \).

g₂(x) as a graph and g₁(x) as an arrow diagram: each element is sent to itself.
g₂(x) as a graph and g₁(x) as an arrow diagram: each element is sent to itself.

An identity function is always one to one and onto, because every element of the set is used exactly once as an image.

Linear Function

Definition

Linear function: a function of the form \( f(x) = mx + c \) is a linear function. Its graph is a straight line with slope m and y-intercept c.

\[ f(x) = mx + c \]

The slope m measures how steep the line is, and the line makes an angle \( \theta \) with the positive x-axis. The y-intercept c is the height at which the line crosses the y-axis. The graph takes different forms depending on the value of m.

When \( m = 0 \) the function is \( y = c \), a horizontal line.
When \( m = 0 \) the function is \( y = c \), a horizontal line.
When m has a definite value the line \( y = mx + c \) is slanted and crosses the y-axis at c.
When m has a definite value the line \( y = mx + c \) is slanted and crosses the y-axis at c.
  • When \( m = 0 \), the rule becomes \( f(x) = c \). This is the constant function, drawn as a horizontal line.
  • When m is positive, the line rises from left to right.
  • When m is negative, the line falls from left to right.
  • When \( m = 1 \) and \( c = 0 \), the rule becomes \( f(x) = x \). This is the identity function.

Take \( f(x) = 2x + 1 \). Here \( m = 2 \) and \( c = 1 \).

Step 1: Putting \( x = 0 \) gives the y-intercept:

\[ f(0) = 2 \times 0 + 1 = 1 \]

Step 2: Putting \( x = 1 \):

\[ f(1) = 2 \times 1 + 1 = 3 \]

Step 3: Putting \( x = 2 \):

\[ f(2) = 2 \times 2 + 1 = 5 \]

Each time x goes up by 1, y goes up by 2, which is the slope. The points \( (0, 1) \), \( (1, 3) \) and \( (2, 5) \) lie on one straight line that rises and crosses the y-axis at 1.

How to Name the Type of a Function

Whether the function is given as an arrow diagram, a set of ordered pairs or a graph, the same checks work in the same order.

  • Check it is a function: every element of the domain has exactly one image.
  • Write down the codomain and the range.
  • Compare them: equal means onto, a proper subset means into.
  • Look for an image with two or more pre-images: if there is one, the function is many to one, otherwise one to one.
  • Look at the rule: one image for everything means constant, each element to itself means identity, and \( mx + c \) means linear.
Careful with the codomain

Onto or into depends on the codomain you are given. The pairs \( (1, 2), (2, 4), (3, 6) \) are onto if B is \( \{2, 4, 6\} \) but into if B is \( \{2, 4, 6, 8\} \). Always read what B is before deciding.

🔐

The full lesson is waiting for you

The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.