# Can the following relations be considered functions?

1. $$f: R \rightarrow R$$ where $$f = \{(x, \sqrt{x})\mid x \in R \}$$
2. $$f: R \rightarrow R$$ where $$f = \{(x, \tan{x})\mid x \in R\}.$$

I believe the $$1^{\text{st}}$$ one would be considered a function despite negative $$R$$ values not giving real roots. We can just define the domain to be non-negative.

For the second, in case of some domain values, $$f(x)$$ would exist but would be infinite. Therefore, it would be considered a function too despite not having a well-defined set of $$(x, f(x)).$$

I would like someone to verify if my approach is correct.

• Your functions are ill-defined because the target space is not right. Your function as defined take values in $R\times R$. (What you actually define as $f$ are the graphs of the functions $x \mapsto \sqrt{x}$ and $x \mapsto \tan(x)$. Sep 28, 2020 at 9:07
• For 1) as you says you have to consider $x \in \mathbb R^+$ Sep 28, 2020 at 9:19
• For 2) you have to consider that for argument $\dfrac {\pi}{2}$ (and its multiples) the value is not a number Sep 28, 2020 at 9:20

A function must be defined on every element of its domain, meaning the image of each element of the domain must lie in the codomain. Assuming $$R$$ is meant to be the set $$\mathbb{R}$$ of all real numbers, that is not the case here.
Since the square root of a negative number is an imaginary number, $$f(-1)$$ is not a real number (never mind the issue of how to define what $$\sqrt{-1}$$ means). Hence, we cannot define a function $$f: \mathbb{R} \to \mathbb{R}$$ by $$f = \{(x, \sqrt{x}) \mid x \in \mathbb{R}\}$$. To ensure that $$f$$ were a function, we would have to restrict the domain to $$[0, \infty)$$.
The tangent of a real number $$x$$ is defined by $$\tan x = \frac{\sin x}{\cos x}$$ for each $$x \in \mathbb{R}$$ such that $$\cos x \neq 0$$. However, $$\cos x = 0$$ whenever $$x = \frac{\pi}{2} + n\pi, n \in \mathbb{Z}$$ Thus, $$f: \mathbb{R} \to \mathbb{R}$$ defined by $$f = \{(x, \tan x) \mid x \in \mathbb{R}\}$$ is not a function since it is not defined at those values of $$x$$ where $$\cos x = 0$$. In this case, to define a function, we would have to restrict the domain to those values of $$x \in \mathbb{R}$$ where $$\cos x \neq 0$$.