Defining a function (Discrete Math)

Click For Summary

Discussion Overview

The discussion revolves around defining functions in the context of discrete mathematics, specifically addressing homework problems that ask participants to define functions and evaluate their properties such as being well-defined, one-to-one (injective), and onto (surjective). Participants seek clarification on the expectations of the homework prompts and how to approach the problems.

Discussion Character

  • Homework-related
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant expresses confusion about the homework prompt that asks to define a function, questioning whether the provided rule itself constitutes the function.
  • Another participant clarifies that defining a function involves specifying a mapping and then analyzing its properties, such as injectivity and surjectivity.
  • Examples are provided, such as defining a function from the real numbers to themselves using the rule f(n) = n^2, and discussing its properties regarding being one-to-one and onto.
  • A participant presents a similar problem involving the function f(n) = 4n - 5 and seeks guidance on how to determine its injectivity and surjectivity.
  • There is a suggestion to consider the graphical representation of the function to understand its properties better.
  • A later reply discusses the terminology used in the homework, suggesting that "define a function" may simply mean to consider the function and analyze it.
  • Another participant elaborates on the definition of a function in set theory, providing two formal definitions and discussing the implications for the homework questions.

Areas of Agreement / Disagreement

Participants generally agree on the need to clarify the meaning of "defining a function" and the properties that need to be evaluated. However, there is no consensus on the best approach to tackle the homework problems, as participants express varying levels of understanding and confusion regarding the definitions and requirements.

Contextual Notes

Some participants note that the wording of the homework may lead to confusion, particularly regarding what is meant by "well-defined." There are also discussions about the implications of different definitions of functions in set theory, which may affect how participants approach the problems.

transmini
Messages
81
Reaction score
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.
 
Mathematics news on Phys.org
Well, its basically saying:
Define a function (mappping) f where f:S\rightarrow S where n\rightarrow n^2 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 f:A\rightarrow B, for each a \in A there exists a unique b \in B such that f(a)=b
 
An example, let S=\mathbb{R}.
Ask yourself: Is f:\mathbb{R}\rightarrow \mathbb{R},n\rightarrow n^2 one-to-one? (Is there a unique b in B such that f(a)=b, for a unique a in A)?

Well, -2 \in \mathbb{R} and we see that f(-2)=4
at the same time, 2 \in \mathbb{R} 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 \mathbb{R}

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.
 
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.
 
transmini said:
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.
Well, think about it graphically: 4n-5 is a line. Does a line in the (\mathbb{Z},\mathbb{Z}) 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)
 
I meant as far as the "Define a function" part goes. I should be able to show the others, I think...
 
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, I am saying look at this function and answer the following questions about it.
 
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!
 
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.
 
  • #10
transmini said:
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.
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:
  • Like
Likes   Reactions: gracy

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
4
Views
5K
Replies
11
Views
12K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K