Home Previous Next

MAT091 :: Lecture Note :: Week 08
Assessments | Syllabus | Email Thurman | MathBabbler: Math Resources | Facebook | Twitter
GDT::Bits:: Time  |  Weather  |  Populations  |  Special Dates

Overview
Assignment(s)
Pi Day Countdown

Introduction to Functions

A function is a "relationship" that maps each input into one and only one output.

"Relationship" is quoted because functions can be defined in a variety of ways. The following was copied from the Wikipedia.

   "The mathematical concept of a function expresses the 
    intuitive idea of deterministic dependence between two 
    quantities, one of which is viewed as primary (the independent 
    variable, argument of the function, or its 'input') and the 
    other as secondary (the value of the function, or 'output'). 

In the Wikipedia's function definition, the word deterministic implies that every input to a function always results in the same output.

Terminology

The valid inputs to a function represents the domain of the function.

The range of a function are all the possible outputs.

Inputs are independent of the outputs, but the outputs are dependent on the inputs.

Functions are typically given one letter names. In many instances, inputs are labeled (named) 'x' and outputs are labeled (named) 'y'.

              +----------+
   input ---> | function | ---> output
     x        +----------+         y

   y = f(x)   or    f(x) = y

   y is the output, x is the input, f() is the function name

The following is a function with an implementation.

   f(x) = 2x                   [each input is multiplied by 2]

   f(-2) outputs -4            [input is -2]
   f(-1) outputs -2            [input is -1]
   f(0) outputs 0              [input is 0]
   f(1) outputs 2              [input is 1]
   f(2) outputs 4              [input is 2]

   f() is a function because each input produces only one output.
   Notice how each output value depends on the input value.

   The domain of f() is all real numbers.
   The range of f() is all real numbers.

   Function f() could be named doubler() because the output
   is always double (or 2 times) the input.  

   doubler(5) outputs 10
   doubler(-10) outputs -20
   doubler(5 * 3) outputs 30
   doubler(1 - 2 - 3) outputs -8

Public domain dot-png from Wikipedia.org...

Are They Functions?
   Is f() a potential function?  If yes, what's its domain and range?

           +-------+
   1 ----> |  f()  | ---->  -1          f(1) = -1            (1, -1)
           +-------+
           +-------+
   2 ----> |  f()  | ---->  -2          f(2) = -2            (2, -2)
           +-------+
           +-------+
   3 ----> |  f()  | ---->  -3          f(3) = -3            (3, -3)
           +-------+


   Is g() a potential function?  If yes, what's its domain and range?

           +-------+
   1 ----> |  g()  | ---->  -1          g(1) = -1            (1, -1)
           +-------+
           +-------+
   2 ----> |  g()  | ---->  -2          g(2) = -2            (2, -2)
           +-------+
           +-------+
   3 ----> |  g()  | ---->  -2          g(3) = -2            (3, -2)
           +-------+

   Is h() a potential function?  If yes, what's its domain and range?

           +-------+
   1 ----> |  h()  | ---->  -1          h(1) = -1            (1, -1)
           +-------+
           +-------+
   2 ----> |  h()  | ---->  -2          h(2) = -2            (2, -2)
           +-------+
           +-------+
   2 ----> |  h()  | ---->  -3          h(2) = -3            (2, -3)
           +-------+
           +-------+
   3 ----> |  h()  | ---->  -4          h(3) = -4            (3, -4)
           +-------+

   Is Q() a potential function?  If yes, what's its domain and range?

           +-------+
   1 ----> |  Q()  | ---->  -1          Q(1) = -1            (1, -1)
           +-------+
           +-------+ 
   2 ----> |  Q()  | ---->  -2          Q(2) = -2            (2, -2)
           +-------+
           +-------+
   2 ----> |  Q()  | ---->  -2          Q(2) = -2            (2, -2)
           +-------+
           +-------+
   3 ----> |  Q()  | ---->  -3          Q(3) = -3            (3, -3)
           +-------+

If a function receives an input that is not in its domain, then the output of the function is "undefined." (i.e. A function does not work on inputs that are not in its domain.) If the domain of a function is not stated, then the its domain is all real numbers.

Related BABs and External Hyperlink(s)

{PurpleMath} {MathPapa} {KhanAcademy} {UdacityMOOC} {OpenAlgebra} {InteractiveMathematics} {TIcalculatorHelp}
{SCC math resources... MathAS::id 6433, key 6433 | OER::textbook | playbook}
{TopOfPage} {classroom: quiet | thinking | speed e-raser | wave erase}


Terminology Related To Functions

A function takes one input value and produces one output value. The same input value always produces the same output value.

   input     domain    indepedent     horizontal-axis     x-axis
   output    range     dependent      vertical-axis       y-axis

