Math explained

Domain and range, inverse functions and transformations: how to read a function's shape from its equation, worked on one function

Domain and range read from the equation, the inverse found with its domain restricted, and the transformations that built the graph, all on one function.

The domain of a function is every input it accepts; the range is every output it produces. Both can be read from the equation before any graph is drawn: a square root needs what is under it to be at least zero, a fraction needs its bottom to be nonzero, and the range follows from how the shape was shifted and stretched. The inverse swaps the two, which is why an inverse's domain is the original's range. Here is one function read for all three, line by line.

Function notation, in one paragraph

Function notation names an output by its input. f(x) is the output when the input is x. It is not f times x. So f(3) means "put 3 in and see what comes out".

The function for the whole page is f(x) = √(x − 3) + 2. Two inputs:

  • f(7) = √(7 − 3) + 2 = √4 + 2 = 2 + 2 = 4.
  • f(12) = √(12 − 3) + 2 = √9 + 2 = 3 + 2 = 5.

In MHF4U the ideas on this page are idea 25, "Inverse functions", and idea 26, "Transformations of functions". Before them comes idea 24, "Composition of functions". They are the course's last strand, but most students meet domain and range in Grade 10 or 11 and need them from the first unit onward. The MHF4U course map has the full order, and the precalculus ideas calculus assumes are listed on their own page.

Domain and range: how to find the domain of a function

The domain is what is left after you remove every input the equation refuses. At this level there are two refusals:

  1. Nothing negative under an even root. √(something) needs the something to be at least zero.
  2. Nothing zero in a denominator. A fraction needs its bottom to be nonzero.

In Grade 12 a third joins them: nothing zero or negative inside a logarithm, which the logarithm rules page uses when it rejects a false root.

The method is the same every time. Write the condition as an inequality or an "is not equal to", then solve it. A polynomial refuses nothing, so its domain is every real number.

Worked example, part 1: domain and range of f(x) = √(x − 3) + 2

This is the domain and range of a square root function, read from the equation.

  1. Write the root's condition. What is under the root must be at least zero: x − 3 ≥ 0.
  2. Solve it. Add 3: x ≥ 3. The domain is {x ∈ ℝ | x ≥ 3}. In interval notation that is [3, ∞).
  3. Start the range from the root. A square root's output is never negative: √(x − 3) ≥ 0.
  4. Apply the outside change. Add 2 to both sides: √(x − 3) + 2 ≥ 2. The range is {y ∈ ℝ | y ≥ 2}, or [2, ∞).
  5. Name the starting point. At x = 3 the output is √0 + 2 = 2, so the graph starts at (3, 2). From there it rises to the right, more and more slowly, through (7, 4) and (12, 5).

The common wrong line: domain x ≥ 0

Students who know "a square root needs x ≥ 0" write the domain as x ≥ 0. That rule is for √x. Here the condition is on what is under the root, which is x − 3. Try x = 1: √(1 − 3) = √(−2), which is not a real number. So 1 is not in the domain, and x ≥ 0 is wrong.

The second wrong line: range y ≥ 0

The other slip is writing the range as y ≥ 0, which is the range of √x. Every output of √(x − 3) has 2 added to it before it leaves the function. The smallest output is 2, not 0.

Worked example, part 2: inverse functions, line by line

An inverse function undoes the original: if f sends 7 to 4, then f⁻¹ sends 4 back to 7. Here is how to find the inverse of a function.

  1. Write it with y. y = √(x − 3) + 2.
  2. Swap x and y. x = √(y − 3) + 2.
  3. Isolate the root. Subtract 2: x − 2 = √(y − 3).
  4. Square both sides. (x − 2)² = y − 3.
  5. Solve for y. Add 3: y = (x − 2)² + 3.
  6. Restrict the domain. f⁻¹(x) = (x − 2)² + 3, for x ≥ 2. The restriction is f's range: f only ever produced outputs of 2 or more, so its inverse only accepts those.
  7. Check by composing. f(f⁻¹(x)) = √((x − 2)² + 3 − 3) + 2 = √((x − 2)²) + 2 = |x − 2| + 2. For x ≥ 2, |x − 2| = x − 2, so this is x − 2 + 2 = x.

