<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mathresearch.utsa.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=Functions_as_Relations</id>
	<title>Functions as Relations - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mathresearch.utsa.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=Functions_as_Relations"/>
	<link rel="alternate" type="text/html" href="https://mathresearch.utsa.edu/wiki/index.php?title=Functions_as_Relations&amp;action=history"/>
	<updated>2026-04-15T01:49:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://mathresearch.utsa.edu/wiki/index.php?title=Functions_as_Relations&amp;diff=3780&amp;oldid=prev</id>
		<title>Khanh at 21:45, 11 November 2021</title>
		<link rel="alternate" type="text/html" href="https://mathresearch.utsa.edu/wiki/index.php?title=Functions_as_Relations&amp;diff=3780&amp;oldid=prev"/>
		<updated>2021-11-11T21:45:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 21:45, 11 November 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l360&quot; &gt;Line 360:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 360:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  f(''x'')&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  f(''x'')&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This function is called ''f'', and it takes a ''variable'' ''x''. We substitute some value for ''x'' to get the second value, which is what the function maps x to.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This function is called ''f'', and it takes a ''variable'' ''x''. We substitute some value for ''x'' to get the second value, which is what the function maps x to.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Resources==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Resources==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://en.wikibooks.org/wiki/Discrete_Mathematics/Functions_and_relations Functions and Relations], WikiBooks Discrete Mathematics&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://www.onlinemathlearning.com/relation-function.html Relations and Functions], Online Math Learning&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://www.onlinemathlearning.com/relation-function.html Relations and Functions], Online Math Learning&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Licensing == &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Content obtained and/or adapted from:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://en.wikibooks.org/wiki/Discrete_Mathematics/Functions_and_relations Functions and Relations, WikiBooks: Discrete Mathematics] under a CC BY-SA license&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Khanh</name></author>
		
	</entry>
	<entry>
		<id>https://mathresearch.utsa.edu/wiki/index.php?title=Functions_as_Relations&amp;diff=1624&amp;oldid=prev</id>
		<title>Lila at 22:56, 29 September 2021</title>
		<link rel="alternate" type="text/html" href="https://mathresearch.utsa.edu/wiki/index.php?title=Functions_as_Relations&amp;diff=1624&amp;oldid=prev"/>
		<updated>2021-09-29T22:56:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 22:56, 29 September 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l360&quot; &gt;Line 360:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 360:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  f(''x'')&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  f(''x'')&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This function is called ''f'', and it takes a ''variable'' ''x''. We substitute some value for ''x'' to get the second value, which is what the function maps x to.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This function is called ''f'', and it takes a ''variable'' ''x''. We substitute some value for ''x'' to get the second value, which is what the function maps x to.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Resources==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://en.wikibooks.org/wiki/Discrete_Mathematics/Functions_and_relations Functions and Relations], WikiBooks Discrete Mathematics&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://www.onlinemathlearning.com/relation-function.html Relations and Functions], Online Math Learning&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lila</name></author>
		
	</entry>
	<entry>
		<id>https://mathresearch.utsa.edu/wiki/index.php?title=Functions_as_Relations&amp;diff=1623&amp;oldid=prev</id>
		<title>Lila: Created page with &quot;== Introduction ==  This article examines the concepts of a ''function'' and a ''relation''.  A '''''relation''''' is any association or link between elements of one set, call...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mathresearch.utsa.edu/wiki/index.php?title=Functions_as_Relations&amp;diff=1623&amp;oldid=prev"/>
		<updated>2021-09-29T22:52:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Introduction ==  This article examines the concepts of a &amp;#039;&amp;#039;function&amp;#039;&amp;#039; and a &amp;#039;&amp;#039;relation&amp;#039;&amp;#039;.  A &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;relation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; is any association or link between elements of one set, call...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article examines the concepts of a ''function'' and a ''relation''.&lt;br /&gt;
