Difference between revisions of "Functions:Definition"

From Department of Mathematics at UTSA
Jump to navigation Jump to search
(Created page with "A function (or "mapping") is a relationship between two sets <math> A </math> and <math> B </math> that maps each input <math> a\in A </math> to exactly one output <math> b\in...")
 
Line 1: Line 1:
A function (or "mapping") is a relationship between two sets <math> A </math> and <math> B </math> that maps each input <math> a\in A </math> to exactly one output <math> b\in B </math>. A function <math> f </math> that maps elements of the set <math> A </math> to elements in the set <math> B </math> is denoted as <math> f: A\to B </math>, where <math> A </math> is the domain of <math> f </math> and <math> B </math> is the codomain. We can also think of a function <math> f: A\to B </math> as a set of ordered pairs <math> (a, b) </math>, <math> a\in A </math> and <math> b\in B </math>, such that each element <math> a </math> is paired with exactly one element <math> b </math>. If a function <math> f: A\to B </math> maps an input <math> a </math> to an output <math> b </math>, we can write that <math> f(a) = b </math>.
+
[[File:Example of an arrow diagram of a function <math> f:A\to B </math>.svg|Arrow_diagram_of_a_function_(non-injective_and_non-surjective)]]
 +
 
 +
A function (or "mapping") is a relationship between two sets <math> A </math> and <math> B </math> that maps each input <math> a\in A </math> to exactly one output <math> b\in B </math>. A function <math> f </math> that maps elements of the set <math> A </math> to elements in the set <math> B </math> is denoted as <math> f: A\to B </math>, where <math> A </math> is the domain of <math> f </math> and <math> B </math> is the codomain. We can also think of a function <math> f: A\to B </math> as a set of ordered pairs <math> (a, b) </math>, <math> a\in A </math> and <math> b\in B </math>, such that each element <math> a </math> is paired with exactly one element <math> b </math>. If a function <math> f: A\to B </math> maps an input <math> a </math> to an output <math> b </math>, we can write that <math> f(a) = b </math>. 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 <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.
Line 7: Line 9:
 
* 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 |g(n)| = n. 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>.
  
 
==Resources==
 
==Resources==
 
* [https://link-springer-com.libweb.lib.utsa.edu/content/pdf/10.1007%2F978-1-4419-7127-2.pdf Course Textbook], pages 129-140
 
* [https://link-springer-com.libweb.lib.utsa.edu/content/pdf/10.1007%2F978-1-4419-7127-2.pdf Course Textbook], pages 129-140
 
* [https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/A_Spiral_Workbook_for_Discrete_Mathematics_(Kwong)/06%3A_Functions/6.02%3A_De%EF%AC%81nition_of_Functions Definition of Functions], Mathematics LibreTexts
 
* [https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/A_Spiral_Workbook_for_Discrete_Mathematics_(Kwong)/06%3A_Functions/6.02%3A_De%EF%AC%81nition_of_Functions Definition of Functions], Mathematics LibreTexts

Revision as of 12:06, 27 September 2021

[[File:Example of an arrow diagram of a function .svg|Arrow_diagram_of_a_function_(non-injective_and_non-surjective)]]

A function (or "mapping") is a relationship between two sets Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A } and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B } that maps each input Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle a\in A } to exactly one output Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle b\in B } . 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 Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle a } to an output Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle b } , 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 Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A = \{a_1, a_2\} } and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B = \{b_1, b_2\} } , and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle b_1\neq b_2 } . If is a relation such that Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(a_1) = b_1 } and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(a_1) = b_2 } , then is NOT a function. However, a relation Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle g: A\to B } such that and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle g(a_2) = b_1 } IS a valid function.

Examples:

  • Let Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A = \{1, 2, 3, 4, 5\} } and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B = \{-1, 3, 4\} } , and let Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f: A\to B } such that Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(1) = -1 } , Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(2) = 3 } , , Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(4) = 3 } , and . Since each element of the domain maps to exactly one element (that is, there is no Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(a) = b_1 } and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(a) = b_2 } such that Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle b_1 \neq b_2 } ), is a function.
  • For sets Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A } and in the previous example, let Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle g: A\to B } be a relation such that , Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle g(1) = 3 } , , , 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