Questions tagged [functions]

For elementary questions about functions, notation, properties, and operations such as function composition. Consider also using the (graphing-functions) tag.

A function $f$ defined on a set $X$ is an assignment of an element in some set $Y$ to each element of $X$. The set $X$ is called the domain of the function and $Y$ is called the codomain. The elements of $X$ are the inputs to the function and the elements of $Y$ are the potential outputs. For some input $x \in X$, its corresponding output in $Y$ is denoted $f(x)$. Not every element of $Y$ needs to be the output corresponding to some input though: the subset of $Y$ containing the elements that are an output of the function is called the range of $f$. When a function $f$ has domain $X$ and codomain $Y$, this is signified by writing $f \colon X \to Y$, and the assignments of inputs to outputs is signified by writing $f\colon x \mapsto f(x)$.

If you have a function whose codomain is the domain of another function, you can compose those two functions. In symbols if you have a function $f\colon X \to Y$ and a function $g \colon Y \to Z$, their composite is a function $g\circ f\colon X\to Z$ defined by the assignment $g\circ f\colon x \mapsto g(f(x))$.

For many examples of functions, the domain and range of the function are topological spaces, meaning that they are equipped with some notion of geometry. In this case we like to think of the function $f\colon X\to Y$ geometrically as the subset of the points $(x,f(x))$ in the topological space $X \times Y$. This subset of all the input-output pairs is called the graph of $f$.

Often mathematics textbooks will define a function slightly more rigorously than this though. They'll say that a function $f \colon X \to Y$ is a relation $R$ on the set $X \times Y$ such that

  1. For each $x \in X$ there is some $y \in Y$ such that $xRy$. Each input needs an output.
  2. If $xRy$ and $xRz$, then $y=z$. Each input needs exactly one output.

Here are a bunch of examples of functions:

  • Many examples of functions covered in elementary and high school have as their domain and codomain the real numbers $\mathbf{R}$. A basic example is the function $f \colon \mathbf{R} \to \mathbf{R}$ defined by the rule $f(x) = x^2$. Thinking geometrically, the graph of $f$ is the set of all points $(x,x^2)$ in the plane $\mathbf{R}^2$, and this forms a parabola. Note that while the codomain of this function is $\mathbf{R}$, the range consists of only the non-negative real numbers.

  • Here's a silly example. For any set $X$ we can define an identity function $\mathbf{1}_X$ with domain and codomain $X$ such that $\mathbf{1}_X \colon x \mapsto x$.

  • Let $W$ denote the set of all strings of letters of the alphabet, so like $\text{npr}$ or $\text{asdfasdf}$ or $\text{butt}$ for example. And let $\mathbf{N}$ denote the set of natural numbers. We can define a function $\ell\colon W \to \mathbf{N}$ such that $\ell$ assigns to each word it's length. So $\ell(\text{defenestration}) = 14$. Also $\ell(\text{butt})=4$.

  • Using the same set $W$ in the last example, let's define another function $\tau\colon W \to W$ such that $\tau$ "reverses" a word. So $\tau(\text{defenestration}) = \text{noitartsenefed}$, and $\tau(\text{butt}) = \text{ttub}$. A few neat properties of $\tau$ that deserve to be pointed out, $\tau \circ \tau = \mathbf{1}_W$, and also $\ell\circ\tau = \ell$.

33723 questions
2
votes
3 answers

Finding all $f:\Bbb{R}\to\Bbb{R}$ such that $f(x+y)=f(x)+f(y)$ for all real $x$ and $y$, and $f(1)=0$

If $f:\Bbb{R}\to\Bbb{R}$ satisfies $f(x+y)=f(x)+f(y)$ for all real $x$ and $y$, and $f(1)=0$, find $f(x)$. By definition, $$f'(x)= \frac{f(x+h)-f(x)}{h}$$ when $h$ tends to zero. Using the given statement, $$f'(x)= \frac{f(h)}{h}$$ Since…
green_32
  • 235
2
votes
0 answers

Is this a valid proof of surjectivity and bijectivity?

Given a function $F \colon \mathbb{Z} \to \mathbb{Z}$ defined by $F(n) = (-1)^n n + 3$ proof that it is surjective. Since the definition of surjectivity says that $\forall k \in \mathbb{Z}, \ \exists n \in \mathbb{Z} \ \colon k = F(n) = (-1)^n n +…
buresque1
  • 23
  • 3
2
votes
2 answers

2D Epanechnikov Kernel

