1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Defining a function (Discrete Math)

  1. Oct 15, 2015 #1
    I have multiple problems in the current homework set that say something along the lines of "try to define a function f: S -> S by the rule f(n) = n^2 for each n in S. Then it asks a couple questions such as "is the function well defined" or "is it one-to-one/onto"

    I'm just confused on what its actually wanting me to do. Could someone give like an example of what they mean? Because I would've though the rule that gave WAS the function.
     
  2. jcsd
  3. Oct 15, 2015 #2
    Well, its basically saying:
    Define a function (mappping) f where [itex]f:S\rightarrow S[/itex] where [itex]n\rightarrow n^2[/itex] for all n in S. Then show that a function defined in this way is either injective(one-to-one) or surjective(onto).
    A function is well defined if [itex]f:A\rightarrow B[/itex], for each [itex]a \in A[/itex] there exists a unique [itex]b \in B[/itex] such that [itex]f(a)=b[/itex]
     
  4. Oct 15, 2015 #3
    An example, let S=[itex]\mathbb{R}[/itex].
    Ask yourself: Is [itex]f:\mathbb{R}\rightarrow \mathbb{R}[/itex],[itex]n\rightarrow n^2[/itex] one-to-one? (Is there a unique b in B such that f(a)=b, for a unique a in A)?

    Well, [itex] -2 \in \mathbb{R}[/itex] and we see that f(-2)=4
    at the same time, [itex] 2 \in \mathbb{R}[/itex] and we see that f(2)=4

    Thus, f(2)=f(-2) so in this case, f is not one-to-one on this domain [itex]\mathbb{R}[/itex]

    You could easily show that f defined in this way is also not onto. So you could say f is not bijective (one-to-one and onto) and f is well defined.
     
  5. Oct 15, 2015 #4
    Okay so I'm still a little lost as to what to write for this. Here's another problem out of the book, not the actual problem, but it's similar.

    Define ƒ : ℤ → ℤ by the rule ƒ(n) = 4n - 5 for all integers n.
    (i) Is ƒ one-to-one? Prove or give a counterexample.
    (ii) Is ƒ onto? Prove or give a counterexample

    I'm not sure how to even get started unless it literally wants me to just answer i and ii.
     
  6. Oct 15, 2015 #5
    Well, think about it graphically: 4n-5 is a line. Does a line in the ([itex]\mathbb{Z},\mathbb{Z}[/itex]) plane have only one "x" value per "y" value? (i.e injective)
    Does every "y" value have an "x" value? (i.e onto)? (I say x,y analogous to the cartesian plane to draw you a mental picture)
     
  7. Oct 15, 2015 #6
    I meant as far as the "Define a function" part goes. I should be able to show the others, I think...
     
  8. Oct 15, 2015 #7
    By saying "define a function" your book is saying "consider a function" -its just wording.
    Basically if a say define a function: f(x)=x^2, im saying look at this function and answer the following questions about it.
     
  9. Oct 15, 2015 #8
    Oh....well that's pretty bad wording then haha. But I was confused about that since they already gave a function. Thanks for the help!
     
  10. Oct 16, 2015 #9

    Mark44

    Staff: Mentor

    Thread moved, as it is more of a generic question than an actual homework question.
    @transmini, when you post in the Homework section, you must use the homework template.
     
  11. Oct 16, 2015 #10

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    When a book asks "is the function well-defined?", what they usually mean is "Does the above actually define a function?" In the case of the original question, the answer depends on whether it's clear from the context what multiplication operation is involved in the definition of the notation n^2.

    It's usually obvious if a statement defines a function or not. When it's not, there's often an equivalence relation involved. Suppose that ~ is an equivalence relation on some set X. Then each element of X belongs to exactly one equivalence class. The equivalence class that contains x is denoted by [x]. The set of all equivalence classes is denoted by X/~. We can try to define a function f with domain X/~ by specifying what we want f([x]) to be for each equivalence class [x], but if that specification is an expression that involves x rather than [x], then it might be hard to tell if the statement defines a function or not. You would have to try replacing the x in that expression with a variable that represents an arbitrary element of [x], and see if you can prove that the new expression represents the same thing as the old one.

    In set theory, a function isn't a rule. It's useful to think of it as a rule, but it's really a set, like everything else. There are several slightly different ways to define the term "function" in set theory. This one is appropriate for the problems you're working with:

    Definition 1: A triple ##(X,Y,G)## such that ##G\subseteq X\times Y## is said to be a function from X into Y if

    (a) For all x in X, there's a y in Y such that (x,y) is in G.
    (b) For all y,z in Y, if (x,y)=(x,z) then y=z.

    If f=(X,Y,G) is a function in the sense of definition 1, then X is called the domain of f, Y is called the codomain of f, and G is called the graph of f.

    This one is also nice:

    Definition 2: A set f of ordered pairs is said to be a function the following statement holds for all (x,y), (w,z) in f: If x=w then y=z.

    The domain of f is then defined as the set of all x such that there's a y such that (x,y) is in f. (A more complicated statement is needed to make it clear that the definition of "domain" doesn't violate any set theory axioms, but this definition is accurate enough for our purposes).

    What definition 2 calls a function is what definition 1 calls the graph of a function. The terms "codomain" and "surjective" are kind of pointless if you're using definition 2. That's why I think definition 1 is more appropriate for you.
     
    Last edited: Oct 17, 2015
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Defining a function (Discrete Math)
  1. Discrete Math Question (Replies: 2)

Loading...