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

Intersection of Three Periodic Lines

This question is related to my earlier question, but on rethinking the problem I have come up with another solution that would be also acceptable. I have three broken lines. Each has a constant gap of length $a$, a constant fill of length $b$…
geometrian
  • 3,036
2
votes
1 answer

Is 4.99999......... exactly equal to 5?

I'm a student of 10th std. Recently our teacher asked a Question that "Is 4.999...equal to 5 or not?" Everyone said that is isn't equal or it is approximately equal. Teacher too agreed to that. But I did't agree. I opposed the teacher as I think it…
2
votes
2 answers

Is this a function?

Is the set $\theta=\{\big((x,y),(3y,2x,x+y)\big):x,y ∈ \mathbb{R}\}$ a function? If so, what is its domain, codomain, and range? This is probably a dumb question. I understand what a function is, but the three elements in the ordered pair got me…
laser295
  • 253
2
votes
5 answers

Find the range of the function $y = \sqrt{x^2 + 1}− x$?

I have a function $y = \sqrt{x^2 + 1} − x$, where the Domain is $(−\infty,+\infty)$. Explanation for the domain I need to make sure the domain of the function does not include values of $x$ that will make the square root negative. This means that I…
Gianni
  • 219
2
votes
0 answers

Function that maps 'maximum metric-based' distance function to 'euclidean metric-based' distance function

Let's define a 2-vector: $$ v \in \mathbb{R}^2,\ \ \ v=[v_x,v_y] $$ We then have a 'maximum metric-based' 'distance + rotation' function $d_{max}(v)=[|v_x|+|v_y|,v_{\theta}]$ and a 'distance + rotation' function for the euclidean metric…
2
votes
0 answers

Modular Algebra

I am devising an algorithm to solve equations like the following: $$10^{\lfloor\log(p1)\rfloor}x+p_1\equiv0\pmod{p_2}$$ In the scenario: $10^{1}x+5\equiv0\pmod{7}$, where $p_1=5$ and $p_2=7$, Wolfram Alpha prints out that the integer solution is…
Riddler
  • 21
2
votes
2 answers

Functions : $ f(x) = {2x-1\over x^2} $

We have : $$ f(x) = {2x-1\over x^2} $$ 1- Determine $ D_f $ and solve the equation $ f(x) = 1 $ 2- Show that for every $ x $ from $\mathbb{R}^*_+ $ ; $f(x) \le 1 $ The first exercise is already done and here are my solutions : $$ D_f =…
2
votes
1 answer

Let $f(x) = ax + b$ and $g(x) = cx + d$, where $a, b, c, d$ are constants. Determine for which constants $a, b, c, d$ it is true that $f ◦ g = g ◦$

I'm working on this question and this what I did I get $f•g(x) = f(cx+d)=a(cx+d) + b = acx +ad + b $ $g•f(x) = g(ax+b) = c(ax+b) + d = acx + cb + d $ So how to I get $f•g = g•f$?
Surdz
  • 627
2
votes
1 answer

If $f$ is an even function defined on the interval $(-5,5)$ then four real values of $x$ satisfying the equation $f(x)=f(\frac{x+1}{x+2})$ are?

If $f$ is an even function defined on the interval $(-5,5)$ then four real values of $x$ satisfying the equation $f(x)=f(\frac{x+1}{x+2})$ are? I thought that $(x+1)/(x+2)=-x$.But I'm getting only two values by solving this.How do I get the other…
user220382
2
votes
4 answers

Find $g(x)$ given $f(x)$ and the composition $(g \circ f)(x)$

I've been stuck on this final math problem for ages I'm given $$f(x) = x^2 + 1$$ and the final composition is $$(g \circ f)(x) = \frac{1}{x^2 + 4}.$$ I'm asked to find that $g(x)$ was in order to make this true, but I'm not sure how?
Saad Siddiqui
  • 111
  • 1
  • 1
  • 8
2
votes
2 answers

How to evaluate $f(x^2 - 3)$ given $f(x^2 + 1)$?

Problem: If $f(x^2 + 1) = x^4 + 5x^2 - 9$, then $f(x^2 - 3) = kx^4 + wx^2 + p$ where $k$, $w$, and $p$ are integers. Find the value of $(k + w + p)$. I'm fine with doing problems where the argument is some expression and we have the original…
Cole
  • 67
2
votes
0 answers

Additive Functions Puzzle

Puzzle: Given a function 'solve()' that accepts a single integer parameter, and returns an integer, write a program that determines if this function is an additive function [ solve($x+y$) = solve($x$) + solve($y$) ] for prime numbers below…
Rangesh
  • 121
2
votes
4 answers

Why do we take the domain of $f(x)/g(x)$ as $\mathbb{R} - \{0\}$ rather than $\mathbb{R}$ when $f(x) = x$ and $g(x) = 1/x$?

Let $f(x)=x$ and $g(x)=\frac{1}{x}$, Domain$(f)=\mathbb{R}$ and Domain$(g)= \mathbb{R}-\{0\}$. We have to find the domain of $\frac{f(x)}{g(x)}$. When we solve this expression, as the $x$ of $g(x)$ would go to the numerator, we would get the final…
user456
  • 709
2
votes
5 answers

Domain and Range Confusion

Find the domain of the inverse of the following function:$$f(x) = kx^\frac{1}{2}$$ The inverse, using some basic algebraic rearranging, can be said to be: $$f^{-1}(x) = \frac{k^2}{x^2}$$ As evident, the domain of this function seems to be all real…
2
votes
3 answers

Is a horizontal line an increasing or decreasing function?

This is the definition of an increasing and decreasing function. "A function $f(x)$ increases on an interval I if $f(b)≥f(a)\;\;\forall b>a$, where $a,b \in I$. If $f(b)>f(a) \;\;\forall \;\;b>a$, the function is said to be strictly…
Jonathan
  • 514