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

How to determine function is onto

Consider the below function $f(x)=\frac{x}{2x+1}\{x \neq- \frac{1}{2}\}$ Onto functions are those $\forall y \exists x(f(x)=y)$, means for all elements in co-domain we have a pre-image in the domain. I particularly get stuck how to determine when a…
2
votes
1 answer

How do I determine the function from its graphic?

How am I supposed to know the function from it's graphic?
2
votes
3 answers

why average value of a function is not calculated by using the formula $\frac{f(a)+f(b)}{2}$?

I know the formula for calculating the average value of a function as $$ \frac{1}{b-a}\int_a^b f(x)\,dx$$ But in elementry level maths and physics problems we generally use a very simple approach to find the average of a value,by taking sum of two…
2
votes
2 answers

Function that returns a number greater than 1 from a division

Given two real numbers $x$ and $y$ (with $x, y \neq 0$), is there a function that returns only the result of the divisions $x/y$ and $y/x$ which is $\geq 1$? $$f(x, y) = x/y \geq 1 \text{ if } x \geq y$$ and $$f(x, y) = y/x \geq 1 \text{ if } y \geq…
DK2AX
  • 135
2
votes
1 answer

How to say $x=f(y)$ is similar to $y=g(x)$?

I am writing a statement for a model that: The relationship between two independent variables $V_{1}$ and $V_{2}$, a linear model that accounts for errors in from both $x-$ and the $y-$ axis must be defined, such that the model satisfies both…
Sharah
  • 133
2
votes
4 answers

How to show that $ n^{2} = 4^{{\log_{2}}(n)} $?

I ran across this simple identity yesterday, but can’t seem to find a way to get from one side to the other: $$ n^{2} = 4^{{\log_{2}}(n)}. $$ Wolfram Alpha tells me that it is true, but other than that, I’m stuck.
Voo
  • 117
2
votes
4 answers

Can i determine if a function will increase in the future?

Is it possible to determine whether a function will have increased in the future relative to starting points, given a sample of the first $m$ points? For example, given the 4 first values of a function $(f(1), f(2), f(3), f(4) )= (2, 1, 4, 5 )$ can…
2
votes
3 answers

Finding a monotonically increasing function with limit 1

To polish/improve a homework answer, I am trying to find a monotonically, continuous, strictly increasing function $f$ with these properties: $f(0) = 0$ $\lim_{x \to \infty} f(x) = 1$ (I don't care what happens when $x < 0$.) This task seems…
TakeS
  • 227
2
votes
0 answers

On domains and ranges

This is a really simple question that I should know how to answer at this point, but I have always been sort of confused about this notation: $$f:A\mapsto B$$ Without specifying anything about $f$, what does the above statement mean? Like I'm sure…
clathratus
  • 17,161
2
votes
3 answers

Surjective and Injective function

Let $N=\{1,2,3...\}$ be the set of natural numbers and $F:N \times N \rightarrow N$ be such that $f(m,n)=(2m-1)*2^n.$ (A)F is Injective. (B)F is Surjective. (C)F is Bijective. (D)None of the above. I can see that F can never be surjective because 1…
2
votes
1 answer

Is there point in calculating a function zero if zero isnt in it's domain?

I was practicing function domains and function zeros For example, this function: $f(x) = x e^{\frac{1}{x}}$ It's domain is $\{x\in \mathbb{R} : x\neq0 \}$ It's function zero: $f(x) = 0$ $x e^{\frac{1}{x}} = 0$ $x = 0$ ? This is where my confusion…
2
votes
1 answer

Must $g(x)$ and $f(x)$ be functions for composition function $(g \circ f)(x)$ to exist

I understand that for composite function $(g\circ f)(x)$ to exist, range of $f(x)$ must be a subset of domain of $g(x)$. This is so that every output value of $f(x)$ is mapped to one value of $g(x)$. However, is this on the assumption that both…
2
votes
1 answer

Bijection between $\mathbb R^2$ and $(0,1)$

[TIFR GS-2013, Part D] Does there exist any bijection between $\mathbb R^2$ and the open interval $(0,1)$ ?? At the first glimpse, I thought about the function $f: \mathbb R^2 \to (0,1)$ defined by $f(x,y) = {0.2}^{x}{0.3}^{y}$. But then I…
2
votes
3 answers

Range of $y = \frac{x^2-2x+5}{x^2+2x+5}$?

How do I approach this problem? My book gives answer as $[\frac{3-\sqrt{5}}{2},\frac{3+\sqrt{5}}{2}]$. I tried forming an equation in $y$ and putting discriminant greater than or equal to zero but it didn't work. Would someone please help me? I get…
Hema
  • 1,329
2
votes
1 answer

Finding domain of $ f(x) ^ {g(x)} $?

My coaching module says "for domain of $ k(x)= f(x) ^ {g(x)} $ conventionally the conditions are $f(x)>0$ and $g(x)$ must be real." I get why $g(x)$ must be real, but why must $f(x)>0$ ? If for instance $f(x) = -1$,why wouldn't $k(x)$ be real?…
Hema
  • 1,329