4

I've started learning math from zero.

As we know a function consists of three integral parts: input, relationship and output. When we write something like $f(x) = x + 1$, we can clearly see and understand what is what in this notation: f is a name of function, x is its argument and so on.

Misunderstandings begin when other letters are used instead of the letter f or when it's combined with other letters, like:

  1. $y(x) = x^2$
  2. $y = f(x)$

So here I cannot understand and identify the positions of those three parts of a function.

And now the questions:

  • Is the letter f or any other letter that comes before the brackets a variable or just a function name?

For example, when we write $y = f(x)$ is this "$f$" a variable into which the result of the function is substituted (i.e. its output), and then assigned to the variable $y$? If not, what about $y(x) = x^2$? Is y here just the function name too?

  • In short, by what rule can I quickly determine in a function what is an input, an output, and a relationship? Because at first glance, it seems to me that there is no single way to represent a function as a formula

For example, in each programming language there is a single template by which a function is defined - you must specify in a certain sequence the return type, parameters, and then a processing algorithm

2 Answers2

1

The notation $y=f(x)$ means:

  1. The input (the argument of function $f$) is $x$
  2. The output (the value of function $f$) is $y$
  3. The function (rule, relationship, map) is $f$

$y=f(x)$ is general notation and if we want to specify a concrete function we can write $y=x^2$ or $y=\sin(x)$. So, in these cases we have $f(x)=x^2$ or $f(x)=\sin(x)$ accordingly.

But sometimes the output variable and function names are the same: $y=y(x)$ (this is quite often the case in differential and integral calculus since it has its benefits there).

Keep in mind that strictly speaking the notation $f(x)$ is not a function, it's the value of a function $f$ at the point $x$. So, the correct way to refer to a function is to refer to its name. For, example, if we have a relationship $y=\sin(x)$ then we have function $\sin$, not $\sin(x)$. But in practice it's hard to keep this strict reference everywhere. For example, if $y=x^2+3$ then we don't have a name for this function yet (I mean a name that uniquely defines this function). We would need to give one first, like $f(x)=x^2+3$, and then refer to the function $f$.

For this reason most people refer to a function by it's expression too, so $f(x)$ is a function (the same function as $f$). So, non strictly speaking, $x^2+3$ and $\sin(x)$ are functions.

The case of several variables.

In case of $y = f(x_1,x_2,x_3)$ the input is vector $x=(x_1,x_2,x_3)$.

