3

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 Answers3

2

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.

Ittay Weiss
  • 79,840
  • 7
  • 141
  • 236
0

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.

Mary Star
  • 13,956
0

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