No history yet

Function Fundamentals

What is a Function?

At its core, a function is a rule that establishes a relationship between two sets of values. Think of it like a vending machine: you press a specific button (the input), and it gives you one specific snack (the output). You can't press button C4 and get both chips and a candy bar. For every single input, there is exactly one output. This predictable relationship is the essence of a function.

Function

noun

A mathematical relationship where each element of a set of inputs (the domain) is associated with exactly one element of a set of possible outputs (the codomain). The set of all actual outputs is called the range.

In mathematics, we formalize this by saying a function maps elements from one set, called the domain, to another set, called the codomain. The specific outputs a function produces make up a subset of the codomain known as the range.

Lesson image

Speaking the Language: Function Notation

Instead of writing "y = 2x + 1," we often use function notation: f(x)=2x+1f(x) = 2x + 1. This is read as "f of x equals 2x plus 1." Here, ff is simply the name of the function (we could also use gg, hh, or any other letter), xx is the input, or independent variable, and the entire expression f(x)f(x) represents the output, or dependent variable. The output's value depends on the input you choose.

To evaluate a function, you just replace the input variable with a specific value. For the function f(x)=2x+1f(x) = 2x + 1, let's find the output for an input of 3:

f(3)=2(3)+1=6+1=7f(3) = 2(3) + 1 = 6 + 1 = 7

So, an input of 3 gives an output of 7.

This notation is a powerful shorthand. It neatly packages the name of the rule, the input, and the rule itself into one compact expression. It's a fundamental part of the language of algebra and calculus.

Defining Boundaries: Domain and Range

Every function has its limits. The set of all possible inputs a function can accept is its domain. The set of all possible outputs it can produce is its range. For our vending machine, the domain is the set of all valid button codes (C4, A2, etc.), and the range is the set of all snacks stocked in the machine.

Lesson image

Consider the function f(x)=x2f(x) = x^2. You can square any real number, so its domain is all real numbers, which we can write as (,)(-\infty, \infty). However, the square of any real number is always non-negative. Therefore, the range is all real numbers greater than or equal to zero, written as [0,)[0, \infty).

Some functions have natural restrictions. For g(x)=1xg(x) = \frac{1}{x}, we can't use an input of 0 because division by zero is undefined. So, the domain is all real numbers except 0.

FunctionDomain (x-values)Range (y-values)
f(x)=x+2f(x) = x+2All real numbers (,)(-\infty, \infty)All real numbers (,)(-\infty, \infty)
f(x)=x2f(x) = x^2All real numbers (,)(-\infty, \infty)y0y \ge 0 or [0,)[0, \infty)
f(x)=xf(x) = \sqrt{x}x0x \ge 0 or [0,)[0, \infty)y0y \ge 0 or [0,)[0, \infty)
f(x)=1xf(x) = \frac{1}{x}All real numbers except 0All real numbers except 0

The Vertical Line Test

There's a simple graphical trick to determine if a curve on a graph represents a function: the . The rule is straightforward: if you can draw a vertical line that intersects the graph more than once, then the graph does not represent a function. Why? Because it means one input (x-value) corresponds to more than one output (y-value), which violates the fundamental definition of a function.

A parabola opening up or down, for example, will always pass the vertical line test. No matter where you draw a vertical line, it will only ever cross the parabola once. A circle, on the other hand, will fail miserably. A vertical line drawn through the middle of a circle will intersect it at two distinct points.

Time to test your understanding.

Quiz Questions 1/6

What is the fundamental rule that defines a relationship as a function?

Quiz Questions 2/6

The vertical line test is a graphical method used to determine if a curve is a function.

Understanding these core concepts provides the foundation for exploring the rich and complex world of functions, which are used to model everything from the trajectory of a rocket to the growth of an investment.