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

Basic composite function

If $f(x)={1\over x}$ and $g(x)=\sin(x)$ Just checking if I'm understanding this correctly. Are the formulas below correct? $$f(g(x))={1\over \sin(x)}\\ g(f(x))=\sin\left({1\over x}\right)$$ And their domains for both would be: $(x\ne0)$?
stuart
  • 513
  • 4
  • 10
2
votes
2 answers

About single-valued function

I was reading a paper about compression algorithm: In order to optimality fit the line segments to the curve, Bellman's algorithm assumes that the input data is a valid (i.e., single-valued) function; thus, the trajectory cannot contain no…
BAD_SEED
  • 463
2
votes
4 answers

What function looks like $\overbrace{}$?

Here's my awesome drawing: Basically it's a function that takes a high (or infinite) value at $0$, then falls off logarithmically for a while before falling off exponentially. It doesn't need to be symmetric, it would be ok if the negative $x$…
2
votes
2 answers

Prove that $\varphi^{-1}$ is the inverse of $\varphi$

This is exercise 2.27 of Lee's introduction to topological manifolds. I proved (geometrically) that $$\varphi(x,y,z)=\frac{(x,y,z)}{\sqrt{x^2+y^2+z^2}}$$ and that $$\varphi^{-1}(x,y,z)=\frac{(x,y,z)}{\max\{|x|,|y|,|z|\}}$$ How can I prove directly…
user5402
  • 3,006
2
votes
3 answers

Range of function $g(x)=\frac{e^{f(x)}-e^{|f(x)|}}{e^{f(x)}+e^{|f(x)|}}$

If range of $ f(x)$ is$[-1,1]$,then what is the range of function $g(x)=\frac{e^{f(x)}-e^{|f(x)|}}{e^{f(x)}+e^{|f(x)|}}$? My attempt:As $-1\leq f(x)\leq 1\Rightarrow 0\leq |f(x)|\leq 1 $ Therefore $e^{-1}\leq e^{f(x)} \leq e$ and $1\leq e^{|f(x)|}…
Brahmagupta
  • 4,204
2
votes
1 answer

General formula for a specific problem?

I have a problem which I would like to have a general formula for. Here is the description. There are island aligned by a grid. Every cell contains an island. Every adjacent island is connected by vertical or horizontal bridges. Each bridge has a…
Peter
  • 121
2
votes
0 answers

Is it possible to prove that a relation is a function or not by using derivative?

There several ways to prove if a mathematical formula is a function or not : First: To find 2 or more $X$'s that have the same $Y$ assigned to them . Second: To assume that we put $(x_1,y_1)$ and $(x_2,y_2)$ into the formula and then come to the…
Mohammad
  • 21
  • 1
2
votes
3 answers

How find minimum $f(x) = \max_{t\in[-1,1]} \left| t+ \frac{3}{2+t} + x \right|$

How find minimum this function $f(x) = \max_{t\in[-1,1]} \left| t+ \frac{3}{2+t} + x \right|$?
piteer
  • 6,310
2
votes
0 answers

$f(t)$ where $t$ is a time index

This may be a silly question but I was wondering how to interpret f(0) for something like: $$ f(t) = \sum_{t=1}^T \log(g(t)) $$ or if this doesn't make any sense altogether? The motivation for this is that I'm working with the following: for the…
WeakLearner
  • 5,982
2
votes
1 answer

Why is the digamma function close to 0 for large arguments?

I have taken the limit of both sides of an equation for x going toward infinity. There is a digamma (psi(x)) function on the RHS, and the limit of the term is supposed to be (at least close to) 0. This has to be in order for the term to vanish from…
Judy
  • 21
2
votes
1 answer

Equality between functions?

Given are real functions as follows: $f_{1}(x)=x, \; f_{2}(x)=\frac{x^2}{x}, \; f_{3}(x)=\sqrt{x^2}, \; f_{4}(x)=\left (\sqrt{x} \right )^2$ Are there any equal among them? I checked the domains and codomains of the given functions, so I…
tyr
  • 618
2
votes
1 answer

Finding the function f(t) from it's graph

Here's what I have so far: $$f(t) = (-2(t+1)+1.5) \times (u(t+1)-u(t)) + (t-0.5) \times (u(t)-u(t-1)) + 0.5\cos(\pi t) \times (u(t-1)-u(t-3))$$ I found the majority of this function, but I'm not sure how to account for the edges (the vertical lines…
2
votes
3 answers

Function and Domain with Deleted Neighbour - Beginner Question

I have a simple question about functions and domains. Consider the following function: $$f(x) = \frac{ x^2-9}{x-3}$$ I often see in the textbooks mentioning that the domain of this function can be any real number except 3. However, the given…
Yadoo86
  • 39
2
votes
0 answers

pre-image of intersection

This is a basic question and I know this is typically not how this is proven but I was wondering if the following is a valid proof of showing that given two disjoint sets, say V and W in the co-domain, their pre-images are also disjoint: If we…
bryan
  • 21
2
votes
3 answers

$f(x, y) = x - y$ - Injective?

Given the following function on $\mathbb{Z}$: $x,y \in \mathbb{Z}: f(x, y) = x - y$ As I understand, this function is surjective, i.e. each element of $\mathbb{Z}$ is the image of at least one element of $A$*. But, I'm not sure if it's injective,…