No history yet

Functions and Graphs

What is a Function?

Think of a function as a simple machine. You put something in (an input), and it gives you something back (an output). The rule is that for every one input, you get exactly one output. It's a consistent, predictable relationship.

Function

noun

A mathematical rule that assigns to each input value exactly one output value.

We usually write functions using a special notation. If we have a function named ff, we write f(x)f(x) to represent the output when the input is xx. You can read f(x)f(x) as "f of x."

For example, a function that doubles the input can be written as:

f(x)=2xf(x) = 2x

If you plug in 3, you get f(3)=2(3)=6f(3) = 2(3) = 6. The input is 3, the output is 6.

Domain and Range

Every function has two important sets of values associated with it: its domain and its range.

The domain is the complete set of all possible inputs a function can accept. The range is the complete set of all possible outputs it can produce.

Lesson image

Consider our doubling function, f(x)=2xf(x) = 2x. If we can plug in any real number, its domain is all real numbers. Since doubling any real number results in another real number, its range is also all real numbers.

But sometimes domains are restricted. For the function g(x)=xg(x) = \sqrt{x}, we can't take the square root of a negative number (and get a real result). So, its domain is all non-negative numbers, x0x \ge 0. The outputs are also never negative, so its range is also all non-negative numbers, g(x)0g(x) \ge 0.

A Tour of Common Functions

Different types of functions have distinct formulas and create unique shapes when graphed. Let's look at some of the most common ones.

Linear Functions A linear function has the form f(x)=mx+bf(x) = mx + b. Its graph is always a straight line. The value mm is the slope (how steep the line is), and bb is the y-intercept (where the line crosses the vertical y-axis).

Quadratic Functions These have the form f(x)=ax2+bx+cf(x) = ax^2 + bx + c. Their graphs are U-shaped curves called parabolas. If aa is positive, the parabola opens upwards. If aa is negative, it opens downwards.

Polynomial Functions Linear and quadratic functions are types of polynomial functions. The general form is f(x)=anxn+an1xn1+...+a1x+a0f(x) = a_n x^n + a_{n-1} x^{n-1} + ... + a_1 x + a_0. Their graphs are smooth, continuous curves that can have various twists and turns.

Rational Functions A rational function is a fraction of two polynomials, like f(x)=P(x)Q(x)f(x) = \frac{P(x)}{Q(x)}. Their graphs can have breaks called asymptotes, which are lines the graph approaches but never touches. These occur where the denominator is zero.

Exponential and Logarithmic Functions Exponential functions, like f(x)=2xf(x) = 2^x, model rapid growth or decay. Logarithmic functions, like g(x)=log2(x)g(x) = \log_2(x), are their inverses. They grow very slowly.

Lesson image

Transforming Graphs

Once you know the basic shape of a function's graph, you can move it around without replotting every point. These movements are called transformations.

TransformationHow to Write ItEffect on Graph
Vertical Shiftf(x)+cf(x) + cMoves up by cc units
Vertical Shiftf(x)cf(x) - cMoves down by cc units
Horizontal Shiftf(xc)f(x - c)Moves right by cc units
Horizontal Shiftf(x+c)f(x + c)Moves left by cc units
Vertical Stretchcf(x)c \cdot f(x), for c>1c > 1Stretches vertically
Vertical Compressioncf(x)c \cdot f(x), for 0<c<10 < c < 1Compresses vertically
Reflectionf(x)-f(x)Flips over the x-axis
Reflectionf(x)f(-x)Flips over the y-axis

For example, if we know the graph of f(x)=x2f(x) = x^2 is a parabola centered at the origin (0,0)(0,0), then the graph of g(x)=(x3)2+5g(x) = (x-3)^2 + 5 is the exact same parabola, just shifted 3 units to the right and 5 units up.

Quiz Questions 1/6

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

Quiz Questions 2/6

What is the domain of the function f(x)=x5f(x) = \sqrt{x-5}?