Functions


Equation of two variables, say x and y, that is or can be put into the form y = expression_of_x, i.e. solved for y.
The expression_of_x is the definition of the function.
A function has a name, most often the generic ƒ or g or h or a word like height, profit, cost etc.
A function is a function of some variable, most often the generic x or t or whatever.
   ƒ(x) means the function named ƒ of the variable x. x is the argument or input of this function.
   h(t) means the function named h of the variable t. t is the argument or input of this function. The definition expression is of t.

Some functions:
Ex.    ƒ(x) = 7x2+3x+4
Ex.    ƒ(x) = 3x+4
Ex.    ƒ(x) = ∛(x2+3x+2)
Ex.    h(t) = -4.9t2+20t
Exs. ƒ(x)=x2   ƒ(x)=x3   ƒ(x)=√x   ƒ(x)=∛x   ƒ(x)=|x|   ƒ(x)=1/x   ƒ(x)=x   ƒ(x)=2   ƒ(x)=2x  
The "=" here doesn't really mean an equation but is used to denote the definition of the function. Perhaps a : or a := would be better?
y is essentially the same as ƒ(x) so y = ƒ(x)

Using ƒ(x) = 3x+4, evaluating the function for a particular value for x: ƒ(0) = 4, ƒ(1) = 7, ƒ(-3) = -5, etc.
The value or output of the function (the "function value") is the result of the evaluation.
For a given function and a given input x value, the function value is always one number and always the same.

Function as a machine: input to it is the x value, it evaluates the expression using the inputted number, then outputs the result, i.e. the y. Each function is a different machine.

A function is "deterministic": for a particular input value of x, the output/result is one particular y value.
A function is an algorithm ( a step-by-step [PEMDAS] procedure that transforms its input into an output).
x is the independent variable, free to be any number in the function's domain, and y is the dependent variable, completely determined by x.

Why functions? The world is very "functional".
Exs. At any one x time you / company / economy is worth a y dollars. and you are at one y location, moving at one y speed, weighing a y pounds, thinking some y thought, gonna buy y whatevers, etc.

The graph of a function shows the points (x,f(x)) for each x value in the domain of the function its corresponding y value.
Same as the solution set of the equivalent y= equation.
(x,y)    (x,f(x))    (input,output)    (argument,function_value)

A function's graph passes the vertical line test: no vertical line crosses the graph more than once because a function assigns/pairs/maps/associates each x value with only one y value, i.e. each x number results in just one y value.
A function's graph always goes to the right "forwards", it never "reverses" or backtracks to the left, never loops, and is never vertical.
Usually can look at a curve and know whether it's the graph of a function or not.

A more general definition of function as a mapping, association, pairing, correspondance between two sets. Each member of domain set pairs with exactly one member of range set.

There are many other possible functions between these two sets:
f(x)={(a,1),(b,2),(c,3),(d,3),(e,3)}
f(x)={(a,3),(b,1),(c,2),(d,3),(e,2)}
f(x)={(a,1),(b,1),(c,1),(d,1),(e,1)}
...
Number of functions: |range||domain|
Ex. domain is students, range is table sitting at.
Ex. domain is students, range is number of credits completed.
Ex. domain is POVs, range is license plate.
Ex. domain is states, range is number of representatives in Congress.

Function features form

A function's domain might be only a subset of R. i.e. not every x value is in the domain.
   e.g. numbers that make a denominator zero, or a square root radicand negative.
   e.g. in an application, maybe negative numbers have no meaning and thus are not in the domain.
   e.g. in an application, maybe numbers after a particular number have no meaning and thus are not in the domain.
   e.g. in an application, maybe only integers or whole numbers are meaningful.
A function's range can be from a single number to all of R. i.e. not every y value is in the range.
   maybe the range is all positive numbers, or all non-negative numbers.
A function can be positive on an interval, negative on an interval, or 0 on an interval.
A function can be increasing on an interval, decreasing on an interval, or flat on an interval.
A function has one y-intercept if 0 is in its domain. Else no y-intercept.
A function can have any number (0 to ∞) of x-intercepts.
A function might have local or global/absolute extrema (mins or maxes).
A function might have turning points, where it's changing from increasing to decreasing or vice versa.
A function might have a symmetry: across the y-axis (even function) or about the origin (odd function).
   f(-x) flips over Y-axis.
   -f(x) flips over X-axis.
   -f(-x) flips over both X-axis and Y-axis; equivalent to 180° rotation about origin.
   If f(x)=f(-x), then f is Even (symmetric across the Y-axis). Also: -f(x)=-f(-x)
   If f(-x)=-f(x), then f is Odd (symmetric about the Origin). Also: f(x)=-f(-x)

A function might have: vertical, horizontal, oblique asymptotes.
A function is either continuous or has discontinuities (holes, vertical asymptotes, jumps).

A function could be periodic (especially the trigonometric functions [sin(x)]).
Most functions have a derivative (function) and an integral (function). [Main topics of calculus]
A function is either "smooth" everywhere or has "sharp corners" (cusps or kinks[|x|]) or vertical tangents at a point [∛x], making it non-differentiable at those points.
A function might have concavity on an interval and might have changes of concavity (inflection points).
A function might have fixed points, numbers c such that f(c)=c, i.e. the number maps to itself (and intersects the y=x line).

Classes/groups/categories/families of functions:

Algebraic functions: polynomials +-*/^√
Transcendental functions: beyond algebraic functions, e.g. exponential, log, trig


Piecewise-defined functions.
Different expressions on different intervals.

   Ex. f(x)= { -1   x<0,    0   x=0,   1   x>0 }
   Ex. f(x)= { 8   0≤x≤6,    2x-4   x>6 }


Functions of two or more variables.
2 variables, say x and y: f(x,y) = expression_in_x_and_y
Result/output could be z, so f(x,y) = z
A function of two variables' solution set is triples (x,y,z) that graph in 3D, etc.
Ex.    BMI is a function of weight and height, in metric: bmi(w,h) = w/h2
Ex.    Area of a triangle is a function of base b and height h: A(b,h) = ½bh
Ex.    Future value is a function of a principle P of money, with interest rate r, compoundings per year n, and time t in years:
   FV(P,r,n,t) = P(1+r/n)nt    A function of 4 variables.


The number of functions from a finite set of size m to a finite set of size n is nm.
The number of one-to-one functions (i.e. injections) from a set of size m to a set of size n with m≤n is P(n,m)= n!/(n-m)!
The number of onto functions (i.e. surjections) from a set of size m to a set of size n with m≥n is P(n,m)= n!S(m,n) (Stirling numbers of the second kind. complicated).
The number of one-to-one and onto functions (i.e. bijections) from a set of size m to a set of size n with m=n is m! (=n!).
If the two sets are the same size, n, there are nn functions between them. And every injection is a surjection and vice versa and is a bijection; the number of each is n!. [S(n,n)=1]