2

I am troubled by the lack of consensus in the stack exchange post . Is it possible to get a definitive clarification.

Does a function need to map every element in the domain to an element in the codomain?

However if you define a function's domain as the set of inputs that have a meaningful output, then yes a function must map all elements in its domain to its codomain.

Also see this pdf they make a distinction between 'input domain' and then just 'domain'.

john
  • 860
  • You have the answer to your own question. – conditionalMethod Nov 19 '19 at 04:25
  • 1
    There is consensus. But consensus doesn't mean that a word needs to have a unique use. When you use function in the context of the theory of computation, or in the context of some introductions to calculus, it could be used to mean a partial function. In most other cases people assume that they are defined everywhere. When needed then people use the more descriptive names partial function and total function. – conditionalMethod Nov 19 '19 at 04:32
  • 3
    There is no lack of consensus, a function of sets $f: X \rightarrow Y$ is a rule assigning each $x \in X$ to an element $f(x)\in Y$. – Noel Lundström Nov 19 '19 at 04:33
  • It is common in calculus courses to define functions such as $f: \mathbb R \to \mathbb R $ by the rule $f(x)=\frac 1 x $. Then according to this definition is not a function, because $ 0 \in \mathbb R $ is not mapped to any value in $ \mathbb R $ – john Nov 19 '19 at 04:36
  • 2
    @john : What books are those? If they explicitly write $f:\mathbb{R}\rightarrow\mathbb{R}$, it means they must define an $f(0) \in \mathbb{R}$. – Michael Nov 19 '19 at 04:38
  • 1
    Does it say $f:\mathbb{R}\rightarrow\mathbb{R}$? – Michael Nov 19 '19 at 04:39
  • 1
    Don't sweat it. Mathematics are not a monolithic collection of definitions. Definitions are not substance. They are language, and as language they present all the fluidity and ambiguities of any other language when you look at all possible uses that they are given. When in doubt explain more, if it is you the one explaining, or check the context of what you are reading, or ask who you are listening to if you need clarification. – conditionalMethod Nov 19 '19 at 04:41
  • Number IV here, it says the function maps from the real numbers to the real numbers https://snipboard.io/ZqTybm.jpg So according to your definition this is not a function. – john Nov 19 '19 at 04:42
  • 1
    In that, I assume you are only concerned about $f(x) = \ln(x)$, indeed that is not a function from the reals to the reals. – Michael Nov 19 '19 at 04:43
  • "Mathematics are not a monolithic collection of definitions..." Good point! – john Nov 19 '19 at 04:43
  • @Michael I actually own a book that defines functions in a way that wikipedia would define it as a partial function. Its called Introduction to mathematical structures by Steven Galovich, https://b-ok.org/book/3597928/771249 – john Nov 19 '19 at 04:52
  • 1
    I have never heard of a "partial function," that concept seems to add unnecessary complexity. In your book with the question, I think it is just a mistake (books have mistakes). If this is a homework I would just answer reasonably like "$f(x)=\ln(x)$ is not a function from reals to reals but we can treat it as $f:(0,\infty)\rightarrow\mathbb{R}$ and this is both injective and surjective." – Michael Nov 19 '19 at 04:55
  • @Michael for use of "partial function" see https://math.stackexchange.com/a/177622/266200 – john Nov 19 '19 at 05:03
  • 1
    I like the first comment about $f:A\rightarrow B \cup {Undefined}$. You could define a sum $$f:\mathbb{R}^{\mathbb{N}}\rightarrow\mathbb{R} \cup {\infty}\cup {-\infty}\cup {Undefined}$$ by $f({x_1, x_2, ...}) = \lim_{n\rightarrow\infty}\sum_{i=1}^{n}x_i$. So then $f({1}{n=1}^{\infty})=\infty$ and $f({(-1)^n}{n=1}^{\infty})=Undefined$. – Michael Nov 19 '19 at 10:24

0 Answers0