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
6
votes
4 answers

show if function is even or odd

Suppose that we have equation: $$f(x)=\frac{2^x+1}{2^x-1}$$ There is question if this function even or odd? I know definitions of even and odd functions, namely even is if $f(-x)=f(x)$ and odd is if $f(-x)=-f(x)$ and when I put $-$ sign in…
6
votes
1 answer

Nonexistence of a strongly multiplicative increasing function with $f(2)=3$

Show that there does not exist a strictly increasing function $f:\mathbb{N}\rightarrow\mathbb{N}$ satisfying $$f(2)=3$$ $$f(mn)=f(m)f(n)\forall m,n\in\mathbb{N}$$ Progress: Assume the function exists. Let $f(3)=k$ Since $2^3 <…
zzzzzzzzzzz
  • 1,072
6
votes
1 answer

Is there a systematic way to find the range of functions?

I was looking for steps or a systematic way to find the range of functions. The way to find domain is quite obvious: exclude x-values that make the function undefined on the real numbers. But the range is harder, I found several methods to find…
6
votes
1 answer

If $f(f(x))=x$ does that mean $f(x)$ equals its inverse?

Given any real function, if $f(f(x))=x$ does that mean $f(x)$ is its own inverse? I am confused since $f^{-1}(f(x))=x$ and this is a fact, so can we assume that $f(x)$ will equal $f^{-1}(x)$ by substitution? Specify if possible if it is never,…
6
votes
1 answer

Find a function from values

Is there any way to find a function, even just similar, from a set of values? I get these pairs of values from two sensors and would like to find a simple function that describes the relationship between these pairs of numbers and then to estimate…
frx08
  • 185
6
votes
1 answer

Closed form for sine graphic rotated by 45 degrees?

Is there a non-parametric closed form for a function looking like a sine rotated 45 degrees? I have encountered also a similar question but it asks for a function resembling the rotated sine, but not necessarily exact.
Anixx
  • 9,119
6
votes
3 answers

calculation $f(x)$ from given expression

$$f(x)+xf(-x)=x-2$$ what is $f(x$)? I try to solve this problem, but I don't know how to remove $f(-x)$ or converting it to $f(x)$.
user123
  • 251
6
votes
3 answers

To find the general formula of $\overbrace{g(g(g(...g(x))}^\text{n}=g_n(x)=\frac{A_{n}.x+B_{n}}{C_{n}.x+D_{n}}$

$$f(x)=\frac{1}{x+1}$$ $$f(f(x))=\frac{1}{\frac{1}{x+1}+1}=\frac{x+1}{x+2}$$ $$f(f(f(x)))=\frac{\frac{1}{x+1}+1}{\frac{1}{x+1}+2}=\frac{x+2}{2x+3}$$ It is easy to see that the general formula has relation with Fibonacci numbers and the general…
Mathlover
  • 10,058
5
votes
1 answer

How to create a function based on the characteristics?

I wonder how to create a function based on the characteristics. suppose I have function $f$ and $g$ like this: $f(x,g(x,y,z)) = y$ $\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,,$ $g(x,f(x,z),a) = z$ With $x,y,z,a$ are the parameters. Are there "algorithm"…
smftr
  • 177
5
votes
2 answers

Can I cancel out quotient function safely?

Can you actually cancel out the numerator and denominator? $$f(x) = \frac{x^3-8}{x-2}$$ This function is not defined at $x=2$ so the domain of it is "all real numbers except 2". $f(x)$ can be rearranged into $$\frac{(x^2+2x+4)(x-2)}{x-2}$$ When I…
offchan
  • 478
5
votes
1 answer

Can two functions with different codomains be equal?

I'm looking through some lecture notes, and found that the author defined two functions f and g to be equal if: they have the same domain, say S, they have the same codomain, and f(x)=g(x) for all x in S. This seems peculiar to me. In the…
5
votes
2 answers

Binary function that is distributive, associative, commutative

Is there such an operation that is distributive over addition, and is not multiplication? Also, please no operations that are defined piece-wise, or that are trivial. It must apply to all integers, but for all reals for example, the result does not…
soandos
  • 1,756
5
votes
1 answer

How find this sum of all distinct values of $f(2014)$

For all functions $f:\mathbb{R}\backslash\{0\}\to\mathbb{R}$, that satisfy $$f\left(x+\frac1x\right)f\left(x^3+\frac1{x^3}\right) - f\left(x^2+\frac1{x^2}\right)^2 = \left(x-\frac1x\right)^2,$$ find the sum of all distinct values of…
math110
  • 93,304
5
votes
6 answers

Does $f(f(x)) = x \Rightarrow f$ is bijective apply?

As far as I remember a reverse function for some function $f$ exists iff an inverse function exists. Can I therefore follow from $f(f(x)) = x$ ($f$ is its own inverse function) for some function $f$ that it is bijective without proving it is…
muffel
  • 2,879
5
votes
1 answer

Show that $f(x)={x\over2}+c$, where $c$ is a constant

Let $f:\mathbb{R}\to\mathbb{R}$ be a function satisfying $|f(x+y)-f(x-y)-y|$$\le y^2$ for all $x,y\in\mathbb{R}$. Show that $f(x)={x\over2}+c$, where $c$ is a constant.
Rudstar
  • 1,173