what is the difference between range, domain and codomain of a function?
In its simplest form the domain is all the values that go into a function, and the range is all the values that come out.
If f is a function from X to Y then the set “X” is the Domain, the set “Y” is the Codomain, and the set of elements that get pointed to in Y (the actual values produced by the function) are called the Range.