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
8
votes
0 answers

Can the multiplicative product of bijective functions $\mathbb{R} \to \mathbb{R}$ be bijective?

Given two functions $f$ and $g$, which are bijective $\mathbb{R} \rightarrow \mathbb{R}$, can $h(x) = f(x)g(x)$ also be bijective on $\mathbb{R} \rightarrow \mathbb{R}$? I can prove no such $h$ exists if $f$ and $g$ are continuous: $f(x)$ and $g(x)$…
8
votes
6 answers

Why do we stick to single valued functions?

The definition of a function of real variables given in my book was that a function is a rule which assigns to each element in the domain exactly one element of the range. I am new to what a mathematical structure is, but from what I have gathered…
Kakashi
  • 83
  • 5
8
votes
4 answers

Is $x < y \implies f(x) < f(y)$ equivalent to $x < y \iff f(x) < f(y)$?

Given a function $f: \mathbb{R} \to \mathbb{R}$, is $x < y \implies f(x) < f(y)$ equivalent to $x < y \iff f(x) < f(y)$. If $f(x) < f(y)$, then the contradiction occurs only$_\text{(or is it not the "only" case)}$ when $x > y$. If that happens, then…
8
votes
2 answers

Find range of $f(x)=3\cos^4x-6\cos^3x-6\cos^2x-3$ in the interval $[-π/2, π/2]$

While solving some questions related to functions, I came across this question and I am unable to find its range. $$f(x)=3\cos^4x-6\cos^3x-6\cos^2x-3$$in the interval $[-π/2, π/2]$ I tried graphing this function on Desmos and got this…
Navya
  • 93
8
votes
2 answers

Nested functions

Assuming that we have some function $L(x)$ such that $L(x) = x - \frac{x^2}{4}.$ Now, define $a_n$ as $$L \Bigl( L \Bigl( L \Bigl( \cdots L \Bigl( \frac{17}{n} \Bigr) \cdots \Bigr) \Bigr) \Bigr),$$ where we have $n$ iterations of $L.$ My question…
8
votes
2 answers

Odd $C^\infty$ function

Suppose that $$f\in C^\infty (\mathbb{R})$$ and $f$ is an odd function. ($f(x)=-f(-x)$) What can we say about the zero at zero? Does $f$ have to be of the form $x g(x)$ for some $g\in C^\infty (\mathbb{R})$? I know this is true for complex…
8
votes
2 answers

(Computationally) Simple sigmoid

I'm looking for the analytic expression of a computationally cheap sigmoid that passes through the points (0, 1) and (1, 0). Thoughts?
8
votes
2 answers

Prove the function cannot be injective

Let $f: \{x \in \mathbb{Q}, x \gt 0 \} \rightarrow \mathbb{Q}$ such that $f(xy)=f(x) + f(y), \forall x,y$.Prove: $f$ cannot be injective Can $f$ be surjective? For $x=y=1$ I get $f(1)=0$. Also it's easy to prove $$f(x^n)=n\,f(x),\quad…
user261263
8
votes
1 answer

Function $f:\mathbb R^+\rightarrow \mathbb R^+$ that is eventually greater than $x^{x^{x^{...^{x^x}}}}$

For each $n$, define $f_n:\mathbb R^+\rightarrow \mathbb R^+$ by $f_n(x) = \underbrace{x^{x^{x^{...^{x^x}}}}}_n$ I want to find a function $f:\mathbb R^+\rightarrow \mathbb R^+$ such that for any given $n$, $f$ is eventually greater than…
Adam Rubinson
  • 20,052
8
votes
2 answers

Find the domain of $\ln(\sqrt{x^2-5x-24}-x-2)$.

Find the domain of $\ln(\sqrt{x^2-5x-24}-x-2)$. When i solved this question,i got the answer $x<\frac{-28}{9}$ but the answer given in the book is $x\leq-3$. This is how i solved. $\sqrt{x^2-5x-24}-x-2>0\Rightarrow \sqrt{x^2-5x-24}>x+2$ $$\therefore…
8
votes
1 answer

Let $f:[1,10]\to \Bbb{Q}$ be a continuous function and $f(1)=10,$then $f(10)=?$

Let $f:[1,10]\to \Bbb{Q}$ be a continuous function and $f(1)=10,$then $f(10)=?$ $(A)\frac{1}{10}\hspace{1 cm}(B)10\hspace{1 cm}(C)1\hspace{1 cm}(D)$cant be obtained I could not solve this question.I thought over it for many minutes,here $\Bbb{Q}$ is…
Brahmagupta
  • 4,204
8
votes
3 answers

Distribution and other rules for floor and ceiling

I've been working on Project Euler and have found myself using the floor and ceiling functions a lot. I was hoping somebody could help me figure out how distribution and other properties of these functions work. Is floor(x) + floor(y) = floor(x+y)…
7
votes
1 answer

Function that returns negative number for negative x and y

I need a function, $$f(x,y):\mathbb{R} \times \mathbb{R} \rightarrow \mathbb{R} $$, that returns negative a number only if both x and y are negative. It can use only the four basic operations, so for example computing the absolute value or square…
user79334
7
votes
2 answers

Technical name for "many-to-many" mappings

A one-to-one mapping is a bijection. A many-to-one mapping is a "general function" and might also be a "surjective function". Is there a similarly technical name for a many-to-many mapping, or should I just write "many-to-many" whenever describing…
Kevin
  • 185
7
votes
2 answers

Prove that $C = f^{-1}(f(C)) \iff f$ is injective and $f(f^{-1}(D)) = D \iff f$ is surjective

Let $f:A\rightarrow B$ be a function, $C\subseteq A$, $D\subseteq B$ then prove: $C = f^{-1}(f(C)) \iff f$ is injective $f(f^{-1}(D) = D \iff f$ is surjective For both equivalences, I have difficulties proving the right implications (proving that…
taue2pi
  • 1,147
  • 3
  • 13
  • 21