Mathematics for Computing - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Mathematics for Computing

Description:

Mathematics for Computing. Lecture 8: Functions. Dr Andrew Purkiss-Trew. Cancer Research UK ... Functions relate two sets of numbers: Each x gives a value of y ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 17
Provided by: peopleCr7
Category:

less

Transcript and Presenter's Notes

Title: Mathematics for Computing


1
Mathematics for Computing
Lecture 8 Functions Dr Andrew
Purkiss-Trew Cancer Research UK e-mail
a.purkiss_at_mail.cryst.bbk.ac.uk
2
Functions
  • Functions
  • What is a function?
  • Range and other rules
  • Composite functions
  • Inverse of function

3
Formula
  • Functions relate two sets of numbers
  • Each x gives a value of yso in the first
    function, x 2, gives y 18.In the second
    function, x 1, gives y -1.

4
General form
  • General formuse f,g or h to represent
    function.

5
Functions and Sets
  • Definition For sets X and Y, A function from X
    to Y is a rule that assigns each element of X to
    a single element of Y
  • X is the domain, Y is the codomain
  • If is any element of X. Then each element of
    Y assigned to is called the image of and
    written

6
Example

x
x2
f
7
Range
  • If fX?Y is a function then the range isy?Y y
    f(x) for some or all x?X
  • Example The range of f is yy?0

8
Another example
  • A 1,3,5, B2,4,6,8
  • fA ?B, f(1)2, f(3)6, f(5)2
  • The range of f 2,6

1 3 5 A
2 4 6 8 B
9
More definitions
  • OntoA function is onto if its range is equal to
    its codomain.
  • One-to-oneA function is one-to-one if no two
    distinct elements of the domain have the same
    image.

10
Examples of definitions
Not one-to-one Not onto
One-to-one Not onto
Not one-to-one Onto
One-to-one Onto
Not a function
11
Composite functions
  • Composite function link two functions together
  • Let A,B and C be arbitrary setsfA?B and gB?C
  • Input is xx?A and output g(f(x))?C

f(x)
g(f(x))
x
f
g
12
Composite Functions 2
  • Formal definitionLet fA?B and gB?C. The
    composite function of f and g is g o f A?C,
    (g o f)(x) g(f(x))

13
Composite Function Example
  • fR?R, f(x) x2 and gR?R, g(x) 2x 1
  • f o g R?R, (f o g)(x) f(g(x))
    f(2x1) (2x1)2
  • g o f R?R, (g o f)(x) g(f(x))
    g(x2) 2x21

14
Identity and Inverse
  • IdentityIA?A, i(x)x
  • Inverse of a function is the function that
    reverses the effect of the function. It is
    represented by f 1 for the function f

15
Inverse 2
  • Let fA?B and gB?A be functionsIf g o f A?A
    is the identity function on A and if f o g B?B
    is the identity function on B, then f is the
    inverse of g (and g is the inverse of f )

16
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com