The swap also swaps the domain and range. The inverse's domain is x ≥ 2, f's range. Its range is y ≥ 3, f's domain. One check of a point: f⁻¹(4) = (4 − 2)² + 3 = 7, which undoes f(7) = 4.

The common wrong line: no restriction

Students write f⁻¹(x) = (x − 2)² + 3 for all real x. Squaring in step 4 created a second branch: the parabola (x − 2)² + 3 has a left half that f never asked for. The check shows the fault. Without the restriction, take x = 0: the "inverse" gives (0 − 2)² + 3 = 7, but f(7) = 4, not 0. The composition gives |x − 2| + 2, which equals x only when x ≥ 2.

The idea behind the restriction is that an inverse exists only for a function that never gives the same output twice. The left half of the parabola gives outputs the right half already gave, so it has to go.

The second wrong line: f⁻¹ as 1/f

The −1 in f⁻¹ is notation for the inverse function, not an exponent. 1/f(x) is the reciprocal, a different function. For our f, the reciprocal is 1/(√(x − 3) + 2). At x = 7 the reciprocal gives 1/f(7) = 1/4, while the inverse gives f⁻¹(7) = (7 − 2)² + 3 = 28.

Worked example, part 3: the transformations of functions that built it

Our function is the base y = √x moved twice.

  1. The inside change. x − 3 under the root shifts the graph 3 to the right.
  2. The outside change. + 2 after the root shifts the graph 2 up.

The base graph starts at (0, 0). Right 3 and up 2 moves that start to (3, 2), which is where part 1 found it.

The rule behind both moves:

  • Inside changes act on x and move the graph horizontally, opposite to the sign you see. x − 3 means right 3.
  • Outside changes act on y and move the graph vertically, with the sign you see. + 2 means up 2.

The general form puts every change in one line: y = a f(k(x − d)) + c.

  • a stretches the graph vertically by a factor of |a|, and reflects it in the x-axis if a is negative.
  • k stretches it horizontally by a factor of 1/|k|, and reflects it in the y-axis if k is negative.
  • d shifts it horizontally: right by d.
  • c shifts it vertically: up by c.

Apply the stretches and reflections before the shifts. The letter students invert is k. y = √(2x) has k = 2, which is a horizontal compression by a factor of 1/2, not a stretch by 2. Each point moves halfway to the y-axis, because the input only has to be half as large to give the same output.

Siblings to try cold

Read each function for its domain, its range and the transformations from its base. For the first, find the inverse too. Cover the worked example and write every line. A worked example followed by your own attempt is the order Sweller and Cooper (1985) found teaches beginners in algebra faster than solving from the start.

  1. h(x) = 1/(x + 2) − 3, from the base y = 1/x.
  2. y = −2√(x + 4) + 1, from the base y = √x.

Check

  1. Domain x ≠ −2. Range y ≠ −3. Inverse h⁻¹(x) = 1/(x + 3) − 2, for x ≠ −3. From y = 1/x: left 2, down 3. The two excluded values are the vertical and horizontal lines the graph approaches, which the asymptotes page reads in full.
  2. Domain x ≥ −4. Range y ≤ 1. From y = √x: a vertical stretch by a factor of 2, a reflection in the x-axis, left 4, up 1. The reflection is why the range points down.

If your second range came out y ≥ 1, you applied the shift and forgot the reflection.

Domain and range from a graph, in one paragraph

When you have a graph instead of an equation, read the domain from left to right: the furthest left x the graph reaches to the furthest right. Read the range from bottom to top: the lowest y to the highest. A filled dot means that point is included; an open circle means it is not. An arrow at the end of a curve means it keeps going, so that side of the interval is unbounded. For our f, the graph starts with a filled dot at (3, 2) and rises with an arrow to the right, which gives the same [3, ∞) and [2, ∞) the equation did.