If a specific domain is not given for a function, then its domain is all real numbers.

If a function receives an input that is not in its domain, then the output of the function is undefined (i.e. the function doesn't work).

The output depends on the input. The input is independent of the output.

For a given domain, a function always produces the same range.

   f(x) is read "f of x"     [not f times x]
   g(n) is read "g of n"     [not g times n]
   h(t) is read "h of t"     [not h times t]

   f(x), g(n), h(t) all represent an output value

   f(x) is a function of x   [f(x) depends on x]
   g(n) is a function of n   [g(n) depends on n]
   h(t) is a function of t   [h(t) depends on t]

{PurpleMath} {MathPapa} {KhanAcademy} {UdacityMOOC} {OpenAlgebra} {InteractiveMathematics} {TIcalculatorHelp}
{SCC math resources... MathAS::id 6433, key 6433 | OER::textbook | playbook}
{TopOfPage} {classroom: quiet | thinking | speed e-raser | wave erase}


Constant Function

A constant function is a function that produces the same output regardless of the input.

   f(x) = k, where k is a constant

The graph of a constant function is a horizontal line.

If zero is in the function's domain, then the constant function intersects the vertical-axis at its constant output value.

   f(x) = 3

   f(-2) = 3
   f(0) = 3
   f(2) = 3

   The graph for f() is a horizontal line that intersects 
   the vertical-axis at the point (0,3).

          | 5 
          |
   A------B------C        A: (-2,3)   B: (0,3)   C: (2,3)
          |
          |
   -------+-------
   -2     |      2
          |
          |
          |
          | -5

Unless stated otherwise, the domain of a constant function is all real numbers. The range of the constant function is the constant value that it always outputs.

Example of a Constant Functon

The following is the Speed At Stop Sign Function (SASSF).

   f(s) = 0 MPH

   's'  is the speed at which a vehicle approaches a stop sign
   f(s) is the speed a vehicle should be moving at a stop sign

   's' and f(s) are both in units of MPH (Miles Per Hour)

   domain:  0 < s < infinity
    range:  0

   note:  For this specific constant function, the output does 
          not depend on the input.

   note:  As of 8 June 2007, the land speed record is 763 MPH;
          therefore, the practical domain for this function 
          could be 0 < s < 763.
Constant Functions are Linear Functions

A constant function is a linear function having zero slope.

   f(x) = mx + b for a constant function is f(x) = 0x + b

{PurpleMath} {MathPapa} {KhanAcademy} {UdacityMOOC} {OpenAlgebra} {InteractiveMathematics} {TIcalculatorHelp}
{SCC math resources... MathAS::id 6433, key 6433 | OER::textbook | playbook}
{TopOfPage} {classroom: quiet | thinking | speed e-raser | wave erase}


Identity Function

A identity function is a function that returns its input for all valid inputs.

   f(x) = x

The graph of an identity function is straight line having a slope of one.

If zero is in the function's domain, then the indentity function intersects the vertical-axis at point (0,0).

   f(x) = x              [implementation]

   f(-2) = -2
   f(-1) = -1
   f(0) = 0
   f(1) = 1
   f(2) = 2

   The graph for f() is a straight line having a slope of 
   one that intersects the vertical-axis at the point (0,0).

          | 5 
          |
          |                                              
          |     E             E: (2, 2)
   -2     |  D                D: (1, 1)
    ------C------             C: (0, 0)
       B  |     2             B: (-1, -1)
    A     |                   A: (-2, -2)
          |
          |
          | -5

{PurpleMath} {MathPapa} {KhanAcademy} {UdacityMOOC} {OpenAlgebra} {InteractiveMathematics} {TIcalculatorHelp}
{SCC math resources... MathAS::id 6433, key 6433 | OER::textbook | playbook}
{TopOfPage} {classroom: quiet | thinking | speed e-raser | wave erase}


Absolute Value Function

The absolute value function outputs the absolute value of its input.

   f(x) = |x|

The graph of an absolute value function, where the domain is all real numbers, is two staight lines that intersect at point (0,0). There is a straight line in the 2nd quadrant that has a slope of -1 and there is a straight line in the 1st quadrant having a slope of 1.

   f(x) = |x|

   f(-4) = 4
   f(-2) = 2
   f(0) = 0
   f(2) = 2
   f(4) = 4

                | 5 
   A            |            E          A: (-4,4)    E: (4,4)
                |
         B      |      D                B: (-2,2)    D: (2,2)
                |
   -------------C-------------          C: (0,0)
  -4            |            4
                |
                |
                |
                | -5

If the domain of an absolute value function is all real numbers, then its range is all real numbers greater than or equal to zero.

{PurpleMath} {MathPapa} {KhanAcademy} {UdacityMOOC} {OpenAlgebra} {InteractiveMathematics} {TIcalculatorHelp}
{SCC math resources... MathAS::id 6433, key 6433 | OER::textbook | playbook}
{TopOfPage} {classroom: quiet | thinking | speed e-raser | wave erase}


Ordered Pairs

The inputs and outputs of a function are often represented as ordered pairs (or points).

   (input, output) ...or... (x, y) ...or... (x, f(x))
                            (t, n) ...or... (t, f(t))
                            (n, o) ...or... (n, f(n))
                            (a, b) ...or... (a, f(a))

The input is always the first value recorded followed by its respective output.

Data contained in tables can sometimes be represented as ordered-pairs.

   input:  month ......... output:  #days

   month |  1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |  9 | 10 | 11 | 12 
   ------------------------------------------------------------------
   #days | 31 | 28 | 31 | 30 | 31 | 30 | 31 | 31 | 30 | 31 | 30 | 31

   (1, 31)   (2, 28)  (3, 31)  (4, 30)   (5, 31)  (6, 30)
   (7, 31)   (8, 31)  (9, 30)  (10, 31)  (11,30)  (12, 31)

   #days depends on the month (i.e. the output depends on the input)

   The function  f(m)  takes a month as input and outputs 
   the number of days in that month.

   f(m) = n      

   f(1) = 31
   f(2) = 28
   f(7) = 31
   f(12) = 31

Ordered-pairs are points that can be graphed. The input is along the horizontal-axis and output is along the vertical-axis.

The following ordered-pairs could represent a function because all of the inputs are unique (i.e. different).

   (-2, 3)  (0, 4)  (5, -2)  (7, 4)  (11, 7)

The following ordered-pairs could represent a function because all of the inputs are unique although some of the inputs repeat.

   (-2, 3)  (0, 4)  (5, -2)  (7, 4)  (11, 7)  (0, 4)

The following ordered-pairs cannot be a function because input 3 produces different outputs (2 and 5).

   (-2, 3)  (0, 4)  (-2, 3)  (3, 2)  (0, 4)  (3, 5)

{PurpleMath} {MathPapa} {KhanAcademy} {UdacityMOOC} {OpenAlgebra} {InteractiveMathematics} {TIcalculatorHelp}
{SCC math resources... MathAS::id 6433, key 6433 | OER::textbook | playbook}
{TopOfPage} {classroom: quiet | thinking | speed e-raser | wave erase}


Using Tables To Represent Functions

When it comes to graphing functions, tables and other forms of data, input values are scaled along the horizontal-axis and output values are scaled along the vertical-axis.

When it comes to naming variables, the letter x is often used to represent the input variable and the letter y is used to represent the output variable; however, any letters can be used when it comes to naming input and output variables.

                                 Table A
   ===============================================================
    input: year (y)     | 2001 | 2002 | 2003 | 2004 | 2005 | 2007 
   ---------------------------------------------------------------
   output: # x-rays (x) |  55     43     81     24     43     61

   The # of x-rays is a function of the year; i.e. year is the input 
   and # of x-rays is the output.  For this function, the input 
   variable is named 'y' and the output variable is named 'x'.

   Table A expressed using function notation.

      f(y) = x
      f(2001) = 55
      f(2002) = 43
      f(2003) = 81
      ...
      f(2000) = undefined  [cannot extrapolate]
      f(2006) = undefined  [cannot interpolate]


                               Table B
   ==============================================================
    input: hours (h)     | 1  |  2  |  3  |  4  |  5  |  6  |  7
   --------------------------------------------------------------
   output: minutes (m)   | 60 | 120 | 180 | 240 | 300 | 360 | 420

   Number of minutes is a function of number of hours.
   One hour is 60 minutes, two hours is 120 minutes, etc.  

   Table B expressed using function notation.

      g(h) = m = 60(h)
      g(1) = 60
      g(4) = 240
      g(7) = 420
      g(2.5) = 150   [interpolation]
      g(5.25) = 315  [interpolation]
      g(0) = 0       [extrapolation]
      g(8) = 480     [extrapolation]

[definition] A function is a "relation for which each element of the domain corresponds to exactly one element of the range."

{PurpleMath} {MathPapa} {KhanAcademy} {UdacityMOOC} {OpenAlgebra} {InteractiveMathematics} {TIcalculatorHelp}
{SCC math resources... MathAS::id 6433, key 6433 | OER::textbook | playbook}
{TopOfPage} {classroom: quiet | thinking | speed e-raser | wave erase}


Home Previous Next