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
2 answers

Find all functions $f:\Bbb{Z}\to\Bbb{R}$ such that $f(m)\cdot f(n)=f(m-n)+f(m+n)$

Find all functions from the integers to the real numbers such that $$f(m)\cdot f(n)=f(m-n)+f(m+n)$$ and $f(1)=\frac{5}{2}$. I think the answer should be $f(m)=2^m+2^{-m}$ by calculating small values, but I can’t prove that.
Taha Akbari
  • 3,559
2
votes
2 answers

Can a graph of a function be rotated 90 degrees and represent the same function?

I was looking at the following problem: "If a graph of a function rotated 90 degrees about the origin, then it is not changed. Is there such a function?" The only one I can think of if is $f(x)=0$ defined on $x=0$. Is it possible to prove that this…
Vasili
  • 10,690
2
votes
1 answer

examples of functions from 0 to 1 with properties outlined below

Can I get some examples of f(x) for real x such that: f(0) = 0 , f(1) = 1 between 0 and 1 exclusive; f'(x) is positive definite I am looking for different kinds of functions in general (such as x^n) And any intervals of a function that can be used…
2
votes
1 answer

Define a function $ \ f: [1,3] \to [3,7] \ $ by $ \ f(x)=2x+1 \ $.

Define a function $ \ f: [1,3] \to [3,7] \ $ by $ \ f(x)=2x+1 \ $. If $ f \ $ be a injective function , does the following condition confirm that the function is bijective ? (a) Here clearly , $ \ f \ $ is continuous. Since $ f(1)=3 \ \ and \ \…
MAS
  • 10,638
2
votes
2 answers

Is $f:\emptyset \to X$ injective

My book uses 2 equivalent definitions of injectivity, the first being $$x\neq y \Rightarrow g(x)\neq g(y)$$ and the second being $$g(x)=g(y) \Rightarrow x=y$$ Now as $f$ has $\emptyset$ as its domain I cannot make sense of either of these…
Ben Martin
  • 1,766
  • 1
  • 7
  • 16
2
votes
1 answer

Functions problem with natural numbers

Let $f\colon \mathbb{N_0}\to \mathbb{N_0}$ $f(n+1)\gt f(n)$ , with $n \in \mathbb{N_0}$ $f(n+f(m))= f(n)+m+1$, with $n,m \in \mathbb{N_0}$ $f(2017)=?$ I tried with a equation system, but i can't figure it out.
Trobeli
  • 3,242
2
votes
3 answers

What is common math notation for "fanout" combination of functions?

Let's say we have $f_1 : A \to X$ and $f_2 : A \to Y$. What is the most canonical way to denote $f : A \to X \times Y$ that combines $f_1$ and $f_2$ by outputting pair of their respective values for same argument? Sort of like this haskell…
2
votes
3 answers

What two input functions satisify an output between 0 and 1?

What are common functions that take two input variables and make the output between 0 and 1? Question is as simple as that, two inputs and one output, output needs to stay between 0 and 1!
M.Mic
  • 21
2
votes
1 answer

Solving a multi-variable function

Let $a$ be a real number, and define function $f$ on $\mathbb{N}$ $\cup$ {$0$} $\times \mathbb{N}$ $\cup$ {$0$} as follows: $f(0,0) = 1$ $f(m,0)=f(0,n)=1$ $f(m,n)=af(m,n-1)+(1-a)f(m-1,n-1)$ where $m,n$ are positive integers. $(a)$ Find all $a$ such…
dcxt
  • 614
2
votes
3 answers

Why is $f(x) = |x|$ not surjective?

Can anyone explain to me why the function $$ f(x)=|x| $$ is not surjective (onto)? I think it should be, but my teacher told me it's not.
Lendion
  • 101
2
votes
1 answer

Smooth $f(x)$ where $f(x) = 1$ for $x = \pm 1, \pm 5, \pm 9, \ldots$ and $f(x) = -1$ for $x = \pm 3, \pm 7, \pm 11$

Question: Find smooth $f(x)$ where $f(x) = 1$ for $x = \pm 1, \pm 5, \pm 9, \ldots$ and $f(x) = -1$ for $x = \pm 3, \pm 7, \pm 11$ Condition: For the purpose of this question, I define smoothness as no sudden changes in the function and its…
Srini
  • 823
2
votes
1 answer

If $|f(x)-f(y)|<(x-y)^2$ for all $x,y \in \mathbb{R}$. Then $f(x)$ is constant.

If $|f(x)-f(y)|<(x-y)^2$ for all $x,y \in \mathbb{R}$. Then $f(x)$ is constant. $\bf{Attempt}$ Put $x=y+h$ where $h \rightarrow 0$ Then $\displaystyle |f(y+h)-f(y)|<(y+h-y)^2 = h^2$ So $\displaystyle \displaystyle \lim_{h\rightarrow…
DXT
  • 11,241
2
votes
1 answer

Is my piecewise function right? Problem given below.

Problem: A computer shop charges 20 pesos per hour (or a fraction of an hour) for the first two hours and an additional 10 pesos per hour for each succeeding hour. Represent your computer rental fee using the function R(t) where t is the number of…
Janine
  • 65
2
votes
2 answers

What is this function for this graph?

Trying to find a function like this: 2 y-axis asymptotes: -1 / 1 x values range from -infinity to infinity.
nubela
  • 841
2
votes
1 answer

How does the properties of domain and codomain imply about the properties of the function?

The question comes up when I'm considering the following issue For $f:A\to B$, give only some of the properties of the sets $A$ and $B$, what can we say about $f$? The first thing came to my mind that I want to say about $f$ is whether it is…
BAI
  • 2,565