Functions - Discrete Mathematics

 

2.101 Introduction to functions

See references 1, 2

Definition:

A function is a relation between a set of inputs A and a set of outputs B.
Each input maps to exactly one output.
Multiple items in A can map to a single item in B.

Every element x in the domain of a function has one output f(x).




Example of a function:

  • each item A has an output in B




Example of a relationship that is not a function:
  • 65 has no output
  • 62 has 2 outputs




$$ f: A \rightarrow B $$
Read as: function f maps A to B.

$$ x \in A: x \rightarrow f(x) = y \ \ \ (y \in B) $$

Definition of domain:
A is the set of inputs and is called the domain of f.
We write:
$$ D_f = A $$


Definition of co-domain:
B is the set of outputs and is called the co-domain of f.
We write:
$$ coD_f = B $$

y is called the image of x,

whereas x is called the pre-image of y.

We write:

$$ f(x) = y $$


Definition of range:
R is the subset of B and a set of all outputs (images) and is called the range of f.
The range of a function is the set of all images.
The range of a function is a subset of its corresponding co-domain.

We write:
$$ R_f \subseteq coD_f $$


Example:

A = {0, 1, 2, 3, 4, ...}

B = {0, 1, 2, 3, 4, ...}

$ x \rightarrow 2x+1 $
$ D_f = A $
$ coD_f = B $
R = {1, 3, 5, 7, 9, ...}
f(0) = 1
f(1) = 3
Image of x, f(x) = y





Exercise:

$ f: Z \rightarrow Z \ with \  f(x) = |x| $ // integers, absolute value of x
$ D_f = Z $
$ coD_f = Z $
$ R_f = Z \{0\} = \{0, 1, 2, 3, ...\} $
f(-1) = f(1) = 1, hence pre-images of 1 = {-1, 1}


Exercise

$ g: R \rightarrow  R \ with \  g(x) = x^2 + 1$ 
$ D_g = R $ // real numbers
$ coD_g = R $
  • any number squared is positive
  • +1 makes for bigger than 1
$ R_g = [1, +\infty] $
g(-2) = g(2) = 5 hence, pre-images of 5 = {-2, 2}



Plotting Functions


see reference #3


Linear Functions

$$ f(x) = ax + b $$

  • straight line function
  • passes through the point (0, b)
  • a is the gradient
$$ f: R \rightarrow R \ with f(x) = ax + b $$

  • if gradient a > 0 then the function is increasing
    • $ x_1 < x_2 $ then $ f(x_1) < f(x_2) $




Quadratic Functions


$$ f(x) = ax^2 + bx = c $$

  • where a, b, and c are the numbers and a $ \neq $ 0






Exponential Function

$$ f(x)  = b^x \ where \ b > 0 \ and \ b \neq 1 $$

  • variable b is called the base of the function
  • Domain $ ]-\infty, \infty[ $
  • Range $ ]0, \infty[ $
  • Horizontal asymptote y= 0




Exponential decay function 









Laws of Exponents

$ b^x \cdot b^y  = b^{x+y} $

$ \frac{b^x}{b^y} = b^{x-y} $

$  (b^x)^y = b^{xy} $

$  (ab)^x = a^x \cdot b^x $

$ (\frac{a}{b})^x = \frac{a^x}{b^x} $

$ b^{-x} = \frac{1}{b^x} $

$ x^{\frac{m}{n}} = ( \sqrt[n]{x})^m  = \sqrt[n]{x^m} $


Natural Logarithm function

see reference 4




2.106 Injective and surjective functions

see reference 5

Injective (one-to-one) Functions

  • one-to-one function
  • Let $ f: A \rightarrow B $ be a function
    • Definition: f is said to be an injective (one-to-one) function if and only if:
      • for all $ a,b \in A $, if $ a \neq b $ then $ f(a) \neq f(b) $










Surjective (onto) functions





















Resources

  1. https://www.coursera.org/learn/uol-discrete-mathematics/lecture/dEASs/2-101-introduction
  2. https://www.coursera.org/learn/uol-discrete-mathematics/lecture/dEASs/2-101-introduction
  3. https://www.coursera.org/learn/uol-discrete-mathematics/lecture/LJ9wV/2-104-plotting-functions
  4. https://www.youtube.com/watch?v=8qs6QxGCIQU
  5. https://www.coursera.org/learn/uol-discrete-mathematics/lecture/XyWA9/2-106-injective-and-surjective-functions



As an Amazon Associate I earn from qualifying purchases.

My favorite quotations..


“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”  by Robert A. Heinlein

"We are but habits and memories we chose to carry along." ~ Uki D. Lucas


Popular Recent Articles