This case is also the case $y = f(x)$. Well, technically it becomes $y = f((x_1,x_2,x_3))$, but one pair of brackets are usually omitted (for example, in functional analysis, multivariate statistics, etc.).

  • Thus, it turns out that this "entity", consisting of the letter f (or any other) and brackets, depending on the context, can mean:
    1. A variable into which we can define a specific function?

    like, I write firstly y = myFunction(x) and then define this variable writing myFunction(x) = 100x

    1. Output:

    I defined the function above and now myFunction(100) it's an output?

    1. And occasionally the name of the function?

    myFunction(x), or more precisely myFunction

    Did I understand you?

    – Shafee Silent Apr 26 '22 at 11:27
  • Yes, 2) and 3) are correct, but 1) needs a better wording. If $y=f(x)$ then the input is $x$ and it's independent variable (the function $f$ doesn't really matter, it can be any). You don't define variable $x$ by $f(x) = 100x$ (this is the definition of function $f$, not variable $x$). Some sort of definition of variable $x$ comes by specifying the type of that variable (like integer or real). In mathematics it means defining a domain $A$ of a function $f$, so that the value $f(x)$ is defined for any $x\in A$. – Robertas Vilkas Apr 26 '22 at 16:46
  • For example, you can't include zero into set $A$ if your function is $f(x)=\frac{1}{x}$, that also means $A$ can't be all integers or all reals in this case since it may involve division by zero (the value $f(0)=\frac{1}{0}$ is undefined). – Robertas Vilkas Apr 26 '22 at 16:55
  • Thank you very much, Robertas.

    And one more thing. Sorry for my perfectionism. I'm from programming. I want to know this detail. Let's suppose we've defined a function. We have customFunc(x) = 100x . This its right side is its output, correct? And when we then write y = customFunc(100), it turns out indeed that y isn't the function output but a dependent variable of the function output. So we have to deal with two entities - with the f. o. and the variable taking a value of the func?

    – Shafee Silent Apr 27 '22 at 11:12
  • Well, the variable $y$ isn't necessary for defining (and using) function $f(x)$, but the notation $y=f(x)$ can be useful. For example, it helps to see $x$ and $y$ axis in our minds (you could name $y$ axis by $f(x)$ or $f$, but in case of several functions on the same graph it will become a problem, that's why $y$ helps: you can plot $y=f_1(x)$ and $y=f_2(x)$ on the same graph). By the way, you should mark an answer as answered (Paul's or mine) and upvote answers (this is a way to thank in these forums). – Robertas Vilkas Apr 27 '22 at 13:31
  • Speaking of output, if you have function $customFunc(x) = 100x$ then $100x$ is the output if $x$ is a symbolic variable ($x$ can be even undefined). But $customFunc(x)$ is also an output (the same $100x$). Similarly $customFunc(0)$ and $100\cdot 0$ are outputs too. But in programming $customFunc(x)$ and $100x$ are slightly different since $customFunc(x)$ ivokes function first and then returns the outcome (similarly $customFunc(0)$ and $0$ are slightly different too). – Robertas Vilkas Apr 27 '22 at 13:31
0

TL;DR: "$f$" is the function itself. "$f(x)$" is the value the function takes on for the particular input value "$x$". In "$y(x)$", $y$ is the dependent variable, and $y(x)$ is the value of that dependent variable for the input value $x$. In this case the function itself has no label.

There are actually two concepts of "function" at play here:

Originally, "variables" are letters we use to represent various measurements. Very commonly "$x$" and "$y$" are used to represent the $x$-coordinate and $y$-coordinate of a point in the plane. They are "variables" because there are many points on the plane, and their values could be used to represent the coordinates for any point, so they "vary" over the points. But we may want to limit ourselves to just the points on some curve, such as the circle of radius $1$ with the origin as center. This forces a relationship between the values of $x$ and $y$. This relationship can be expressed algebraically by the equation $$x^2 + y^2 = 1$$ Equivalently, we can solve this equation for one variable in terms of the other: $$y = \sqrt{1 - x^2}\ \text{ or }\ y = -\sqrt{1 - x^2}$$ In this form, we consider $x$ to be the "independent variable" and $y$ to be the "dependent variable", as we can choose a value freely for $x$ (almost - we need $-1 \le x \le 1$) and find the corresponding values of $y$. But because there are two such values, $y$ is not completely dependent on $x$. For each $x$, we have to make a choice between the two possible options for the value of $y$.

If we restrict our attention to just the upper half of the circle, $y = \sqrt{1 - x^2}$, this indeterminancy goes away. The value of $x$ now completely determines the value of $y$. This is the original meaning of "function": a relationship between two variables, where the value of the independent variable completely determines the value of the dependent variable.

But this concept of a function is not fully rigorous. So when the need for rigorous foundations for mathematics were recognized, it was necessary to replace it with something well-conceived. In this version, a function is a triple $(f, A, B)$ where $A, B$ are two sets, and $f \subset A\times B$, the set of ordered pairs $(a,b)$ with $a \in A, b \in B$. The set $f$ must meet two requirements:

  • For every $a \in A$, there must be some $b \in B$ such that $(a,b) \in f$.
  • If $(a,b) \in f$ and $(a, c) \in f$, then $b = c$. I.e., for each $a$, the corresponding value of $b$ is unique.

For each $a \in A$, we then define the notation "$f(a)$" to be the unique value of $b$ such that $(a,b) \in f$. And somewhat ambiguously, we also refer to the entire triple $(f, A, B)$ as just "$f$" leaving the domain $A$ and codomain $B$ implicit. But when we want to do it right, we denote the full function by $f: A \to B$, or $A \overset f\to B$.


What you are asking about comes out of these two concepts interacting. In $$y = f(x)$$ there are actually three variables:

  • $x$ is the independent variable, roaming over the domain of the function (probably some subset of the real numbers $\Bbb R$, but possibly the complex numbers $\Bbb C$ or some other set $A$).
  • $y$ is the dependent variable, roaming over the codomain of the function $B$ (likely also either $\Bbb R$ or $\Bbb C$).
  • $f$ is also a variable, but it roams over all possible functions that could be under discussion in the context.

In $y(x) = x^2$, there is no label on the function. For any value $a$ in the domain, $y(a)$ refers to the value of $y$ when $x = a$. "$y(x)$" is used when defining the the relationship by means of some formula in $x$. If we are talking about multiple functions between $x$ and $y$, then we would want labels for each of them. But often when only one function is under discussion, a separate label for it isn't needed.

Paul Sinclair
  • 43,643
  • So, by writing a function name and brackets we define a variable and then we'll be able to put our custom function? – Shafee Silent Apr 26 '22 at 11:35
  • And also sorry for my perfectionism. I'm from programming. I want to know this detail.

    Let's suppose we've defined a function. We have customFunc(x) = 100x . This its right side is its output, correct? And when we then write y = customFunc(100), it turns out indeed that y isn't the function output but a dependent variable of the function output. So we have to deal with two entities - with the f. o. and the variable taking a value of the func?

    – Shafee Silent Apr 26 '22 at 11:39