0

Seems that everyone has their own opinion about whether this is a function or a relation

This is a picture from the documents my teacher gave me

enter image description here

So for those who don't know Spanish it says

This example is a relation. It is not a function, the -1 was not assigned any number or element. (I know it says 1 and not -1 in the picture, but I think this is a typo given the fact the only number that wasn't assigned an element is the -1)

I'm so confused because in this video(I know its in Spanish sorry) but it says that for it to be a function each element on the domain has to have one or none arrows. So according to the video this is a function

I even asked a friend and he said that it is neither a function or a relation.

All I can find in the internet is that a function doesn't repeat elements in the domain, and that's clear to me, no more than 1 arrow for it to be a function, but what if one element has no arrows, like in the picture example, it is function or not?

bau8312
  • 171
  • 4
    It depends on how you define functions! If a function comes with information about its intended domain, and here the intended domain is supposed to include $-1$, then it is not a function. If a function does not come with information about its intended domain, then this could be a function. You need to know how functions are defined, precisely/exactly, to give a definitive answer to this question. See, e.g., the answer here. This would be a function under the first view, but not under the second. – Arturo Magidin Sep 02 '20 at 20:01
  • ("first view", "second" in the comment above refer to the definitions in the linked-to answer, not to the options described earlier in the comment; sorry for any possible confusion) – Arturo Magidin Sep 02 '20 at 20:13
  • @ArturoMagidin so given the teacher just gave me this set(the picture in the question), and the instructions say to mark if is it a function or a relation, with no information about the intended domain, you're saying I should mark this as a function? – bau8312 Sep 03 '20 at 00:15
  • I have no idea what standards your teacher uses, or what conventions your class has, so I cannot speak about what you “should” or “should not” do. It seems like the intent is that it is not a function because it is given with an explicit putative domain but is not defined on every element of the domain. – Arturo Magidin Sep 03 '20 at 00:18

3 Answers3

3

A relation from $A$ to $B$ is any subset of $A\times B$, no further restrictions required. We call $A$ the domain of the relation and $B$ the codomain of the relation. In the event that both the domain and codomain were the same, we might instead use the phrase "the relation over A" to imply that both the domain and codomain are $A$. For each ordered pair $(a,b)$ in the relation we say that $a$ is related to $b$ and might write this as $(a,b)\in\mathcal{R}, a\mathcal{R}b, a\simeq b$ or many other options depending on the specific relation used and how much we want to emphasize the particular relation in question.

One may picture a relation from $A$ to $B$ by means of a directed bipartite graph with vertices on the left representing the elements in $A$ and vertices on the right representing the elements in $B$ (treating those elements coming from $A$ as distinct from those coming from $B$ even if they are otherwise equal) where we draw a directed arrow leaving an element $a$ from $A$ going to an element $b$ in $B$ if and only if $a$ is related to $b$.

That is precisely the sort of picture you were provided. It is implied then that the relation in question is the relation $\{(1,1),(4,2)\}$ from $\{-1,1,4\}$ to $\{1,2\}$.

In the event that the domain and codomain are the same, one might choose to instead just picture each element as a vertex once, and allowing loops and parallel edges. This is particularly common when dealing with picturing orders, equivalence relations, and permutations. Further conventions might be adopted to make it even easier to interpret as is done for things such as Hasse Diagrams. Also common is to lay the elements out along perpendicular axes and draw a point at a position if the coordinate pair is an element of the relation, what you would recognize as "the graph of relation" as you might draw for the parabola $f(x)=x^2$.

A function is a specific type of relation with additional nice properties. In particular, a function is a relation for whom every element in the domain has exactly one element in the codomain which they are related to. That is to say, if we were to picture it as above, every vertex on the left has exactly one arrow leaving it. That every element in the domain has at least one arrow leaving it is referred to as being everywhere defined and having at most one arrow leaving it is referred to as being well defined.

In your case, there is no arrow leaving the element $-1$ so it is not a function. It is however a relation.

If we were to edit the example a bit, including also an arrow leaving $-1$ going to, say, $1$, so the relation $\{(-1,1),(1,1),(4,2)\}$ from the domain $\{-1,1,4\}$ to the codomain $\{1,2\}$ then this will be both a function and a relation.

JMoravitz
  • 79,518
0

In standard terminology, a relation $f\subseteq A\times B$ with the property that $(a,b)\in f\land (a,b')\in f\implies b=b'$ is called a partial function.

A function must also satisfy $\forall a\in A\ \exists b\in B: \ (a,b)\in f$, i.e. has to be fully defined on its domain $A$.

Berci
  • 90,745
0

Any function $f:E\to E$ for any set $E$ defines a relation R of the set $E$ by $x R y\Leftrightarrow f(x)=y$.

Therefore, the exemple you give is a function as long as its domain is $\mathcal{D}_f=\{1;4\}$ and is also a relation of the set $\mathbb{N}$