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

Function of more than 1 variable

If you use the definition of a function as a set of ordered pairs which relate elements from two sets, how would this apply when you have a function of more than one variable, say 2? Would the ordered pairs be of the form $((a,b),c)$?
2
votes
4 answers

Can anyone help me understand the notation of binary operator in the definition

The definition goes, Let $S$ be a non-empty set. Then a function $f : S \times S \to S$ is a binary operator. If I understand correctly, then it means $(a,b) \in S \times S \Rightarrow f(a,b)=a\text{*}b \in S$ then $\text{*}$ is a binary…
William
  • 4,893
2
votes
3 answers

If $f(x)=\lim_{t\to\infty}{\frac{(1+\sin{\pi x})^t-1}{(1+\sin{\pi x})^t+1}}$, then range of $f(x)$ is?

If $$f(x)=\lim_{t\to\infty}{\frac{(1+\sin{\pi x})^t-1}{(1+\sin{\pi x})^t+1}}$$ Then range of $f(x)$ is? My Attempt: I was able to conclude that when, $$\sin{\pi x}\to0^+, f(x)\to1$$ $$\sin{\pi x}\to0^-, f(x)\to-1$$ But the answer is…
prog_SAHIL
  • 2,543
  • 13
  • 27
2
votes
2 answers

Range of a rational function with radicals

Find the range of the function $$\frac{6}{5\sqrt{x^2-10x+29} - 2}$$ I tried using inverses, but the equation got super messy and I dont think its a good method for this problem. $\frac{6}{5\sqrt{x^2-10x+29} - 2} = y$ getting the…
SuperMage1
  • 2,486
2
votes
2 answers

Function For Sine Wave Between Two Exponential Cuves

What function could I use to approximate a curve with this plot? The function ideally will involve sine and have its envelope defined by different exponentials of the form $y = ae^{bx}$ and $y = ce^{dx}$.
Jon
  • 55
2
votes
3 answers

Simplifying a function of $\ln(x)$

I was asked to convert the function $$\frac{1}{x \ln x \sqrt{(\ln x)^2-1}}$$ into a function in the expression $$\frac{1}{x \sqrt{f(x)}}$$ for the domain $x > e$ but I can't seem to find how I can convert it into the answer: $$\frac{1}{x \ln x…
vik1245
  • 893
2
votes
1 answer

Is codomain whatever we make?

For example, if I say $f(x) = \ln \left\{ x \right\}$ where $ \{ \cdot \}$ denotes the fractional part function. Is there any way to know the codomain of this function? And Now if I define $f : \mathbb{R} \to \mathbb{R}$, now the codomain is…
William
  • 4,893
2
votes
2 answers

Meaning of function notation: $f: A \to B$ and purpose of having a codomain (as opposed to a range)

First off $$ f : A \to B$$ What does this notation mean? How do you read this notation? Second off, what is the need of co-domain? What was the point of introducing it when range (subset of co domain) was already enough to tell us about all the…
William
  • 4,893
2
votes
2 answers

Bigger almost-linear zone for tanh(x)

The hyperbolic tangent is almost linear around the origin. I'm looking for a way to modify the tanh function in order to have a bigger almost-linear zone while keeping the asymptote to y = 1. In other words, the function should 'leave' later the y…
Claudio
  • 123
2
votes
0 answers

Finding Composite function equation

Given that $f(x) = 3x -1$ and $g(x)= x(x-1)$ then $g(f^{-1}(x))$? I got $f^{-1}(x): y = \frac{x+1}{3}$; and I put it in $g(x)$ as, $(\frac{x+1}{3})\cdot(\frac{x+1}{3} -1)$ I simplified it as $\frac{(x+1)(x-2)}{9}$ but the answer given is…
MR. Raindrop
  • 141
  • 2
  • 10
2
votes
1 answer

How to define an Artificial Neural Network as a function

I want to define feed-forward ANN as a function in a clean mathematical way and as accurately as possible. I can do something if I fix the number of layers, but I would like to generalize it for any number of layers (possibly without using…
2
votes
3 answers

Function which gradually rises until some point and then quickly "falls"

Could someone point me to any function ${ f(x) }$ which is continuous at some interval ${ x \in [x_0; x_1] }$ and can be represented by formula, so that it rises until some point and then quickly "falls" like on image below? What may cause such…
Edward Ruchevits
  • 565
  • 1
  • 9
  • 17
2
votes
0 answers

Which function family do ROC curves belong to?

ROC curves are monotonically increasing functions $[0, 1] \rightarrow [0, 1]$ which start in (0, 0) and end in (1, 1). They are "over" the diagonal $x$. They look a bit like $1/x$, but moved to the upper left and always above $x$. Is there a…
Martin Thoma
  • 9,821
2
votes
0 answers

The Function Problem

Given a function$f: \mathbb{R} \mapsto \mathbb{R}$ with $f(1)=1$ and for an arbitrary $x \in \mathbb{R}$ satisfies $f(x+5) \geq f(x) + 5$ and $f(x+1) \leq f(x) + 1$. If $g(x) = f(x) - x + 1$, then evaluate the value of $g(2012)$. My…
2
votes
0 answers

Query on Domain/Range

It is given $f_n: \mathbb{(0,\infty)} \to \mathbb{R}$ for any positive integer $n,$ If $f_n(x) =\tan^{-1}\frac{n}{1+x(x+n)} $ I have one query $\mathbb{R}$ is $(-\infty,\infty)$, but the range of $f_n(x)$ will be $(0,\frac{\pi}{2})$ for given domain…