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

How to find the range of this function?

I need to find the range of the function $g:(0,1)\times (0,1) \to \mathbb{R}^2$ given by \begin{align} g_1(x,y)&= \frac{x}{x+y}\\ g_2(x,y)&= x+y \end{align} I can see that it is $g((0,1)\times (0,1))=(0,1)\times (0,2)$ but what I need is a formal…
user70645
  • 119
  • 4
1
vote
2 answers

Are the solutions to the equation $f(n \cdot x)=x$ always expressible in closed form?

Are the solutions to the equation: $$f(n \cdot x)=x$$ always expressible in closed form? $$n=1,2,3,4,5,...$$
Mats Granvik
  • 7,396
1
vote
1 answer

Function to make values close to zero, zero leaving others as is

I have a 2D vector $v$, where each component is in the range -1 to +1. I'd like a function $f(v, x)$, where x is a real number, and the result is a vector, such that each $component$ of the result is zero if abs($component$) < $x$ where $abs(x) <…
1
vote
1 answer

How do I prove inequalities and one-to-one function?

Can anyone please help me with these questions? 1.Given x + 1 < 0 Prove that: i) $2x - 1 < 0 $ ii) ${2x-1\over x+1} > 2$ 2.For $g(x) = {kx + 8\over 4x - 5}$ i) Find k if gg(x) = x Is it fine if I just let any value of x for this question? ii) Find…
1
vote
0 answers

"Scoring" sets of numbers by how spread out they are

I want to evaluate sets of numbers by scoring how "spread out" they are compared to other sets in a collection. So let's say we have $\mathcal{X} = \{X_i\}$ a collection of sets of numbers. I want a scoring rule that measures how spread out the…
Seamus
  • 4,005
1
vote
1 answer

Dimension reduction in the Lotka-Volterra model

I'm not sure if I can post this here, but check this out. This is some text from Boccara's Modeling Complex Systems. The thing which confuses me is that there is a dimension reduction from 4 parameters to just 1 (as stated in the text). This dazzles…
onimoni
  • 6,376
1
vote
1 answer

is $x = \frac 1y $ a function or a relationship?

A teacher says $x = \frac 1y $ is indeed a function, because it's the same as $y = \frac 1x$ But I don't think so, because no restrictions for $x$ , so $x$ could be zero but there is no solution for zero, so there's an $x$ that has no $y$ My dear…
1
vote
2 answers

finding the inverse of function. the domain is given and the question requires to find the inverse.

Find the inverse of the function. $$f(x)=x^2 + 4x$$ Domain: $x \geq -2$ I have done: $X = y^2 + 4y$ $X - 4y = y^2$ $\sqrt{X - 4y} = y$ My answer: $f^{-1}(x) = \sqrt{X - 4x} $ Real answer: $f^{-1}(x) = -2 \pm \sqrt{x + 4}$
1
vote
2 answers

Say I have a function $f(x) = x^2$. Can this be a surjective function?

If I'm getting the unto and 1-1 concepts right, $f(x) = x^2$ is always 1-1 as $x$ always maps distinct objects in codomain ($x^2$). But it's not a surjective function since you can't get all $x$ in codomain. But if I restrict my domain $x$ to be in…
muros
  • 417
1
vote
2 answers

Opposite function definition

How to define an opposite of a function. If for example I have the function F(x) = y how can use it to define the function f(y) = x
Ilya Gazman
  • 1,440
1
vote
1 answer

If $f(3x-1)=9x^2+6x-7$, determine $f(x)$

if $f(3x-1)=9x^2+6x-7$ determine all the $f(x)$ functions. I tried in this way : $t=3x-1 \Rightarrow x=(t+1)/3$ $f(t)=9(t+1)^2/9-6((t+1)/3)-7((t+1)/3)\ldots$ but unfortunately I get the original function. Thanks in advance.
1
vote
2 answers

Which are tangents

We are asked to see which are tangents and which aren't. I think B3, bottom left and bottom middle are not tangents
Maximiliano
  • 1,121
1
vote
3 answers

Range of a complicated function

Is there any way to figure out the range of values of the function $$y=\frac{2}{x}\cdot \sin(x)?$$ The domain is so easy to know. It's all real numbers except $0$. However the challenging part is to figure out what is the range. Any ideas? I know…
M.Samuel
  • 215
1
vote
1 answer

What type of function is this?

I was attempting to factor the following expression when I realized I didn't even know what type of function the expression is. Does anyone know? $x^4-9x^x+12x-4$.
1
vote
2 answers

Is there an elementary continuous function which is positive only if all arguments are?

I am looking for a continuous function $f:\mathbb R^n \to \mathbb R$ such that $f(x_1, x_2, \ldots , x_n) > 0$ if and only if $x_i > 0 \ \forall i = 1,2, \ldots , n$. Can anyone suggest a good one?
Daron
  • 10,300