## Function Co-domain!

Given a function f(x) f:A --> B, can the choice of codomain affect whether or not the function is surjective? For instance, f(x) = exp(x), f:R --> R is an injection but not surjection. However, assuming we can vary the co-domain, and lets make it f: R --> (0, inf), f(x) is now bijection. Is this correct?

 Yes. The codomain pretty much determines by itself whether or not the function is surjective.
 Got it. Thanks.

## Function Co-domain!

 Quote by dijkarte Got it. Thanks.
I should probably qualify my previous post. The codomain determines surjectivity in the sense that if you define the codomain to be the same as the range of the function, then your function becomes surjective. In fact, given any function, you can restrict the codomain in such a way as to make the function surjective (you can also restrict the domain in such a way to make it injective). A different function with the same codomain obviously may not be surjective.

 But there's no rule which restricts the specification of the codomain based on the mapping rule itself as long as the range is a subset of the codomain. For instance, f(x) = sin(x) can be specified as: f: R --> R f: R --> [-2, 2) f: R --> [-1, 1] but not as f: R --> [0, 4]