Codomain and range
For a Function , the codomain is the declared target set . The range, also called the image, is the set of outputs the function actually reaches: Always,
Example
Let
\qquad f(x)=x^2.$$ The codomain is $\mathbb R$, but the range is $[0,\infty)$. Negative real numbers are in the codomain but are never outputs. If instead we define $$g:\mathbb R\to[0,\infty), \qquad g(x)=x^2,$$ then the range equals the codomain, so $g$ is [[Surjective function|surjective]]. The formula is the same, but the codomain changed. ## Why it matters Surjectivity is a statement about the codomain. You cannot decide whether a function is “onto” unless the codomain is specified. Inverses also depend on this choice: a two-sided [[Inverse functions|inverse function]] exists only when the mapping is [[Bijective function|bijective]] between the chosen domain and codomain. ## Applied intuition In physics, the range often represents physically achieved values, while the codomain represents allowed values in the model. A temperature function might have codomain $\mathbb R$, but its observed range during an experiment is a much smaller interval. Related: [[Domain]], [[Function]], [[Set]].