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
3
votes
1 answer

Proving a multi variable function is injective

For a function $f : N \times N \rightarrow N$, such as $f(x,y)=2^{x-1}(2y-1)$ how would you go about proving the function is injective? While I understand how to go about proving a function is injective for a function with one variable, generalizing…
sbauer322
  • 33
  • 1
  • 5
3
votes
3 answers

Example of functions that grow faster than the exponential functions and/or factorial functions?

What is example of functions that grow faster than the exponential functions and/or factorial functions?
3
votes
1 answer

S Curve shapes with flat middle

I was wondering if there is a simple formula to change an S-curve to have a flat area in the middle. I am using the formula.. $$y=\frac{1}{1+e^{B-x}}$$ Where $B$ is the steepness of the curve. This gives me a normal S-curve. BUT i also want a curve…
Sprouts
  • 33
3
votes
1 answer

Help with proof of injection and surjection

For the record, I am sorry, I haven't yet learnt how to use LaTeX I have a function $f(x) = 2x^3 - 1$ My proof of injection is as follows: $f$ is one to one for all $x_1,x_2$ element $X$, if $f(x_1) = f(x_2)$ then $x_1 = x_2$ Proof $f(x_1) =…
Display Name
  • 1,443
  • 1
  • 20
  • 45
3
votes
3 answers

How to get maximum value of a function with three variables satisfying a condition?

The maximum value of the function $$f(x, y, z) = \left(x -\frac{1}{3}\right)^2 + \left(y - \frac{1}{3}\right)^2 + \left(z - \frac{1}{3}\right)^2$$ subject to the constraints- $x + y + z = 1; x \ge 0; y \ge 0; z \ge 0$ what is the actual method to…
kumar
  • 291
3
votes
0 answers

How do I group unique pairs of sequential numbers in a grid?

Not sure if this SE site the best place to help find a solution for this problem. I am open to suggestions! It basically boils down to this: Given a grid of numbers where the numbers are ordered sequentially across and down (typewriter-style), how…
Shoeless
  • 131
3
votes
2 answers

Let $f$ be a homomorphism from the reals under addition to the nonzero complex numbers under multiplication. Find the image of $f$.

If $f$ is as given in the problem statement, then how do I determine its image? My book says that the image of $f$ = {$z$ in the nonzero complex numbers under multiplication such that $z=f(x)$ for some $x$ in the reals under addition}. SO could I…
user85362
3
votes
0 answers

What functions describe themselves with degree n

I'm interested in understanding functions that describe themselves in a certain degree $ n $. Let me define what I mean by this: A function $ f(x) $ is said to describe itself in degree $ n $ if there exists a function $ g_{n,f} $ with an inverse…
3
votes
2 answers

Minimum value of $f(x)$ in $x\in[0,1]$

The value of $\displaystyle \underbrace{\min}_{0 \le x \le 1} \max \ [\{x^2, (1 - x)^2, 1 - x^2 - (1 - x)^2\}]$ can be written in the form $\displaystyle\frac{m}{n}$ , where $m$ and $n$ are positive integers with gcd$(m, n) = 1$. Find $m + n$ We…
3
votes
1 answer

Is there a general relation between min (f(x) / g(x)) and min f(x) / max g(x)?

Intuitively, it seems that $$ \min \frac{f(x)}{g(x)} \geq \frac{\min f(x)}{\max g(x)} $$ if both $f$ and $g$ are positive-valued functions, but is there a more general relationship? Can one also deduce a similar relationship with the $\min$ and…
Rahul
  • 165
3
votes
2 answers

Analytic continuation of double factorial

This question is somewhat informative. In Wikipedia the definition of double factorial continued in the complex arguments is provided $$ k!!=\sqrt{\frac{2}{\pi}}2^{\frac{k}{2}}\Gamma[k/2+1] $$ Clearly, this definition does not work for positive even…
3
votes
2 answers

What is the difference between $y$ and $y(x)$?

When you have an equation such as $y=2x$ and you want to rewrite it using function notation, it is conventional to define the function using another letter ($f$ for example). Why is the function not defined using the same letter? Is it because there…
3
votes
1 answer

What is the domain and the range of the function given below?

The plot of function & the function definition is here: https://www.desmos.com/calculator/p4y97ww37l Edit In case the above link isn't working,here's the function definition: $$y=\left \lceil x \right \rceil.sin\frac{\pi}{\left \lceil x+1 \right…
3
votes
2 answers

On functions satisfying a functional inequality

Suppose $f \colon (0,1) \to (0,\infty)$ is monotonically decreasing and integrable on (0,1). Denote $F(x) = \int_0^x f(y) dy $. Suppose that there exists a constant $C>0$ such that $$F(q) - qf(q)^2 \le C$$ for all $q \in (0,1)$. Is there anything…
Rooibos
  • 179
3
votes
1 answer

How to find a function that goes linear at the beginning, slows halfway in and then converges to 1?

I’m in C.S. and I need a function f(x) that calculates the value for brightness. Its values goes from 0 to 1, in the beginning it progresses linearly, then it starts slowing down halfway and keeps slowing down the closer it goes to 1. What is a…
Jocko
  • 133