The quadratic formula says that the solutions of depend on the three coefficients, and that dependence is not itself an equation. It is a rule: hand it three numbers and it hands back an answer, every time, without ambiguity.
Mathematics has a name for such a rule and a machinery for handling it, and building that machinery is what this lesson does. It assumes only the algebra of the previous two lessons, and it produces the object that the rest of the course studies almost exclusively.
What a function is, exactly
A function is a rule that assigns to each input exactly one output. Three things must be given before the rule is fully specified: the set of allowed inputs, called the domain; the set the outputs are drawn from, the codomain; and the rule itself. Writing gives only the third, and the other two are usually left implicit as "whatever real numbers make sense".
The demand for exactly one output is the whole of the definition and it is stricter than it looks. The rule " is a number whose square is " is not a function, because yields both and . This is why is defined to mean and not : the square root symbol has to name one number, and the choice of the non-negative one is a convention adopted to rescue functionhood. It is also why the quadratic formula carries an explicit rather than hiding two answers inside one symbol.
The notation is worth reading carefully, because it is not multiplication. It means the output of at the input , and alone is the name of the function while is the name of a number. Sloppiness here is harmless in easy cases and disastrous when functions start being fed to other functions, which happens later in this lesson.
Domain: where the rule refuses to run
Two things stop a formula in its tracks over the reals, both met already. Division by zero is barred, so has domain every real except . Even roots of negatives do not exist on the real line, so needs , giving domain . Everything else is allowed, and a polynomial has every real number in its domain.
Domain can also be imposed from outside rather than discovered from the formula. If is the area of a circle of radius , then is arithmetically fine and physically meaningless, so the domain is because of what the function is for. Modelling almost always narrows a domain this way, and forgetting to say so is how a model gets used outside the range where it was ever true.
The range is what actually comes out: the set of values takes as runs over the domain. Range is generally harder to find than domain, because it requires knowing the behaviour of the whole rule rather than checking for prohibited operations. For with domain all reals, the range is , since squares are never negative and every non-negative number is a square.
Example. Give the domain and range of .
The root demands , so that is the domain. As runs from upward, runs from upward, its square root runs from upward taking every non-negative value, and adding shifts all of it, so the range is . A check: , and .
Now you. Give the domain and range of .
Answer
The domain is . The root takes every value from upward, and subtracting it from takes downward without limit, so the range is . Check: and .
A function need not be a formula
The formula is the commonest presentation but not the definition, and holding the two apart pays off. A table of values is a function if no input appears twice with different outputs. The mapping from a date to the closing price of an index is a function with no formula at all. A rule given in words, such as "round to the nearest integer", is a function.
Piecewise definitions matter in practice because so much of the world is written in bands. United Kingdom income tax in the 2024/25 year charges nothing on the first pounds, per cent on income between there and , and per cent from there to . That is one function of income, defined by different formulas on different stretches.
On an income of pounds the tax is pounds. On it is pounds. Note what the calculation shows: the higher rate applies only to the part of the income above the threshold, so crossing a band boundary never reduces take-home pay. That single fact, which is a property of the function, is the one most often got wrong in public argument about tax.
Composition, and why order matters
Feeding the output of one function into another gives a new function, written and read " after ". The inner function runs first, which is the reverse of the reading order, and it is a common source of error.
Take and . Then , while . Composition is not commutative, and unlike the commutativity of multiplication this failure is normal rather than exotic: doubling then adding three is a different rule from adding three then doubling, as anyone who has applied a discount before or after tax knows.
Composition also inherits domain restrictions from both parts. In the input must be in the domain of , and the value must then be in the domain of . With and , the composition needs even though each function separately is happy with any real. Checking both conditions, not just the visible one, is the discipline.
Example. With and , find , , and a formula for .
, so . In the other order, , so . In general , and a check at gives , agreeing.
Now you. With the same two functions, find a formula for and evaluate it at .
Answer
. At that is , which matches then .
Running a function backwards
An inverse of is a function that undoes it: for every in the domain, and for every in the range. The superscript is unfortunate notation, since does not mean , and only context distinguishes them.
Not every function has one, and the reason is the same strictness that defined functions in the first place. If two different inputs give the same output, the inverse would have to send that output back to both, and it would not be a function. So is invertible exactly when it is injective, meaning distinct inputs always give distinct outputs. The function on all the reals is not injective, since , and it therefore has no inverse.
The standard repair is to shrink the domain until injectivity holds. Restrict to and it becomes injective, with inverse . The restriction is a genuine choice: would have worked equally well and would give as the inverse. Conventions of this kind, chosen for convenience and then treated as inevitable, are behind the odd-looking domain restrictions on the inverse trigonometric functions two lessons from the end of this course.
Finding an inverse algebraically is a routine. Write , solve for in terms of using the laws of lesson two, and rename the variables at the end.
Inverses in practice
Example. Find the inverse of , and state where each function is defined.
Set and multiply through by , which is legal since : , so . Gather the terms on one side: , so and . Hence . The domain of excludes and the domain of excludes , and these correspond: is the value approaches but never takes, so it is missing from the range of . Check numerically: , and .
Now you. Find the inverse of and check it at .
Answer
gives , so . Checking, , and .
The most familiar inverse pair in daily use is temperature conversion. Fahrenheit from Celsius is , a function built from a stretch and a shift, and undoing those in reverse order gives . Check: , and . The two scales agree at exactly one temperature, where , which solves to , a linear equation of the kind the previous lesson handled.
What is still missing
A function has now been defined, restricted, composed and inverted, all algebraically. What has not happened is seeing one. Asking whether is injective, or what its range is, or how many solutions has, is hard work by algebra alone and nearly immediate once the function is drawn.
Turning a rule into a picture requires a device for holding an input and its output at once, and that device is the coordinate plane. It arrives in the next lesson, and with it the observation that injectivity, range, and the number of solutions of an equation are all visible at a glance.