Labs ICT
โญ Pro Login

Functions

Learn about functions, domains, codomains, and ranges.

What Is a Function?

A function f from set A to set B is a relation that assigns exactly one element of B to each element of A. We write f: A โ†’ B.

Key Terms:
  Domain:        Set A (all possible inputs)
  Codomain:      Set B (all possible outputs)
  Range/Image:   The set of actual outputs: {f(a) | a โˆˆ A}

Example: f: โ„ โ†’ โ„, f(x) = xยฒ
  Domain: โ„, Codomain: โ„, Range: [0, โˆž)

Function Notation

f: A โ†’ B means for every a โˆˆ A, there is exactly one f(a) โˆˆ B

Examples:
  f(x) = 2x + 1       Linear function
  g(x) = xยฒ           Quadratic function
  h(x) = |x|          Absolute value function

Not a function: xยฒ + yยฒ = 1 (y is not uniquely determined by x)

Special Functions

Identity:    id_A(x) = x for all x โˆˆ A
Constant:    f(x) = c for all x โˆˆ A
Floor:       โŒŠxโŒ‹ = greatest integer โ‰ค x
Ceiling:     โŒˆxโŒ‰ = smallest integer โ‰ฅ x
Modular:     f(a) = a mod n

๐Ÿงช Quick Quiz

A function f: A โ†’ B is a valid function if: