0

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^+}$

Dan Lupu
  • 201

1 Answers1

0

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}$.

aschepler
  • 9,449