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

How can I find the equation of an exponential equation given a set of points?

I know the equation that fits the given points is exponential. What is the best way to find the equation?
Andrew
  • 141
4
votes
1 answer

Image of Intersection of sects not equal to intersection of images of sets

How to disprove, if $f$ is a function, $f(A \cap B) != f(A) \cap f(B)?$
user1063185
  • 41
  • 1
  • 1
  • 2
4
votes
0 answers

For $f:\mathbb{N}\times\mathbb{N}\to\mathbb{Z}$, $f(x,y)=x-y$ is the function injective?

For $f:\mathbb{N}\times\mathbb{N}\to\mathbb{Z}$, $f(x,y)=x-y$ is the function injective? I got this question in my homework and this is how I attempted to solve it: If I want to prove that a certain function $f:\,A\to B$ is injective, we need to…
4
votes
1 answer

Prove that given $f,g:A \to A$ , if $g$ is not onto and $f$ is one to one $\Rightarrow \ \ f \circ g$ is not onto

I need to prove that given $f,g:A \to A$ ($A$ is some set), if $g$ is not onto and $f$ is one to one $\Rightarrow \ \ f \circ g$ is not onto. First of all I don't understand why do I need to know that $f$ is one-to-one, I tried finding a counter…
Red
  • 65
4
votes
2 answers

Prove that $T: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ is a bijection

I have to prove that the following is a bijection: $ T: \mathbb{R}^2 \rightarrow \mathbb{R}^2 $, with $T(x,y)= \left( \begin{array}{c} 5x + \sin(y)\\ 5y + \arctan(x) \end{array} \right)$ Now, to prove it is surjective I composed it with $x =…
GivAlz
  • 448
  • 2
  • 7
4
votes
1 answer

Problem with understanding how to scale a function

I'm trying to scale the following function: $$y=\sqrt{1-\frac{x^2}{a+bx}\times c}$$ For example, I want to scale it proportionately by 2. Turns out I need to multiply a and c by 4 (2 squared), but b by just 2. I assume this is something about square…
Asha R
  • 341
4
votes
1 answer

Function to penalise extreme values

I am carrying out analysis on a corpus of data and I am currently investigating the frequency of words appearing in that corpus. What I am looking for is a function which penalises large and small values so that, instead of a graph of decreasing…
4
votes
0 answers

function decomposition given $f(g(x))$ and $g(f(x))$

Problem Find functions $f(x)$ and $g(x)$ such that $f(g(x))=x^2-2x-4$ and $g(f(x))=x^2-6x+6$. Finding some points Notice that $f(g(f(x)))=f^2(x)-2f(x)-4=f(x^2-6x+6)$ and the equation $x^2-6x+6=x$ has roots $1$ and $6$. This gives…
Yuta
  • 1,493
4
votes
1 answer

Find error in this algebraic transformation on a function

Let $f(x)=x^2+x\sqrt{x^2-1}$. Apparently the statement $\forall x$ for which $x,-x\in\mathbb D$, $f(x)=f(-x)$. is false, but I can “prove” it by \begin{align}x^2+x\sqrt{x^2-1}=x\left(x+\sqrt{x^2-1}\right)=\frac…
user1034536
4
votes
2 answers

How to define an asymmetric oscillatory function with increasing amplitude and period?

I am struggling to model the correlation shown in the figure so that I can predict the positive values of y beyond the observed range: The correlation between y and x appears oscillatory and characterised by: increasing amplitude; increasing…
4
votes
5 answers

Is this true? $f(g(x))=g(f(x))\iff f^{-1}(g^{-1}(x))=g^{-1}(f^{-1}(x))$.

Is this true? Given $f,g\colon\mathbb R\to\mathbb R$. $f(g(x))=g(f(x))\iff f^{-1}(g^{-1}(x))=g^{-1}(f^{-1}(x))$. I met this problem when dealing with a coding method, but I'm really not familiar with functions. Please help. Thank you.
JSCB
  • 13,456
  • 15
  • 59
  • 123
4
votes
2 answers

A composite function problem

The question is: Suppose $$f(x) = x^2+1,$$ $$g(x) = 3-x.$$ Find the values for $x$ for such that $$(g\circ f)(x) = (f \circ g)(x).$$ I tried banging my head for one hour but my answer doesn't match the one given by the book which is $1/\sqrt{2}$ and…
4
votes
2 answers

If $f(-1) = 0$ and $f(2)=0$, and if $g(x)= 2x-1$, then find the value of $x$ for which $(f\circ g)(x) = 0$

I have found the following problem. If $x = -1$ and $x=2$ then $f(x) = 0$. If $g(x)= 2x-1$, then find the value of $x$ for which $f\circ g(x) = 0$. I have solved the above problem in the following way. $f(x) = (x+1)(x-2)$ $f\circ g(x) =…
4
votes
2 answers

Ratio of two positive functions

Let $g(x)$ and $h(x)$ be two nonnegative functions over $[0,a]$ with $g(0)=h(0)=0$, $$ g'(x)\leq h'(x), $$ and $g(x)>0$ and $h(x)>0$ for $x\in(0,a)$. Let $$ f(x) = \frac{g(x)}{h(x)} $$ over $(0,a)$ with $$ \lim_{x\to 0}f(x)=1. $$ (An example is…
4
votes
1 answer

Inverse image of a subset of the codomain with elements without corresponding elements in domain

I consider the function $f(x) = x^2 : \mathbb{R} \rightarrow \mathbb{R}$ whose image is $[0, + \infty)$. For the sake of simplicity: domain $D = \mathbb{R}$, codomain $C = \mathbb{R}$. If I consider $A = [-25, 25]$ subset of the codomain $C$, this…