Function in Mathematics and Asymptotic Analysis - David-Chae/Algorithms_Notes_Solutions GitHub Wiki

Function in Maths

KEY FACTS

  • A function relates an input to an output. Saying "f(4) = 16" is like saying 4 is somehow related to 16. Or 4 → 16
  • a function relates inputs to outputs
  • a function takes elements from a set (the domain) and relates them to elements in a set (the codomain).
  • all the outputs (the actual values related to) are together called the range
  • a function is a special type of relation where:
  • every element in the domain is included, and
  • any input produces only one output (not this or that)
  • an input and its matching output are together called an ordered pair
  • so a function can also be seen as a set of ordered pairs

function, in mathematics, an expression, rule, or law that defines a relationship between one variable (the independent variable) and another variable (the dependent variable). Functions are ubiquitous in mathematics and are essential for formulating physical relationships in the sciences.

"If a variable y is so related to a variable x that whenever a numerical value is assigned to x, there is a rule according to which a unique value of y is determined, then y is said to be a function of the independent variable x."

This relationship is commonly symbolized as y = f(x)—which is said “f of x”—and y and x are related such that for every x, there is a unique value of y. That is, f(x) can not have more than one value for the same x.

To use the language of set theory, a function relates an element x to an element f(x) in another set. The set of values of x is called the domain of the function, and the set of values of f(x) generated by the values in the domain is called the range of the function. In addition to f(x), other abbreviated symbols such as g(x) and P(x) are often used to represent functions of the independent variable x, especially when the nature of the function is unknown or unspecified.

Common functions

Many widely used mathematical formulas are expressions of known functions. For example, the formula for the area of a circle, A = πr2, gives the dependent variable A (the area) as a function of the independent variable r (the radius). Functions involving more than two variables (called multivariable or multivariate functions) also are common in mathematics, as can be seen in the formula for the area of a triangle, A = bh/2, which defines A as a function of both b (base) and h (height). In these examples, physical constraints force the independent variables to be positive numbers. When the independent variables are also allowed to take on negative values—thus, any real number—the functions are known as real-valued functions.

The formula for the area of a circle is an example of a polynomial function. The general form for such functions is

P(x) = a0 + a1x + a2x2+⋯+ anxn,

where the coefficients (a0, a1, a2,…, an) are given, x can be any real number, and all the powers of x are counting numbers (1, 2, 3,…). (When the powers of x can be any real number, the result is known as an algebraic function.) Polynomial functions have been studied since the earliest times because of their versatility—practically any relationship involving real numbers can be closely approximated by a polynomial function. Polynomial functions are characterized by the highest power of the independent variable. Special names are commonly used for such powers from one to five—linear, quadratic, cubic, quartic, and quintic for the highest powers being 1, 2, 3, 4, and 5, respectively.

Polynomial functions may be given geometric representation by means of analytic geometry. The independent variable x is plotted along the x-axis (a horizontal line), and the dependent variable y is plotted along the y-axis (a vertical line). When the graph of a relation between x and y is plotted in the x-y plane, the relation is a function if a vertical line always passes through only one point of the graphed curve; that is, there would be only one point f(x) corresponding to each x, which is the definition of a function. The graph of the function then consists of the points with coordinates (x, y) where y = f(x). For example, the graph of the cubic equation f(x) = x3 − 3x + 2 is shown in the figure.

Names

First, it is useful to give a function a name.

The most common name is "f", but we can have other names like "g" ... or even "marmalade" if we want.

But let's use "f":

f(x) = x^2

We say "f of x equals x squared"

what goes into the function is put inside parentheses () after the name of the function:

So f(x) shows us the function is called "f", and "x" goes in

And we usually see what a function does with the input:

f(x) = x2 shows us that function "f" takes "x" and squares it.

Sometimes There is No Function Name

Sometimes a function has no name, and we see something like:

y = x2

But there is still:

an input (x) a relationship (squaring) and an output (y)

Reference:

https://www.britannica.com/science/function-mathematics https://www.mathsisfun.com/sets/function.html