What is the equation for the $2D$ Epanechnikov Kernel? The following doesn't look right when I plot it. $$K(x) = \frac{3}{4} * \left(1 - \left(\left(\frac{x}{\sigma} \right)^2 + \left(\frac{y}{\sigma}\right)^2\right) \right)$$ I get this:
Arlen
  • 392
2
votes
1 answer

What is the name of this function?

What is the name of the following function (if there is one)? $$f(x) = \begin{cases} x & \text{ if } -1 \leq x \leq 1\\ \frac 1x & \text{ if } x < -1 \text{ or } x >1\\ \end{cases} $$ If this function has a name, how is it usually denoted?
2
votes
1 answer

Is $f: \mathbb{Z} \to \mathbb{Z}$ onto when $f(m)=2m−3$?

I’ve gotten a different answer than the one provided by the professor, and based on how the question is worded and the definition of onto, the answer ought to be no. Textbook definition of onto: “A function f from A to B is called onto, or a…
Kevin Li
  • 165
2
votes
2 answers

Is the following a Bijective Function?

In a bijective function is it necessary that all the elements of the domain correspond to a value in the range? Like for example can the following be a bijective function - If not then what type of function is it?
2
votes
3 answers

Continuity of function $f(x)=2^{-\frac{1}{x^{2}}}$

I need help with this task, if anyone had a similar problem it would help me ! The task is: Determine the type of interruption at the point x = 0 for the function $$f(x)=2^{-\frac{1}{x^{2}}}$$ I did: $$L=\lim_{x\to 0^{-}} 2^{-\frac{1}{x^{2}}} = 0…
LogicNotFound
  • 465
  • 2
  • 6
2
votes
0 answers

Inverse of the empty function

Suppose that $f: \emptyset \to \emptyset$ is the empty function. The only possible inverse function, I believe, is that for which there are no elements in the domain or codomain, and the statement $(f \circ f^{-1})(x) = x$ for all $x$, and vice…
user861776
  • 1,062
2
votes
1 answer

"Tooth" function and its Lipschitz property

Suppose that $\varphi:[0,1]\to \mathbb{R}$ is given by $$\varphi(x) = \begin{cases} x, & \text{if } x\in[0,1/2],\\ 1-x, & \text{if } x\in [1/2,1]. \end{cases}$$ Let's continue this function over $\mathbb{R}$ with period $1$ and label the new…
RFZ
  • 16,814
2
votes
1 answer

Proving that this Function is Surjective

Let's say we have a function $g: \mathbb{R} \rightarrow [0,1)$ and $g$ is defined by $g(x) = x - \lfloor x \rfloor$. So far I thought about having $g(a) = b$ meaning we find an $a$ that makes $g(a) = b$. Thus, $$\begin{align*}g(a) = b \text{ where…
DippyDog
  • 313
2
votes
1 answer

Prove that $f(x)>f(y)$ if $x>y$

I am working on Spivaks calculus book and have the following question: We have a function with properties (Chapter 3, Ex. 17, (d)): $$f(x+y)=f(x)+f(y)$$ $$f(xy)=f(x)f(y)$$ and we are trying to prove that $f(x)=x$ for $x$ a real number. In this step…
Binomi
  • 117
2
votes
1 answer

Is it silly to write $\phi : [a,b] \rightarrow \phi([a,b])$?

If it is rather silly, how would you express such a function? For example (to be specific), if $\phi : [a,b] \rightarrow \mathbb{R}$ is injective, how would you express the fact that the same function with the co-domain restricted to the range of…
RayaneCTX
  • 147
2
votes
2 answers

Notation for Range for a Function

I was given a question where I was asked to determine if a function is one-to-one and/or onto. It was given like this: $\mathbb{Z}^+\to\mathbb{Z}^+,f\left(x\right)=\left(\frac{x}{5}\right)-4$ In this case, what would the…
2
votes
3 answers

Prove that a map is Injective

How can I prove that $f: (0, \infty) \times (0,\pi) \to \mathbb{R}^2$ where $f(x,y) = (\sinh(x)\sin(y),\cosh(x)\cos(y))$ is injective?
jon jones
  • 1,178
2
votes
0 answers

showing that $f$ is bijective as follows

edit: Let $A=\{x \in \Bbb R \mid 0\le x \le 1\}$ and $B=\{x \in \Bbb R \mid 5\le x \le 8\}$. Let $f:A \to B$ defined by $f(x) = 5+(8-5)x$ for all $x \in A$. Show that $f$ is bijective. Attempt: $f$ is injective: Let $x_1,x_2 \in A$ and assume that…
lap lapan
  • 2,188