Definition. A relation f⊆A×B is a function f:A→B if (i) every a∈A has some image b∈B with (a,b)∈f, and (ii) that image is unique: (a,b),(a,c)∈f⇒b=c. Then f(a)=b; b is the image of a, a is a pre-image of b. The range {b:(a,b)∈f for some a} is always ⊆ co-domain B. Only the domain side is required to be fully, uniquely covered -- how many pre-images a co-domain point has, or whether it has any, are separate questions (injectivity/surjectivity below).
Representing a function: tabularly (a list of argument/value pairs), graphically (plot with the Vertical Line Test: a curve is a function's graph iff every vertical line meets it at exactly one point), or analytically (a formula, whose natural domain is wherever that formula is actually defined -- found by excluding zero denominators, requiring even-root radicands ≥0, etc., often via a sign-chart over intervals cut out by the critical points). Functions may also be piecewise (different formula on different sub-intervals).
Named elementary functions: identity (f(x)=x), constant (and the zero function as its special case), modulus ∣x∣, signum x/∣x∣ (with 0↦0), floor ⌊x⌋ (always rounds down, even for negatives) and ceiling ⌈x⌉ (always rounds up) -- the last two are "step functions".
One-to-one, onto, bijective. f is one-to-one (injective) if f(x)=f(y)⇒x=y; onto (surjective) if every b∈B has at least one pre-image (range = co-domain); bijective if both. A non-onto function is called into. Only the domain/rule affects injectivity; the stated co-domain can flip ontoness even with the same rule. For finite A,B with n(A)=m, n(B)=n: one-to-one needs m≤n; onto needs m≥n; a bijection exists iff m=n -- and when m=n, one-to-one ⟺ onto automatically, making "injective-not-surjective" or "surjective-not-injective" impossible between equal-sized finite sets. The Horizontal Line Test is the graphical mirror: one-to-one iff every horizontal line through a range value meets the curve exactly once; onto (its stated co-domain) iff every horizontal line through a co-domain value meets it at least once.
Algebra of (real-valued) functions. For f,g on a common domain: (f+g)(x)=f(x)+g(x), similarly f−g, fg, f/g (g=0), cf, −f -- these satisfy associativity, commutativity of +, a zero-function identity, and distributivity f(g+h)=fg+fh.
Special function families: polynomial, linear (ax+b), exponential (ax), logarithmic (logax, the inverse of exponential), rational (p(x)/q(x)), reciprocal (1/f(x)). Odd (f(−x)=−f(x)) vs. even (f(−x)=f(x)): sum of odds is odd, sum of evens is even, product of two odds or two evens is even, product of an odd and an even is odd, and the zero function is the only function both odd and even -- "not odd" does not imply "even".