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

How do I make a primitive recursive function that does division?

I am trying to define a primitive recursive function that does division. I looked at this answer but it seems wrong to me, because according to Wikipedia: The primitive recursive functions are among the number-theoretic functions, which are…
Hakaishin
  • 141
4
votes
1 answer

The number of linear functions from $\left\{0, 1\right\}^{n}$ to $\left\{0, 1\right\}$

I know it is a duplicate of this question.But still, i am posting this because I am completely stuck.I think i have not understand the question itself. I am posting my attempt.Please guide me to move further. Question For $x, y\in \left\{0,…
laura
  • 2,530
4
votes
5 answers

What operations can be performed on three variables $x$, $y$, and $z$ and produce one unique sum?

I'm having a programming problem, but I feel this would be more relevant here. I have three unique variables, $x$, $y$, and $z$. What operations can I perform on these variables to produce a unique value? Are there any approaches I could…
bren
  • 171
4
votes
3 answers

How to prove that if a continuous function satisfies $f(a b)=f(a) + f(b)$, this function must be a log function?

How to prove that if a continuous function satisfies $f(ab)=f(a)+f(b)$ and both $a$ and $b$ are positive real numbers, this function must be a log function? i.e., proof of uniqueness. Thanks
gjbyu
  • 49
4
votes
1 answer

Is there a name for $\frac{1}{\frac{1}{x} + \frac{1}{y}}$?

The function $$\frac{1}{\;\;\dfrac{1}{x} + \dfrac1{y}\;\;}$$ shows up a lot, e.g., in parallel resistance or series conductance. Does it have a name? It is similar to harmonic mean with the difference that the numerator is one rather than the…
Neil G
  • 2,479
4
votes
2 answers

Why does a function and its inverse always intersect on the line y=x

I've been working through a textbook and noticed that if a function intersects with its inverse function it's always on the line y = x. Why is this?
4
votes
1 answer

Does cube root have domain $(-\infty ,+\infty )$ or not?

I have an exercise for home to find the domain of : $$f(x)= {\sqrt[5]{(1/3)^x - (1/9)}\over \sqrt[3]{e^x - 1}} $$ The solution given by our teachers (and the book itself) is $(0,2]$. My problem is that the cube root and the 5th root can have…
4
votes
2 answers

Convert Bark to Hertz (Hz)

I have to convert a value from bark to Hertz. I found the following formula to convert from Hz to bark: $$\operatorname{Bark}(f)=13 \arctan(0.00076 f)+3.5 \arctan \left( \left( \frac{f}{7500} \right)^2 \right),$$ where $f$ is the frequency in…
Jan
  • 153
4
votes
2 answers

How can I prove or disprove that there exists a function such that...

Suppose we have a function $f$ of $bx-ay$ where $a$ and $b$ are two real constants, if we have for example $e^{bx-ay}$ then obviously it is a function of $bx-ay$. Can we find a function $f$ such that: $f(bx-ay) = ax-by$? in other words what…
4
votes
1 answer

if the equation $(x-2)e^x+a(x-1)^2=0$ have two real roots,Prove $a>0$

if the equation $$(x-2)e^x+a(x-1)^2=0,x\in R$$ have two real roots. show that $$a>0$$ Following is a solution since $$-a=\dfrac{(x-2)e^x}{(x-1)^2}$$ Let $$g(x)=\dfrac{(x-2)e^x}{(x-1)^2}\Longrightarrow g'(x)=\dfrac{e^x(x^2-4x+5)}{(x-1)^3}$$ so we…
math110
  • 93,304
4
votes
4 answers

How are domain and co-domain of a function useful?

I'm at university and I learned linear algebra, set theory, logic, and other kind of mathematics that use functions a lot. Now, I know that function is very important and useful in mathematics but I never asked why we need to define the domain and…
LiziPizi
  • 2,855
4
votes
4 answers

Determine whether the function $f(x) = \cos x$ from $\mathbb{R}$ to $\mathbb{R}$ is surjective?

I am working on this question first I want to understand the question itself, what was the question asking me? For me, I think $\mathbb{R}$ to $\mathbb{R}$ are real numbers and if $\mathbb{R}$ to $\mathbb{R}$ is defined as $f(x)= \cos x$, then I…
Surdz
  • 627
4
votes
2 answers
4
votes
4 answers

Why is the domain of these two functions different?

I tried graphing the functions $y = x^{.42}$ and $y = (x^{42})^{\frac{1}{100}}$. From my understanding of the laws of exponentiation these two expressions should be equivalent. What I found out after graphing these two functions was that they were…
user262291
  • 1,459
4
votes
2 answers

bijective function from [a,b] to [c,d]

Im trying to think about bijective function from the closed interval [a,b] to the closed interval [c,d]. When $a,b,c,d \in \mathbb{R}$ and $a < b,\;c < d$. Is there such a function?
NM2
  • 721