Difference between revisions of "Functions:Definition"
Line 4: | Line 4: | ||
Note: a function cannot map one input to more than one output, but it can map more than one input to the same output. For example, let <math> A = \{a_1, a_2\} </math> and <math> B = \{b_1, b_2\} </math>, <math> a_1\neq a_2 </math> and <math> b_1\neq b_2 </math>. If <math> f: A\to B </math> is a relation such that <math> f(a_1) = b_1 </math> and <math> f(a_1) = b_2 </math>, then <math> f </math> is NOT a function. However, a relation <math> g: A\to B </math> such that <math> g(a_1) = b_1 </math> and <math> g(a_2) = b_1 </math> IS a valid function. | Note: a function cannot map one input to more than one output, but it can map more than one input to the same output. For example, let <math> A = \{a_1, a_2\} </math> and <math> B = \{b_1, b_2\} </math>, <math> a_1\neq a_2 </math> and <math> b_1\neq b_2 </math>. If <math> f: A\to B </math> is a relation such that <math> f(a_1) = b_1 </math> and <math> f(a_1) = b_2 </math>, then <math> f </math> is NOT a function. However, a relation <math> g: A\to B </math> such that <math> g(a_1) = b_1 </math> and <math> g(a_2) = b_1 </math> IS a valid function. | ||
− | |||
===Examples=== | ===Examples=== |
Revision as of 13:10, 27 September 2021
A function (or "mapping") is a relationship between two sets and that maps each input to exactly one output . A function that maps elements of the set to elements in the set is denoted as , where is the domain of and is the codomain. We can also think of a function as a set of ordered pairs , and , such that each element is paired with exactly one element . If a function maps an input to an output , we can write that . For finite, reasonably small sets, we can depict a function graphically (see image).
Note: a function cannot map one input to more than one output, but it can map more than one input to the same output. For example, let and , and . If is a relation such that and , then is NOT a function. However, a relation such that and IS a valid function.
Examples
- Let and , and let such that , , , , and . Since each element of the domain maps to exactly one element (that is, there is no and such that ), is a function.
- For sets and in the previous example, let be a relation such that , , , , and . Since maps the input to two distinct outputs, this relation is NOT a valid function.
- Let such that . This is a function, since each maps to exactly one element .
- Let such that . This is not a valid function, since for , can equal both and , and for .
Resources
- Course Textbook, pages 129-140
- Definition of Functions, Mathematics LibreTexts