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

Suppose I have a function $y=x+1$, then is this function the same as $y=\frac{ x^2+x}{x } $?

Suppose I have a function $y=x+1$ Then is this funcion the same as $y=\frac{ x^2+x}{x } $ ? The domain of x in the first function is $R$ and in the second function is $x\neq 0$.
4
votes
1 answer

Understanding the IMDb weighted rating function for usage on my own website

I'm trying to implement a review function on my website, but I want it weighed. I checked on IMDb and they have this: weighted rating $(WR) = (v / (v+m)) R + (m / (v+m)) C$ where: $R$ = average for the movie (mean) = (Rating) $v$ = number of votes…
Adam
  • 151
4
votes
1 answer

Suppose I've an equation $1/x = 5$, then is it the same as an equation $5x=1$?

This is giving me some headache. Suppose I have an equation $$\frac{1}{x}=5$$ Then is this equation the same as $$1=5x\quad ?$$ Now the domain of $x$ in the first equation is $\mathbb{R}\setminus \{0\}$, however the domain of $x$ in the second…
bodacydo
  • 3,922
4
votes
3 answers

If $f(3x)=f(x)+f(3)$, prove that

If $$f(3x)=f(x)+f(3),$$prove that : $$f(1)=0\\f(3)=0\\f(9)=0\\f(27)=0$$ My attempt: Here: $$f(3x)=f(x)+f(3)$$ If $$x=1$$ $$f(3\times 1)=f(1)+f(3)$$ $$f(1)=0$$. I got the first one but how should I prove the rest?
4
votes
2 answers

Find all functions so that $f\left(\frac{x}{f(y)}\right) = \frac{x}{f(x\sqrt{y})}$

I have to find all functions so that $$ f\left(\frac{x}{f(y)}\right) = \frac{x}{f(x\sqrt{y})} $$ I have no idea how to solve this one. Any help would be appreciated!
Victor
  • 437
4
votes
1 answer

Simple functional equation. Find $f:\mathbb Q\longrightarrow\mathbb Q$ (own)

Find the functions $f : \mathbb{Q} \mapsto \mathbb{Q}$ knowing that $$2f\left(f\left(x\right)+f\left(y\right)\right)=f\left(f\left(x+y\right)\right)+x+y,\ \forall x,\ y\in\mathbb{Q} $$
4
votes
2 answers

Prove that if $f(x)=a/(x+b)$ then $f((x_1+x_2)/2)\le(f(x_1)+f(x_2))/2$

This exercise : If $f(x)=a/(x+b)$ then : $$ f((x_1+x_2)/2)\le(f(x_1)+f(x_2))/2$$ was in my math olympiad today (for 16 years olds). I proved this by saying this is true due to Jensen's inequality. Is this an acceptable answer?(with leaving…
4
votes
4 answers

How do I prove that $f(x)$ is not invertible in $(0,1)$?

Let $f:(0,1)\to \mathbb R$ be defined by $f(x)=\frac{b−x}{1−bx}$, where $b$ is a constant such that $0
user251680
4
votes
3 answers

Solving functional equation $f(x)\cdot f(y)-xy=f(x)+f(y)-1$

As in the title. Substituting $y=x$ we get: $$ f(x)^2-x^2=2f(x)-1 $$ after rearranging, we get: $$ f(x)(f(x)-2)=(x+1)(x-1) $$ And I rather cannot assume that e.g. $f(x)=x+1$ and $f(x)-2=x-1$, so what should I do now?
user263286
4
votes
2 answers

Mathematical function for weighting results

I am trying to find a mathematical function that would provide certain weighting to the values of my algorithm. Namely, having two values, x,y, I would like to provide a function that would favour big differences between x and y. Ideally, it would…
Bober02
  • 2,546
4
votes
2 answers

How possible for function to be $A \subset f^{-1} \left( f(A) \right) \forall f$?

While trying to understand concept of measurable function I read on wiki more about function inverse and found interesting fact about them. For every function $f$, subset $A$ of the domain and subset $B$ of the codomain we have $A \subset…
Ievgenii
  • 413
4
votes
2 answers

What are "complementary pair-wise comparable functions"?

I got this term while studying periodic functions; my book writes: If $f_1(x)$ & $f_2(x)$ are periodic functions with periods $T_1$ & $T_2$ respectively, then we have $h(x) = f_1(x) + f_2(x)$ has period, as $\dfrac{1}{2} \text{L.C.M. of }\; \{T_1…
user142971
4
votes
2 answers

injective and surjective

How to prove that a composite function $f\circ g$ is bijective$?$ because i have two questions. if $f$ is injective and $g$ is surjective, can $g\circ f$ be both injective and surjective? because the question assumes both sets to be the same…
4
votes
2 answers

Function Can Only be Solved by Simultaneous Equations, returns different/wrong answer each time it is solved?

I'm having a lot of trouble with a specific question regarding functions, but I'm not sure where to post it.. the question is: Let $$ y = f(x) = a x^2 + bx + c $$ and have the values ($i \in \{1,2,3\}$): \begin{align} (x_i) &= (3,1,-2) \\ (y_i) &=…
blue sky
  • 123
4
votes
1 answer

Study this function $f(x) = \frac{\sqrt[3]{x-1}}{(x+2)^2}$

I need to study this function: $$f(x) = \frac{\sqrt[3]{x-1}}{(x+2)^2}$$ and I need to show Max and Min point. The first thing is define the Domain, so: $$\left\{\begin{matrix} \sqrt[3]{x-1} > 0\\ (x+2)^2 \neq…