This is a very basic question I guess, if I have something like f:A->B, should all the elements in set A be used for f to be a function?
3 Answers
Yes, that is part of the definition of a function. If $f$ is undefined for some elements in the domain but otherwise satisfies the conditions for a function, then it is called a partial function.
- 79,840
- 7
- 141
- 236
A function is a relation between a set of inputs(domain) and a set of permissible outputs(range) with the property that each input is related to exactly one output.
A well-defined function must map every element of its domain to an element of its range.
- 13,956
-
2Thank you very much. That explains it a lot – lueenavarro Aug 24 '14 at 10:41
All of $A$ must be used. But all elements of $B$ need not be mapped to. If all the elements are mapped too, this is known as a surjectivity.
For completeness I will note that having a one to one relationship, that is no element in $A$ maps to two elements of $B$ and no element of $B$ is obtained in mapping from two distinct elements $a_i \;\&\; a_j \in A$, you have injectivity. Together these two properties(and only requiring these two) satisfy a bijection between $A$ and $B$.
- 401
- 1
- 5
- 10
-
Injectivity means that no two elements of $A$ map to the same element of $B$. You can't have a single element of $A$ mapped to two distinct elements of $B$ because that wouldn't be a function. – David Richerby Aug 24 '14 at 13:13
-
@DavidRicherby I am sorry for that, it is now fixed. – Partly Putrid Pile of Pus Aug 24 '14 at 14:09