We are familiar with the idea of a function from previous math courses. In this class we want to understand functions as an important mathematical tool to relate objects to each other. We are used to functions from the real numbers to the real numbers in calculus. All math courses use functions in some way, often relating other mathematical objects, such as vectors in vector calculus, matrices in linear algebra, complex numbers in complex analysis, or strings of characters in computer science.
It is important to note that a relation is just a set. As long as the first coordinate comes from \(A\) and the second from \(B\text{,}\) we have a relation. The notation \(aRb\) is a convenient way to describe whether two elements are related. In this case, we are thinking of \(R\) as a symbol representing the relationship, rather than as a set.
Let \(A=\{1, 2, 3\}, B=\{2, 3, 4\}\text{.}\) Let \(R=\{(1, 4), (3, 2)\}\text{.}\) Then \(R\) is a subset of \(A\times B\text{.}\) Thus, it is a relation.
On the left, a set \(A\) with elements 1, 2, 3; on the right, a set \(B\) with elements 2, 3, 4. There is an arrow from 2 on the left to 2 on the right, an arrow from 2 on the left to 3 on the right, and an arrow from 3 on the left to 4 on the right.
A function, \(f\text{,}\) from a set \(A\) to a set \(B\text{,}\)\(f:A \rightarrow B\text{,}\) is a mapping such that for every \(a\in A\) there is a unique \(b\in B\) with \(f(a)=b\text{.}\)
Let \(A=\mathbb{R}, B=\mathbb{R}\text{.}\) Let \(f(x)=x+2\text{.}\) Then \(f:\mathbb{R}\rightarrow\mathbb{R}\text{.}\) We can check that it is a function: if we choose an \(x\in A\text{,}\) we can see that there is a corresponding real number \(x+2\text{,}\) which always exists. We can also see that for any \(x\in A\text{,}\) there is only one possible number as output.
A function is really a relation with some additional properties. First, for each \(a\) in \(A\text{,}\) a corresponding \(b\) must exist. Second, \(b\) must be unique. In other words, every \(a\) must map somewhere and each \(a\) can only map to one \(b\text{.}\)
Since a function is a relation, we can use relation notation to represent a function. Often we use \(F\) for the relation. In particular, \(f(x)=y\) if and only if \((x, y)\in F\text{.}\)
Let \(A=\mathbb{R}, B=\mathbb{R}\text{.}\) Let \(f(x)=x+2\text{.}\) Then \(F\) is a subset of \(\mathbb{R}\times \mathbb{R}\text{,}\) thus it is a relation. Give 3 examples of ordered pairs in \(F\text{.}\)
Example1.3.8.Example of an equation as a relation.
Let \(A=\mathbb{R}, B=\mathbb{R}\text{.}\) Let \((x, y)\in R\) if and only if \(x^2=y^2\text{.}\) Then \(R\) is a subset of \(\mathbb{R}\times \mathbb{R}\text{,}\) thus it is a relation. Give 3 examples of ordered pairs in \(R\text{.}\)
Note, this relation is not a function since if \(x=2\text{,}\) we can have \(y=2\) or \(y=-2\text{.}\) Thus \(y\) is not unique for a given \(x\text{.}\)
Let \(U\) be the relation from \(\mathbb{R}\) to \(\mathbb{R}\) given by \((x, y)\in U\) if \(x^2+y^2=1\text{.}\) Is \(U\) a function? Describe the set \(U\) in the Cartesian plane.
Hint.
Keep in mind that relations are just sets of ordered pairs, so we can graph them in the \(xy\)-plane.
Let \(A=\{-1, 0, 1\}\) and \(B=\{w, x, y, z\}\) and let \(F\) be the function \(F: A\rightarrow B\) given by the set \(F=\{(-1, y), (0, w), (1, y)\}\text{.}\)