Learn

Functions and Rational Functions

Contents

A function is a rule that takes an input and gives back exactly one output. That definition decides which inputs are allowed, when a rule can be run backwards, and why some graphs have gaps.

What does f(x) mean?

f(x) is the output of the rule f when the input is x. It is not f multiplied by x. To find f(4), put 4 in place of every x in the rule.

f(4) does not mean f times 4. It means put 4 in where the x is. Full lesson: Function Notation

If f(x) = 2x + 1, then f(3) = 2 × 3 + 1 = 7. The x inside the bracket is a placeholder, and a whole expression can take its place: f(a + 1) = 2a + 3.

Plot every input against its output and the rule becomes a picture. Full lesson: Function Notation

See Function Notation.

Now you

f(x) = 5x + 1. What is f(8)?

f(x) = 5x + 6. What is f(5)?

How do you find the domain and range?

The domain is the set of inputs a function accepts. The range is the set of outputs it can produce.

To find a domain, start with every real number and remove the inputs that break the rule: a denominator cannot be zero, the inside of a square root cannot be negative, and the argument of a logarithm must be positive. f(x) = 1/(x − 2) has domain every real number except 2. f(x) = √(x − 5) has domain x ≥ 5.

Here x cannot be zero at all, because dividing by zero has no answer. Full lesson: Domain and Range

The range needs the graph. For f(x) = x² every input is allowed, but a square is never negative, so the range is y ≥ 0.

But nothing below zero ever comes out. The range stops at 0. Full lesson: Domain and Range

See Domain and Range.

Now you

f(x) = 1 / (x − 6). Which input is not allowed?

f(x) = x² + 9. What is the smallest output?

Functions built out of pieces

A piecewise function uses a different rule on each stretch of its domain. To evaluate it, first find which stretch the input falls in, then use that rule. The boundary belongs to the rule whose inequality includes "or equal to".

To evaluate, first ask which stretch the input falls in — then use that rule. Full lesson: Piecewise Functions
A hollow dot marks a point that is not there; a filled dot marks one that is. Full lesson: Graphing a Piecewise Function

The pieces join without a jump when both rules give the same value at the boundary. To make that happen, work out each rule at the boundary, set the two values equal, and solve for the unknown constant.

Set the two equal, and one value of k is left: k = 2. Full lesson: Making a Piecewise Function Continuous

See Piecewise Functions, Graphing a Piecewise Function and Making a Piecewise Function Continuous.

Composite and inverse functions

A composite function sends the output of one function into another as its input. fg(x) means f(g(x)): apply g first, then f. If f(x) = x + 1 and g(x) = x², then fg(2) = f(4) = 5, but gf(2) = g(3) = 9.

The other way round gives 11. Order matters, so read right to left. Full lesson: Composite Functions

An inverse function undoes the original: if f sends 3 to 10, then f⁻¹ sends 10 back to 3. To find one, reverse the order of the steps and replace each step with its opposite. f(x) = 3x + 1 multiplies by 3 and then adds 1, so f⁻¹ subtracts 1 and then divides by 3: f⁻¹(x) = (x − 1)/3.

To undo it, reverse the order of the steps and swap each step for its opposite. Full lesson: Inverse Functions

Swapping input and output swaps the coordinates of every point, so (3, 10) becomes (10, 3).

The inverse is the original reflected in the line y = x. Full lesson: Inverse Functions
Not every function has an inverse. Since 3² = 9 and (−3)² = 9, an inverse of would have to send 9 to two outputs, and a function may give only one. That is why √9 means the positive root only, and why a question restricts the domain to x ≥ 0 before asking for the inverse of .

See Composite Functions and Inverse Functions.

Now you

f(x) = x + 2, g(x) = 3x. What is gf(4)?

f(x) = x + 6, g(x) = 4x. What is gf(3)?

How do transformations change a graph?

A change outside the bracket acts on the output and moves the graph the way it reads: y = x² + 3 lifts every point up 3. A change inside the bracket acts on the input and moves the graph the opposite way: y = (x − 3)² shifts the graph 3 to the right, because x must be 3 bigger than before for the bracket to hold the same value.

Put the 3 inside the bracket and it slides the other way, to the right. Full lesson: Transforming Graphs

Stretches follow the same split. y = 2x² doubles every height, and no point moves sideways. y = (2x)² − 4 acts on the input, so the bracket reaches its old value at half the x, and the curve is squashed to half its width.

y = 2x² doubles every height, so the curve is pulled away from the axis. Full lesson: Stretching a Graph Vertically
So y = (2x)² − 4 crosses at −1 and 1: the curve is squashed toward the axis. Full lesson: Stretching a Graph Horizontally

See Transforming Graphs, Stretching a Graph Vertically and Stretching a Graph Horizontally.

What makes exponential growth different?

Linear growth adds the same amount each step. Exponential growth multiplies by the same factor each step, so each step is bigger than the last, and the curve eventually overtakes any straight line. After n steps of doubling, a starting amount A has become A × 2ⁿ.

Adding the same amount each time gives a line. Multiplying gives this curve. Full lesson: Exponential Growth

Exponential decay is the same rule with a factor below 1. A half-life of 3 days means the amount halves every 3 days: 80 g becomes 40 g, then 20 g, then 10 g.

It closes in on zero forever without reaching it — half of something is never zero. Full lesson: Exponential Decay

Nothing real doubles forever, because the room runs out. A logistic model grows like an exponential at first, then flattens onto a ceiling called the carrying capacity.