&lt;br /&gt;
A '''''relation''''' is any association or link between elements of one set, called the '''''domain''''' or (less formally) the ''set of inputs'', and another set, called the '''''range''''' or ''set of outputs''.  Some people mistakenly refer to the range as the ''codomain''(range), but as we will see, that really means the ''set of all possible outputs''—even values that the relation does not actually use.  (Beware: some authors do not use the term ''codomain''(range), and use the term ''range'' instead for this purpose.  Those authors use the term '''''image''''' for what we are calling ''range''.  So while it '''is''' a mistake to refer to the ''range'' or ''image'' as the ''codomain''(range), it is '''not necessarily''' a mistake to refer to ''codomain'' as ''range''.)&lt;br /&gt;
&lt;br /&gt;
For example, if the ''domain'' is a set Fruits = {apples, oranges, bananas} and the ''codomain''(range) is a set Flavors = {sweetness, tartness, bitterness}, the flavors of these fruits form a relation: we might say that apples are related to (or associated with) '''both''' sweetness and tartness, while oranges are related to tartness only and bananas to sweetness only.  (We might disagree somewhat, but that is irrelevant to the topic of this book.)  Notice that &amp;quot;bitterness&amp;quot;, although it is one of the possible Flavors (codomain)(range), is not really used for any of these relationships; so it is not part of the ''range'' (or ''image'') {sweetness, tartness}.&lt;br /&gt;
&lt;br /&gt;
Another way of looking at this is to say that a relation is a ''subset of ordered pairs'' drawn from the ''set of all possible ordered pairs'' (of elements of two other sets, which we normally refer to as the ''Cartesian product'' of those sets).  Formally, R is a relation if&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;big&amp;gt;&amp;lt;math&amp;gt;R \subseteq X \times Y = \{(x, y) | x \in X, y \in Y\}&amp;lt;/math&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for the domain X and codomain(range) Y.  The '''''inverse relation''''' of R, which is written as R&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;, is what we get when we interchange the X and Y values:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;big&amp;gt;&amp;lt;math&amp;gt;R^{-1} = \{(y, x) | (x, y) \in R\}&amp;lt;/math&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the example above, we can write the relation in set notation: {(apples, sweetness), (apples, tartness), (oranges, tartness), (bananas, sweetness)}.  The inverse relation, which we could describe as &amp;quot;fruits of a given flavor&amp;quot;, is {(sweetness, apples), (sweetness, bananas), (tartness, apples), (tartness, oranges)}.  (Here, as elsewhere, the order of elements in a set has no significance.)&lt;br /&gt;
&lt;br /&gt;
One important kind of relation is the ''function''.  A '''''function''''' is a relation that has '''exactly one output''' for every possible input '''in the domain'''.  (The domain does not necessarily have to include all possible objects of a given type.  In fact, we sometimes intentionally use a ''restricted domain'' in order to satisfy some desirable property.)  The relations discussed above (flavors of fruits and fruits of a given flavor) are '''not''' functions: the first has two possible outputs for the input &amp;quot;apples&amp;quot; (sweetness and tartness); and the second has two outputs for both &amp;quot;sweetness&amp;quot; (apples and bananas) and &amp;quot;tartness&amp;quot; (apples and oranges).&lt;br /&gt;
&lt;br /&gt;
The main reason for not allowing multiple outputs with the same input is that it lets us apply the same function to different forms of the same thing without changing their equivalence.  That is, if f is a function with a (or b) in its domain, then a = b implies that f(a) = f(b).  For example, z - 3 = 5 implies that z = 8 because f(x) = x + 3 is a function unambiguously defined for all numbers x.&lt;br /&gt;
&lt;br /&gt;
The converse, that f(a) = f(b) implies a = b, is not always true.  When it is, there is never more than one ''input'' x for a certain ''output'' y = f(x).  This is the same as the definition of function, but with the roles of X and Y interchanged; so it means the ''inverse relation'' f&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt; '''must also''' be a function.  In general—regardless of whether or not the original relation was a function—the inverse relation will ''sometimes'' be a function, and sometimes not.&lt;br /&gt;
&lt;br /&gt;
When f and f&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt; are both functions, they are called '''''one-to-one''''', '''''injective''''', or '''''invertible functions'''''.  This is one of two very important properties a function f might (or might not) have; the other property is called '''''onto''''' or '''''surjective''''', which means, for any y ∈ Y (in the codomain), there is some x ∈ X (in the domain) such that f(x) = y.  In other words, a ''surjective'' function f ''maps onto'' every possible output '''at least once'''.&lt;br /&gt;
&lt;br /&gt;
A function can be '''neither''' one-to-one nor onto, '''both''' one-to-one and onto (in which case it is also called '''''bijective''''' or a '''''one-to-one correspondence'''''), or just one and not the other.  (As an example which is neither, consider f = {(0,2), (1,2)}.  It is a function, since there is only one y value for each x value; but there is more than one input x for the output y = 2; and it clearly does not &amp;quot;map onto&amp;quot; all integers.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relations ==&lt;br /&gt;
In the above section dealing with functions and their properties, we noted the important property that all functions must have, namely that if a function does map a value from its domain to its co-domain, it must map this value to only one value in the co-domain.&lt;br /&gt;
&lt;br /&gt;
Writing in set notation, if ''a'' is some fixed value:&lt;br /&gt;
: |{f(x)|x=a}| ∈ {0, 1}&lt;br /&gt;
&lt;br /&gt;
The literal reading of this statement is: the ''cardinality'' (number of elements) of the set of all values f(x), such that x=a for some fixed value a, is an element of the set {0, 1}.  In other words, the number of ''outputs'' that a function f may have at any fixed ''input'' a is either zero (in which case it is ''undefined'' at that input) or one (in which case the output is unique).&lt;br /&gt;
&lt;br /&gt;
However, when we consider the ''relation'', we relax this constriction, and so a relation may map one value to more than one other value. In general, a relation is '''any''' subset of the Cartesian product of its domain and co-domain.&lt;br /&gt;
&lt;br /&gt;
All functions, then, can be considered as relations also.&lt;br /&gt;
&lt;br /&gt;
=== Notations === &lt;br /&gt;
When we have the property that one value is related to another, we call this relation a ''binary relation'' and we write it as&lt;br /&gt;
: x R y&lt;br /&gt;
where R is the relation.&lt;br /&gt;
&lt;br /&gt;
For arrow diagrams and set notations, remember for relations we do not have the restriction that functions do and we can draw an arrow to represent the mappings, and for a set diagram, we need only write all the ordered pairs that the relation does take: again, by example&lt;br /&gt;
:f = {(0,0),(1,1),(1,-1),(2,2),(2,-2)} &lt;br /&gt;
is a relation and not a function, since both 1 and 2 are mapped to two values, (1 and -1, and 2 and -2 respectively)&lt;br /&gt;
example let A=2,3,5;B=4,6,9 then&lt;br /&gt;
A*B=(2,4),(2,6),(2,9),(3,4),(3,6),(3,9),(5,4),(5,6),(5,9)&lt;br /&gt;
Define a relation R=(2,4),(2,6),(3,6),(3,9)&lt;br /&gt;
add functions and problems to one another.&lt;br /&gt;
&lt;br /&gt;
=== Some simple examples ===&lt;br /&gt;
Let us examine some simple relations.&lt;br /&gt;
&lt;br /&gt;
Say f is defined by&lt;br /&gt;
: {(0,0),(1,1),(2,2),(3,3),(1,2),(2,3),(3,1),(2,1),(3,2),(1,3)}&lt;br /&gt;
&lt;br /&gt;
This is a relation (not a function) since we can observe that 1 maps to 2 and 3, for instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Less-than, &amp;quot;&amp;lt;&amp;quot;, is a relation also. Many numbers can be less than some other fixed number, so it cannot be a function.&lt;br /&gt;
&lt;br /&gt;
=== Properties ===&lt;br /&gt;
When we are looking at relations, we can observe some special properties different relations can have.&lt;br /&gt;
&lt;br /&gt;
==== Reflexive ====&lt;br /&gt;
A relation is ''reflexive'' if, we observe that for all values a:&lt;br /&gt;
: ''a'' R ''a''&lt;br /&gt;
In other words, all values are related to themselves.&lt;br /&gt;
&lt;br /&gt;
The relation of equality, &amp;quot;=&amp;quot; is reflexive. Observe that for, say, all numbers a (the domain is '''R'''):&lt;br /&gt;
: ''a'' = ''a''&lt;br /&gt;
so &amp;quot;=&amp;quot; is reflexive.&lt;br /&gt;
&lt;br /&gt;
In a reflexive relation, we have arrows for all values in the domain pointing back to themselves:&lt;br /&gt;
:[[Image:Arrow diagram reflexive.png]]&lt;br /&gt;
&lt;br /&gt;
Note that ≤ is also reflexive (a ≤ a for any a in '''R'''). On the other hand, the relation &amp;lt; is not (a &amp;lt; a is false for any a in '''R''').&lt;br /&gt;
&lt;br /&gt;
==== Symmetric ====&lt;br /&gt;
A relation is ''symmetric'' if, we observe that for all values of a and b:&lt;br /&gt;
: ''a'' R ''b'' implies ''b'' R ''a''&lt;br /&gt;
&lt;br /&gt;
The relation of equality again is symmetric. If ''x''=''y'', we can also write that ''y''=''x'' also.&lt;br /&gt;
&lt;br /&gt;
In a symmetric relation, for each arrow we have also an opposite arrow, i.e. there is either no arrow between ''x'' and ''y'', or an arrow points from ''x'' to  ''y'' and an arrow back from ''y'' to ''x'':&lt;br /&gt;
:[[Image:Arrow diagram symmetric.png]]&lt;br /&gt;
&lt;br /&gt;
Neither ≤ nor &amp;lt; is symmetric (2 ≤ 3 and 2 &amp;lt; 3  but neither 3 ≤ 2 nor 3 &amp;lt; 2 is true).&lt;br /&gt;
&lt;br /&gt;
==== Transitive ====&lt;br /&gt;
A relation is ''transitive'' if for all values ''a'', ''b'', ''c'':&lt;br /&gt;
: ''a'' R ''b'' and ''b'' R ''c'' implies ''a'' R ''c''&lt;br /&gt;
&lt;br /&gt;
The relation ''greater-than'' &amp;quot;&amp;gt;&amp;quot; is transitive. If ''x'' &amp;gt; ''y'', and ''y'' &amp;gt; ''z'', then it is true that ''x'' &amp;gt; ''z''. This becomes clearer when we write down what is happening into words. ''x'' is greater than ''y'' and ''y'' is greater than ''z''. So ''x'' is greater than both ''y'' and ''z''.&lt;br /&gt;
&lt;br /&gt;
The relation ''is-not-equal'' &amp;quot;≠&amp;quot; is not transitive. If ''x'' ≠ ''y'' and ''y'' ≠ ''z'' then we might have ''x'' = ''z'' or ''x'' ≠ ''z'' (for example 1 ≠ 2 and 2 ≠ 3 and 1 ≠ 3 but 0 ≠ 1 and 1 ≠ 0 and 0 = 0). &lt;br /&gt;
&lt;br /&gt;
In the arrow diagram, every arrow between two values ''a'' and ''b'', and ''b'' and ''c'', has an arrow going straight from ''a'' to ''c''.&lt;br /&gt;
:[[Image:Arrow diagram transitive.png]]&lt;br /&gt;
&lt;br /&gt;
==== Antisymmetric ====&lt;br /&gt;
A relation is ''antisymmetric'' if we observe that for all values ''a'' and ''b'':&lt;br /&gt;
: ''a'' R ''b'' and ''b'' R ''a'' implies that ''a''=''b''&lt;br /&gt;
'''Notice that antisymmetric is not the same as &amp;quot;not symmetric.&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Take the relation ''greater than or equal to'', &amp;quot;&amp;amp;ge;&amp;quot;&lt;br /&gt;
If ''x'' &amp;amp;ge; ''y'', and ''y'' &amp;amp;ge; x, then ''y'' must be equal to ''x''.&lt;br /&gt;
a relation is anti-symmetric if and only if a∈A, (a,a)∈R&lt;br /&gt;
&lt;br /&gt;
==== Trichotomy ====&lt;br /&gt;
A relation satisfies ''trichotomy'' if we observe that for all values ''a'' and ''b'' it holds true that:&lt;br /&gt;
''a''R''b'' ''or'' ''b''R''a''&lt;br /&gt;
&lt;br /&gt;
The relation ''is-greater-or-equal'' satisfies since, given 2 real numbers ''a'' and ''b'', it is true that whether ''a'' ≥ ''b'' or ''b'' ≥ ''a'' (both if ''a'' = ''b'').&lt;br /&gt;
&lt;br /&gt;
==== Problem set ==== &lt;br /&gt;
Given the above information, determine which relations are reflexive, transitive, symmetric, or antisymmetric on the following - there may be more than one characteristic. (Answers follow.)&lt;br /&gt;
''x'' R ''y'' if &lt;br /&gt;
# x = y&lt;br /&gt;
# x &amp;lt; y&lt;br /&gt;
# x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; = y&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
# x &amp;amp;le; y&lt;br /&gt;
&lt;br /&gt;
===== Answers =====&lt;br /&gt;
#Symmetric, Reflexive, and transitive&lt;br /&gt;
#Transitive, Trichotomy&lt;br /&gt;
#Symmetric, Reflexive, and transitive (x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; = y&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; is just a special case of equality, so all properties that apply to x = y also apply to this case)&lt;br /&gt;
#Reflexive, Transitive and Antisymmetric (and satisfying Trichotomy)&lt;br /&gt;
&lt;br /&gt;
=== Equivalence relations ===&lt;br /&gt;
We have seen that certain common relations such as &amp;quot;=&amp;quot;, and congruence (which we will deal with in the next section) obey some of these rules above. The relations we will deal with are very important in discrete mathematics, and are known as ''equivalence relations''. They essentially assert some kind of equality notion, or ''equivalence'', hence the name.&lt;br /&gt;
&lt;br /&gt;
==== Characteristics of equivalence relations ====&lt;br /&gt;
For a relation R to be an ''equivalence relation'', it must have the following properties, viz. R must be:&lt;br /&gt;
* symmetric&lt;br /&gt;
* transitive&lt;br /&gt;
* reflexive&lt;br /&gt;
(A helpful mnemonic, S-T-R)&lt;br /&gt;
&lt;br /&gt;
In the previous problem set you have shown equality, &amp;quot;=&amp;quot;, to be reflexive, symmetric, and transitive. So &amp;quot;=&amp;quot; is an equivalence relation.&lt;br /&gt;
&lt;br /&gt;
We denote an equivalence relation, in general, by &amp;lt;math&amp;gt;x \sim y&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Example proof ====&lt;br /&gt;
Say we are asked to prove that &amp;quot;=&amp;quot; is an equivalence relation.&lt;br /&gt;
We then proceed to prove each property above in turn (Often, the proof of transitivity is the hardest).&lt;br /&gt;
&lt;br /&gt;
* '''Reflexive''': Clearly, it is true that ''a'' = ''a'' for all values a.  Therefore, = is reflexive.&lt;br /&gt;
* '''Symmetric''': If ''a'' = ''b'', it is also true that ''b'' = ''a''.  Therefore, = is symmetric&lt;br /&gt;
* '''Transitive''':  If ''a'' = ''b'' and ''b'' = ''c'', this says that ''a'' is the same as ''b'' which in turn is the same as ''c''. So ''a'' is then the same as ''c'', so ''a''  = ''c'', and thus = is transitive.&lt;br /&gt;
&lt;br /&gt;
Thus = is an equivalence relation.&lt;br /&gt;
&lt;br /&gt;
==== Partitions and equivalence classes ====&lt;br /&gt;
It is true that when we are dealing with relations, we may find that many values are related to one fixed value. &lt;br /&gt;
&lt;br /&gt;
For example, when we look at the quality of ''congruence'', which is that given some number ''a'', a number congruent to ''a'' is one that has the same remainder or ''modulus'' when divided by some number ''n'', as ''a'', which we write&lt;br /&gt;
:a &amp;amp;equiv; b (mod n)&lt;br /&gt;
and is the same as writing&lt;br /&gt;
:''b'' = ''a''+''kn'' for some integer k.&lt;br /&gt;
(We will look into congruences in further detail later, but a simple examination or understanding of this idea will be interesting in its application to equivalence relations)&lt;br /&gt;
&lt;br /&gt;
For example, 2 &amp;amp;equiv; 0 (mod 2), since the remainder on dividing 2 by 2 is in fact 0, as is the remainder on dividing 0 by 2.&lt;br /&gt;
&lt;br /&gt;
We can show that congruence is an equivalence relation (This is left as an exercise, below '''Hint''' use the equivalent form of congruence as described above).&lt;br /&gt;
&lt;br /&gt;
However, what is more interesting is that we can group all numbers that are equivalent to each other. &lt;br /&gt;
&lt;br /&gt;
With the relation congruence ''modulo'' 2 (which is using n=2, as above), or more formally:&lt;br /&gt;
: x ~ y if and only if x &amp;amp;equiv; y (mod 2)&lt;br /&gt;
we can group all numbers that are equivalent to each other. Observe:&lt;br /&gt;
: &amp;lt;math&amp;gt;0 \equiv 2 \equiv 4 \equiv \ldots \pmod{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;1 \equiv 3 \equiv 5 \equiv \ldots \pmod{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
This first equation above tells us all the ''even'' numbers are equivalent to each other under ~, and all the ''odd'' numbers under ~.&lt;br /&gt;
&lt;br /&gt;
We can write this in set notation. However, we have a special notation.&lt;br /&gt;
We write:&lt;br /&gt;
:[0]={0,2,4,...}&lt;br /&gt;
:[1]={1,3,5,...}&lt;br /&gt;
&lt;br /&gt;
and we call these two sets ''equivalence classes''.&lt;br /&gt;
&lt;br /&gt;
All elements in an equivalence class by definition are equivalent to each other, and thus note that we do not need to include [2], since 2 ~ 0.&lt;br /&gt;
&lt;br /&gt;
We call the act of doing this 'grouping' with respect to some equivalence relation ''partitioning'' (or further and explicitly ''partitioning a set S into equivalence classes under a relation ~''). Above, we have partitioned '''Z''' into equivalence classes [0] and [1], under the relation of congruence modulo 2.&lt;br /&gt;
&lt;br /&gt;
==== Problem set ====&lt;br /&gt;
Given the above, answer the following questions on equivalence relations (Answers follow to even numbered questions)&lt;br /&gt;
# Prove that congruence is an equivalence relation as before (See hint above).&lt;br /&gt;
# Partition {x | 1 &amp;amp;le; x &amp;amp;le; 9} into equivalence classes under the equivalence relation &lt;br /&gt;
&amp;lt;math&amp;gt; x \sim y\ \mbox{iff}\ x \equiv y \pmod{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Answers =====&lt;br /&gt;
2. [0]={6}, [1]={1,7}, [2]={2,8}, [3]={3,9}, [4]={4}, [5]={5}&lt;br /&gt;
&lt;br /&gt;
=== Partial orders ===&lt;br /&gt;
We also see that &amp;quot;&amp;amp;ge;&amp;quot; and &amp;quot;&amp;amp;le;&amp;quot; obey some of the rules above. Are these special kinds of relations too, like equivalence relations? Yes, in fact, these relations are specific examples of another special kind of relation which we will describe in this section: the ''partial order''.&lt;br /&gt;
&lt;br /&gt;
As the name suggests, this relation gives some kind of ordering to numbers.&lt;br /&gt;
&lt;br /&gt;
==== Characteristics of partial orders ====&lt;br /&gt;
For a relation R to be a partial order, it must have the following three properties, viz R must be:&lt;br /&gt;
* reflexive&lt;br /&gt;
* antisymmetric&lt;br /&gt;
* transitive&lt;br /&gt;
(A helpful mnemonic, R-A-T)&lt;br /&gt;
&lt;br /&gt;
We denote a partial order, in general, by &amp;lt;math&amp;gt;x \preceq y&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Question:'''&lt;br /&gt;
# Suppose R is a relation on a set of integers Z then prove that R is a partial order relation on Z iff a=b raise to power r.&lt;br /&gt;
&lt;br /&gt;
==== Example proof ====&lt;br /&gt;
Say we are asked to prove that &amp;quot;&amp;amp;le;&amp;quot; is a partial order.&lt;br /&gt;
We then proceed to prove each property above in turn (Often, the proof of transitivity is the hardest).&lt;br /&gt;
&lt;br /&gt;
===== Reflexive =====&lt;br /&gt;
Clearly, it is true that ''a'' &amp;amp;le; ''a'' for all values a.&lt;br /&gt;
So &amp;amp;le; is reflexive.&lt;br /&gt;
&lt;br /&gt;
===== Antisymmetric =====&lt;br /&gt;
If ''a'' &amp;amp;le; ''b'', and ''b'' &amp;amp;le; ''a'', then a ''must'' be equal to ''b''.&lt;br /&gt;
So &amp;amp;le; is antisymmetric&lt;br /&gt;
&lt;br /&gt;
===== Transitive =====&lt;br /&gt;
If ''a'' &amp;amp;le; ''b'' and ''b'' &amp;amp;le; ''c'', this says that ''a'' is less than ''b'' and ''c''. So ''a'' is less than ''c'', so ''a'' &amp;amp;le; ''c'', and thus &amp;amp;le; is transitive.&lt;br /&gt;
&lt;br /&gt;
Thus &amp;amp;le; is a partial order.&lt;br /&gt;
&lt;br /&gt;
==== Problem set ====&lt;br /&gt;
Given the above on partial orders, answer the following questions&lt;br /&gt;
# Prove that divisibility, |, is a partial order (a | b means that a is a factor of b, i.e., on dividing b by a, no remainder results).&lt;br /&gt;
#  Prove the following set is a partial order: (''a'', ''b'') &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; (''c'', ''d'') implies ''ab''&amp;amp;le;''cd'' for ''a'',''b'',''c'',''d'' integers ranging from 0 to 5. &lt;br /&gt;
&lt;br /&gt;
===== Answers =====&lt;br /&gt;
2. Simple proof; Formalization of the proof is an optional exercise.&lt;br /&gt;
:Reflexivity: (''a'', ''b'') &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; (''a'', ''b'') since ''ab''=''ab''. &lt;br /&gt;
:Antisymmetric: (''a'', ''b'') &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; (''c'', ''d'') and (''c'', ''d'') &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; (''a'', ''b'') since ''ab''&amp;amp;le;''cd'' and ''cd''&amp;amp;le;''ab'' imply ''ab''=''cd''. &lt;br /&gt;
:Transitive: (''a'', ''b'') &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; (''c'', ''d'') and (''c'', ''d'') &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; (''e'', ''f'') implies (''a'', ''b'') &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; (''e'', ''f'') since ''ab''&amp;amp;le;''cd''&amp;amp;le;''ef'' and thus ''ab''&amp;amp;le;''ef''&lt;br /&gt;
&lt;br /&gt;
==== Posets ====&lt;br /&gt;
A partial order imparts some kind of &amp;quot;ordering&amp;quot; amongst elements of a set. For example, we only know that 2 &amp;amp;ge; 1 because of the partial ordering &amp;amp;ge;.&lt;br /&gt;
&lt;br /&gt;
We call a set A, ordered under a general partial ordering &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt;, a ''partially ordered set'', or simply just ''poset'', and write it (A, &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===== Terminology =====&lt;br /&gt;
There is some specific terminology that will help us understand and visualize the partial orders. &lt;br /&gt;
&lt;br /&gt;
When we have a partial order &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt;, such that ''a'' &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; ''b'', we write &amp;lt;math&amp;gt;\prec&amp;lt;/math&amp;gt; to say that a &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; but ''a'' &amp;amp;ne; ''b''. We say in this instance that a ''precedes'' b, or ''a'' is a predecessor of ''b''.&lt;br /&gt;
&lt;br /&gt;
If (A, &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt;) is a poset, we say that ''a'' is an immediate predecessor of ''b'' (or ''a'' immediately precedes ''b'') if there is no ''x'' in A such that ''a'' &amp;lt;math&amp;gt;\prec&amp;lt;/math&amp;gt; ''x'' &amp;lt;math&amp;gt;\prec&amp;lt;/math&amp;gt; ''b''.&lt;br /&gt;
&lt;br /&gt;
If we have the same poset, and we also have ''a'' and ''b'' in A, then we say ''a'' and ''b'' are ''comparable'' if ''a'' &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; ''b'' or ''b'' &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt; ''a''. Otherwise they are ''incomparable''.&lt;br /&gt;
&lt;br /&gt;
==== Hasse diagrams ====&lt;br /&gt;
''Hasse diagrams'' are special diagrams that enable us to visualize the structure of a partial ordering. They use some of the concepts in the previous section to draw the diagram.&lt;br /&gt;
&lt;br /&gt;
A Hasse diagram of the poset (A, &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt;) is constructed by&lt;br /&gt;
* placing elements of A as points&lt;br /&gt;
* if ''a'' and ''b'' &amp;amp;isin; A, and ''a'' is an immediate predecessor of b, we draw a line from ''a'' to ''b''&lt;br /&gt;
* if ''a'' &amp;lt;math&amp;gt;\prec&amp;lt;/math&amp;gt; ''b'', put the point for ''a'' lower than the point for ''b''&lt;br /&gt;
* not drawing loops from ''a'' to ''a'' (this is assumed in a partial order because of reflexivity)&lt;br /&gt;
&lt;br /&gt;
=== Operations on Relations ===&lt;br /&gt;
&lt;br /&gt;
There are some useful operations one can perform on relations, which allow to &lt;br /&gt;
express some of the above mentioned properties more briefly.&lt;br /&gt;
&lt;br /&gt;
==== Inversion ====&lt;br /&gt;
Let R be a relation, then its inversion, R&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt; is defined by&lt;br /&gt;
&lt;br /&gt;
R&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt; := {(a,b) | (b,a) in R}.&lt;br /&gt;
&lt;br /&gt;
==== Concatenation ====&lt;br /&gt;
Let R be a relation between the sets A and B, S be a relation between B and C. We can concatenate&lt;br /&gt;
these relations by defining&lt;br /&gt;
&lt;br /&gt;
R &amp;amp;bull; S := {(a,c) | (a,b) in R and (b,c) in S for some b out of B}&lt;br /&gt;
&lt;br /&gt;
==== Diagonal of a Set ====&lt;br /&gt;
Let A be a set, then we define the diagonal (D) of A by&lt;br /&gt;
&lt;br /&gt;
D(A) := {(a,a) | a in A}&lt;br /&gt;
&lt;br /&gt;
==== Shorter Notations ====&lt;br /&gt;
Using above definitions, one can say (lets assume R is a relation between A and B):&lt;br /&gt;
&lt;br /&gt;
R is ''transitive'' if and only if R &amp;amp;bull; R is a subset of R.&lt;br /&gt;
&lt;br /&gt;
R is ''reflexive'' if and only if D(A) is a subset of R.&lt;br /&gt;
&lt;br /&gt;
R is ''symmetric'' if R&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt; is a subset of R.&lt;br /&gt;
&lt;br /&gt;
R is ''antisymmetric'' if and only if the intersection of R and R&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt; is D(A).&lt;br /&gt;
&lt;br /&gt;
R is ''asymmetric'' if and only if the intersection of D(A) and R is empty.&lt;br /&gt;
&lt;br /&gt;
R is a ''function'' if and only if R&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt; &amp;amp;bull; R is a subset of D(B).&lt;br /&gt;
&lt;br /&gt;
In this case it is a function A &amp;amp;rarr; B.&lt;br /&gt;
Let's assume R meets the condition of being a function, then&lt;br /&gt;
&lt;br /&gt;
R is ''injective'' if R &amp;amp;bull; R&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt; is a subset of D(A).&lt;br /&gt;
&lt;br /&gt;
R is ''surjective'' if {b | (a,b) in R} = B.&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
A function is a relationship between two sets of numbers. We may think of this as a ''mapping''; a function ''maps'' a number in one set to a number in another set.  Notice that a function maps values to '''one and only one''' value. Two values in one set could map to one value, but one value '''must never''' map to two values: that would be a relation, ''not'' a function.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:Allowed_mapping_for_a_function.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, if we write (define) a function as:&lt;br /&gt;
: &amp;lt;math&amp;gt;f(x)=x^2&amp;lt;/math&amp;gt;&lt;br /&gt;
then we say:&lt;br /&gt;
:'f of x equals x squared'&lt;br /&gt;
and we have&lt;br /&gt;
: &amp;lt;math&amp;gt;f(-1)=1&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;f(1)=1&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;f(7)=49&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;f(1/2)=1/4&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;f(4)=16&amp;lt;/math&amp;gt;&lt;br /&gt;
and so on.&lt;br /&gt;
&lt;br /&gt;
This function f maps numbers to their squares.&lt;br /&gt;
&lt;br /&gt;
=== Range and codomain ===&lt;br /&gt;
If D is a set, we can say&lt;br /&gt;
: &amp;lt;math&amp;gt;f(D) = \{f(x) |\ x \in D\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forms a née of f is usually a subset of a larger set. This set is known as the ''codomain'' of a function. For example, with the function f(''x'')=cos ''x'', the range of f is [-1,1], '''but''' the codomain is the set of real numbers.&lt;br /&gt;
&lt;br /&gt;
=== Notations ===&lt;br /&gt;
When we have a function f, with domain D and range R, we write:&lt;br /&gt;
:&amp;lt;math&amp;gt;f : D \longrightarrow R&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we say that, for instance, ''x'' is mapped to ''x''&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, we also can add&lt;br /&gt;
:&amp;lt;math&amp;gt;f : D \longrightarrow R;\ x \longmapsto x^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that we can have a function that maps a point (''x'',''y'') to a real number, or some other function of two variables -- we have a set of ordered pairs as the domain. Recall from set theory that this is defined by the ''Cartesian product'' - if we wish to represent a set of all real-valued ordered pairs we can take the Cartesian product of the real numbers with itself to obtain&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbb{R}\times\mathbb{R}=\mathbb{R}^2=\{(x,y)|\ x\ \mbox{and}\ y \in\mathbb{R}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
When we have a set of ''n''-tuples as part of the domain, we say that the function is ''n''-ary (for numbers ''n''=1,2 we say unary, and binary respectively).&lt;br /&gt;
=== Other function notation ===&lt;br /&gt;
Functions can be written as above, but we can also write them in two other ways. One way is to use an arrow diagram to represent the mappings between each element. We write the elements from the domain on one side, and the elements from the range on the other, and we draw arrows to show that an element from the domain is mapped to the range.&lt;br /&gt;
&lt;br /&gt;
For example, for the function f(''x'')=''x''&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, the arrow diagram for the domain {1,2,3} would be:&lt;br /&gt;
[[Image:Arrow diagram example.jpg]]&lt;br /&gt;
&lt;br /&gt;
Another way is to use set notation. If f(''x'')=''y'', we can write the function in terms of its mappings. This idea is best to show in an example.&lt;br /&gt;
&lt;br /&gt;
Let us take the domain D={1,2,3}, and f(''x'')=''x''&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Then, the range of f will be R={f(1),f(2),f(3)}={1,4,9}. Taking the Cartesian product of D and R we obtain F={(1,1),(2,4),(3,9)}.&lt;br /&gt;
&lt;br /&gt;
So using set notation, a function can be expressed as the Cartesian product of its domain and range.&lt;br /&gt;
 f(''x'')&lt;br /&gt;
This function is called ''f'', and it takes a ''variable'' ''x''. We substitute some value for ''x'' to get the second value, which is what the function maps x to.&lt;/div&gt;</summary>
		<author><name>Lila</name></author>
		
	</entry>
</feed>