0
$\begingroup$

For example if I define a function such as

$f(x) = x^2$

then set the domain to be {$x|x\in\mathbb{Z}$}

it follows then, that the range is {$f(x)|f(x)\in\mathbb{Z^+}$}

from my understanding of the codomain, it is defined by us when we create a function, therefore in this case would the codomain of the function be undefined, as we haven't set it or would it be $\mathbb{Z}$ or $\mathbb{Z^+}$

$\endgroup$
11
  • 1
    $\begingroup$ If you haven't defined the codomain, then you haven't defined the function. $\endgroup$ Commented Jul 25, 2023 at 13:00
  • 1
    $\begingroup$ $\{x \mid x \in \mathbb{Z}\}$ is just the same as $\mathbb{Z}$, of course. $\{f(x) \mid f(x) \in \mathbb{Z}^+\}$ is an unusual notation since $f(x)$ is not a variable. $\endgroup$ Commented Jul 25, 2023 at 13:01
  • 2
    $\begingroup$ See the post Codomain of a function as well as Isn't codomain of a function ambiguous? and Codomain as part of the definition of a function $\endgroup$ Commented Jul 25, 2023 at 13:01
  • 1
    $\begingroup$ @Randall So then the codomain can never be interpreted based on the function definition itself? It must also be defined alongside the function. $\endgroup$ Commented Jul 25, 2023 at 13:05
  • 2
    $\begingroup$ Yes, correct. The definition of a function $f: A \to B$ includes a reference to $B$ already. $\endgroup$ Commented Jul 25, 2023 at 13:07

1 Answer 1

0
$\begingroup$

If we want to be precisely technical, we should always specify the codomain when defining a function. A common way of writing this is

Define function $f: \mathbb{Z} \to \mathbb{Z}$ by $f(x) = x^2$.

Though in less strict contexts, we sometimes use an implicit codomain, especially when the exact codomain set doesn't matter. If you say "Define function $f$ on $\mathbb{Z}$ by $f(x) = x^2$" without mentioning a codomain, I'd probably assume the codomain is also $\mathbb{Z}$. If it makes sense for the formula, a codomain equal to the domain often makes sense. Or often if you don't specify the codomain, it's because it doesn't actually matter: everything we later say about $f$ is true no matter whether the codomain of $f$ is $\mathbb{Z}^+$ (defined to include $0$!) or $\mathbb{Z}$ or $\mathbb{R}$.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.