A real population flattens onto a ceiling instead: the carrying capacity. Full lesson: Logistic Growth and Carrying Capacity

See Exponential Growth, Exponential Decay, Growth and Decay Problems and Logistic Growth and Carrying Capacity.

What is a logarithm for?

A logarithm asks what power the base was raised to: log₂ 8 = 3 because 2³ = 8. Taking a logarithm undoes raising to a power.

The same fact, read the other way: what power of 2 gives 32? Full lesson: Exponentials and Logarithms

The laws of logarithms come from the laws of exponents. Multiplying powers of one base adds the exponents, 2³ × 2⁴ = 2⁷, so log(ab) = log a + log b. Dividing subtracts: log(a / b) = log a − log b. A power is repeated multiplying, so the exponent comes to the front: log(xⁿ) = n log x.

So log(ab) = log a + log b, in any base — so long as it is one base throughout. Full lesson: The Laws of Logarithms

The power law solves an equation with the unknown in the exponent. Take the log of both sides, and the x comes down. To solve 3ˣ = 20: x log 3 = log 20, so x = log 20 / log 3 ≈ 2.727.

Take the log of both sides, and the power law brings the x down from the exponent. Full lesson: Solving Exponential Equations

A calculator offers only log₁₀ and ln, and the change of base rule reaches every other base from those two: log₂ N = log N / log 2. ln is the logarithm with base e ≈ 2.718, and it obeys every law above.

See Exponentials and Logarithms, The Laws of Logarithms, Solving Exponential Equations, The Change of Base Rule and The Natural Logarithm.

Now you

3^x = 27. What is x?

2^x = 40. Which expression gives x?

Reading data on a log scale

A logarithmic axis places each value v at distance log v, so equal distances stand for equal multiples: 1, 10, 100 and 1000 are evenly spaced.

So y = log₂x is y = 2ˣ reflected in that line: every (a, b) becomes (b, a). Full lesson: Logarithmic Graphs

A log axis tests for exponential growth. If y = a × bˣ, taking logs of both sides gives log y = log a + x log b, a straight line in x. Plot log y against x: if the points straighten, the data is exponential, and undoing the logs on the gradient and the intercept recovers b and a.

Plot log y instead of y and the curve straightens: same data, now a line. Full lesson: Straightening Growth with Logarithms

The axis that takes the logs picks the model. A power law y = a xⁿ straightens when log y is plotted against log x, and the gradient is n. A logarithmic model y = a + b ln x straightens when y is plotted against ln x.

Plot the same scores against ln x and the bend straightens into a line. Full lesson: Fitting a Logarithmic Model

See Logarithmic Graphs, Straightening Growth with Logarithms, Straightening a Power Law and Fitting a Logarithmic Model.

Why do some graphs have gaps?

A rational function is one polynomial divided by another, and a fraction has no value where its denominator is zero. What the gap looks like depends on whether the factor that makes the denominator zero cancels.

A fraction is zero only when its numerator is zero, so the zeros of the numerator are the x-intercepts. Where the denominator is zero and nothing cancels, the graph has a vertical asymptote: just to one side the denominator is tiny, so the values grow without bound.

At x = 3 the denominator is zero, and division by zero is undefined. Full lesson: Zeros and Vertical Asymptotes

When the same factor appears above and below, it cancels, and the gap is a single missing point called a hole. (x² − 4)/(x − 2) = (x − 2)(x + 2)/(x − 2). Cancel, and x + 2 is left for every x except 2, where the original reads 0 ÷ 0. A hole is a removable discontinuity; an asymptote cannot be repaired.

So the graph is the line y = x + 2 with exactly one point missing: a hole. Full lesson: Holes Where a Factor Cancels

Far from the origin the leading terms decide the shape, so compare the degrees of the top and the bottom. If the bottom has the higher degree, the curve flattens onto y = 0. If the degrees are equal, it flattens onto the ratio of the leading coefficients: (2x + 1)/(x − 1) flattens onto y = 2. If the top is exactly one degree higher, the curve approaches a slanted line instead.

Long division finds that line. Divide polynomials the way you divide numbers: compare the leading terms, multiply back, subtract, and repeat. The quotient is the slant asymptote, and the remainder over the divisor fades to nothing far out. (x² + 3x + 5)/(x + 1) = x + 2 + 3/(x + 1), so the slant asymptote is y = x + 2.

The curve closes onto that slant line from both sides and never meets it. Full lesson: Slant Asymptotes by Long Division

See Zeros and Vertical Asymptotes, Holes Where a Factor Cancels, Horizontal Asymptotes by Degree, Long Division of Polynomials and Slant Asymptotes by Long Division.

Now you

What is the horizontal asymptote of y = (x + 4)/(x² + 1)?

What is the horizontal asymptote of y = (5x² + 4)/(x + 3)?

The mistakes worth naming

Learn this properly in the app

Every lesson linked above is in Math Challenge, with an illustrated explanation and practice questions. Graphs of equations and coordinate geometry covers the lines and curves these transformations act on, and sequences and series continues from exponential growth into geometric series.

Your turn

Three to try — tap what you get.

f(x) = 2x + 3. What is f(4)?

Where is 1/(x − 2) undefined?

f(x) = x² and g(x) = x + 1. f(g(2))?

Math ChallengePractice that adapts to you, the whole lesson ladder, and your progress saved.
Start with Math Challenge

Mr. Chalk Practice this lesson in the app