Where it goes next

Composition of functions (idea 24) is where f(g(x)) first appears, and an inverse is exactly the g that undoes f: f(f⁻¹(x)) = x, as part 2 showed. Logarithms are the inverse of exponentials by this same swap of x and y, which is why the log's domain is the exponential's range.

To make the three readings stick, practise them on paper with this page closed. Roediger and Karpicke (2006) found that taking a test on material improved long-term retention more than restudying it, and testing yourself before you reread turns that into a routine. Worked examples, then practice problems sets out the order. When the same slip keeps coming back, chapter 4 of the free playbook is about finding that line. The other MHF4U ideas are on the math help hub.

Domain, range and inverses on one screen

  • Two refusals: nothing negative under an even root, nothing zero in a denominator. Write the condition and solve it.
  • Range: start from the base shape's outputs, then apply the outside changes.
  • The inverse: swap x and y, solve for y, then restrict.
  • The inverse's domain is the original's range, and its range is the original's domain.
  • Check: f(f⁻¹(x)) must simplify to x on the restricted domain.
  • f⁻¹ is not 1/f. The −1 names the inverse, not a reciprocal.
  • Transformations: inside changes move the graph horizontally, opposite to the sign; outside changes move it vertically, with the sign. Stretch and reflect before you shift.
  • Worked answer: f(x) = √(x − 3) + 2 has domain [3, ∞), range [2, ∞) and inverse (x − 2)² + 3 for x ≥ 2.

Questions students ask

How do you find the domain and range of a function?

For the domain, find every x the equation refuses: anything that makes a square root's inside negative or a denominator zero. For the range, start from the base shape's outputs and apply the vertical changes: a stretch scales them, a reflection flips them, a shift moves them. Check against the graph if you have one.

How do you find the inverse of a function?

Write y = f(x), swap x and y, and solve for y. The result is f⁻¹(x). Then restrict its domain to the original function's range, because the inverse can only accept what the original produced. Check by composing: f(f⁻¹(x)) should simplify to x.

Does f⁻¹(x) mean 1 over f(x)?

No. In function notation the −1 marks the inverse function, the one that undoes f. The reciprocal 1/f(x) is a different function. f(x) = √(x − 3) + 2 has inverse (x − 2)² + 3 for x ≥ 2, while its reciprocal is 1/(√(x − 3) + 2).

Why does the horizontal shift go the opposite way?

Because a change inside the function acts on the input. In √(x − 3), the input must be 3 larger to produce the same output √x did, so every point moves 3 to the right even though the equation shows a minus. Changes outside act on the output and move the graph the way the sign reads.

What is the domain of a square root function?

Every x that makes the expression under the root at least zero. Set the inside greater than or equal to zero and solve: for √(x − 3) that is x ≥ 3. If the root is in a denominator, the inside must be strictly greater than zero.

Put tonight's studying on rails

YSR Studies turns your notes, lectures and course into cards that come back before you forget, a tutor that makes you try first, and a map of what you know. Free, five hours a month, no card asked.

Open YSR Studies

Read next

Sources

  1. OpenStax (2021). Precalculus 2e, chapter 1, Functions (functions and function notation; domain and range; transformation of functions; inverse functions). Houston: OpenStax. The standard open treatment of these four ideas; cited, not quoted, and no problem reproduced.
  2. Sweller, J., & Cooper, G. A. (1985). The use of worked examples as a substitute for problem solving in learning algebra. Cognition and Instruction, 2(1), 59–89. https://doi.org/10.1207/s1532690xci0201_3
  3. Roediger, H. L., & Karpicke, J. D. (2006). Test-enhanced learning: Taking memory tests improves long-term retention. Psychological Science, 17(3), 249–255. https://doi.org/10.1111/j.1467-9280.2006.01693.x
  4. YSR Studies (2026). The MHF4U course map: Composition of functions, Inverse functions, and Transformations of functions are ideas 24 to 26 of 26.