Difference between revisions of "Functions:Definition"

From Department of Mathematics at UTSA
Jump to navigation Jump to search
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:
 
* Let <math> A = \{1, 2, 3, 4, 5\} </math> and <math> B = \{-1, 3, 4\} </math>, and let <math> f: A\to B </math> such that <math> f(1) = -1  </math>, <math> f(2) = 3  </math>, <math> f(3) = 4  </math>, <math> f(4) = 3  </math>, and <math> f(5) = -1  </math>. Since each element of the domain maps to exactly one element (that is, there is no <math> f(a) = b_1 </math> and <math> f(a) = b_2 </math> such that <math> b_1 \neq b_2 </math>), <math> f </math> is a function.
 
* Let <math> A = \{1, 2, 3, 4, 5\} </math> and <math> B = \{-1, 3, 4\} </math>, and let <math> f: A\to B </math> such that <math> f(1) = -1  </math>, <math> f(2) = 3  </math>, <math> f(3) = 4  </math>, <math> f(4) = 3  </math>, and <math> f(5) = -1  </math>. Since each element of the domain maps to exactly one element (that is, there is no <math> f(a) = b_1 </math> and <math> f(a) = b_2 </math> such that <math> b_1 \neq b_2 </math>), <math> f </math> is a function.
 +
 
* For sets <math> A </math> and <math> B </math> in the previous example, let <math> g: A\to B </math> be a relation such that <math> g(1) = 1 </math>, <math> g(1) = 3 </math>, <math> g(2) = 4 </math>, <math> g(4) = 4 </math>, and <math> g(5) = 4 </math>. Since <math> g </math> maps the input <math> 1 </math> to two distinct outputs, this relation is NOT a valid function.
 
* For sets <math> A </math> and <math> B </math> in the previous example, let <math> g: A\to B </math> be a relation such that <math> g(1) = 1 </math>, <math> g(1) = 3 </math>, <math> g(2) = 4 </math>, <math> g(4) = 4 </math>, and <math> g(5) = 4 </math>. Since <math> g </math> maps the input <math> 1 </math> to two distinct outputs, this relation is NOT a valid function.
 +
 
* Let <math> f: \N\to\N </math> such that <math> f(n) = n + 1 </math>. This is a function, since each <math> n\in\N </math> maps to exactly one element <math> n+1\in\N </math>.
 
* Let <math> f: \N\to\N </math> such that <math> f(n) = n + 1 </math>. This is a function, since each <math> n\in\N </math> maps to exactly one element <math> n+1\in\N </math>.
 +
 
* Let <math> g: \N\to\Z </math> such that <math> |g(n)| = n </math>. This is not a valid function, since for <math> n\in\N </math>, <math> g(n) </math> can equal both <math> n </math> and <math> -n </math>, and <math> n\neq -n </math> for <math> n\neq 0 </math>.
 
* Let <math> g: \N\to\Z </math> such that <math> |g(n)| = n </math>. This is not a valid function, since for <math> n\in\N </math>, <math> g(n) </math> can equal both <math> n </math> and <math> -n </math>, and <math> n\neq -n </math> for <math> n\neq 0 </math>.
  

Revision as of 13:05, 27 September 2021

Example of an arrow diagram of a function

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