Quarry School

Square roots add boundary checks

Subject: MathematicsLeans on: Square rootsLeans on: Inequality reversalLeans on: Squaring a nonnegative inequalityLeans on: Intersection of boundsLeans on: DenominatorLeans on: SubstitutionLeans on: Solve a root equationLeans on: Squares greater than a bound
Level 2 · BuildingAbout 16 min read9 new terms
How this was estimated

Programmatic estimate. Rung levels, worked steps, prerequisites, terms and sentence length contribute to this level. It describes the lesson, not your ability.

Reading counts the whole lesson, including folded explanations, at 180 words a minute. Practice allows two minutes per item. These are planning assumptions; take the time you need.

AI estimate unavailable.

Path to here

Open the unit’s lesson list to follow the lesson order.

    Quick review (2 minutes)

    In plain words

    Picture a square tile whose area you know.

    Rule

    A(x) requires A(x) ≥ 0. A denominator A(x) requires A(x) > 0.
    For f(g(x)), apply every root requirement at its own stage and keep both gates.

    Step

    1. 1. Write the inner radicand requirement before using the inner function's output.

    2. 2. Substitute the inner output into the outer radicand and require it to be nonnegative.

    3. 3. Use the inner range when possible. A real square root output is always at least zero.

    4. 4. Before squaring an inequality, check that both compared sides are nonnegative. Then square and solve while preserving the earlier requirements.

    5. 5. If a root is a denominator, replace its nonnegative condition with a greater than zero one.

    6. 6. Combine the bounds and test endpoints in the original two-stage formula.

    Question

    Let f(x) = x+2 and g(x) = 3−x. Find (f ∘ g)(x) and its domain. You want a nested-root formula and the starting inputs for which both roots exist. Plan: find where the inner root exists, then use its nonnegative output to check the outer radicand after adding 2.

    Answer

    (f ∘ g)(x) = 3−x+2.
    Domain: (−∞, 3].

    Trap

    Demanding a positive radicand for every square root. Ordinary roots allow zero; roots in denominators must avoid zero because of division.

    Strategy

    1. Use the two-gate strategy from the preceding lesson. Write the original inner restrictions first.

    2. At every root require the whole inside ≥ 0. When that root is a bottom, require the inside > 0.

    3. An inner root gives only nonnegative answers. Check whether this makes an outer requirement automatic or impossible.

    4. If a forbidden outer value is nonnegative, solve the root equation by squaring both nonnegative sides, then substitute the candidate back into the original root.

    5. For an outer upper bound on a root, establish both sides nonnegative before squaring. Retain the inner lower bound.

    6. Combine every restriction and test included boundaries and excluded points in the original stages.

    Term

    Function

    Definition

    A rule that gives exactly one output for each input it accepts.

    Term

    Input

    Definition

    The starting value you give a function. It goes inside the parentheses in function notation.

    Term

    Output

    Definition

    The answer a function produces from an accepted input.

    Term

    Domain

    Definition

    All inputs for which a function is defined.

    Term

    Range

    Definition

    All outputs a function actually produces from its allowed inputs.

    Term

    Undefined

    Definition

    Having no permitted output under the rule being used, as with division by zero or a negative real square-root radicand.

    Term

    Inner function

    Definition

    The function evaluated first in a composition. Its output becomes the next function's input.

    Term

    Outer function

    Definition

    The function evaluated second in a two-function composition. It receives the inner function's output.

    Term

    Substitution

    Definition

    Replacing a variable with a number or expression everywhere that variable appears. Parentheses hold a multi-term replacement together.

    Term

    Radicand

    Definition

    The number or expression inside a root symbol. A real square root requires its radicand to be nonnegative.

    Term

    Square root

    Definition

    The nonnegative number whose square is the given nonnegative number. Here the √ symbol names that one nonnegative value.

    Term

    Reciprocal

    Definition

    One divided by a nonzero number. A fraction's reciprocal swaps its top and bottom, and their product is 1.

    Term

    Intersection

    Definition

    The values shared by all the sets or conditions being combined.

    Term

    Formula

    Definition

    A written rule using numbers, symbols, and operations to describe how a quantity is calculated.

    Term

    Denominator

    Definition

    The bottom of a fraction. It names the divisor and cannot be zero.

    Term

    Real number

    Definition

    A number on the ordinary number line, including negatives, zero, fractions, and numbers such as 2.

    Term

    Nonnegative

    Definition

    Greater than or equal to zero. Zero is included, while positive means greater than zero and excludes zero.

    Term

    Fraction

    Definition

    One number divided by another nonzero number. The top is divided by the bottom; equal pieces give a picture of its size.

    Term

    Nested

    Definition

    Placed inside another expression, like one pair of parentheses inside another.

    Term

    Solve

    Definition

    Find every input that makes a stated equality or inequality true. This differs from evaluating at a given input.

    Term

    Endpoint

    Definition

    A boundary number at an end of an interval. A bracket includes it; a parenthesis leaves it out.

    Term

    Equation

    Definition

    A statement that two expressions have equal values.

    Term

    Inequality

    Definition

    A comparison saying less than, greater than, or either relation with equality allowed. It can describe many permitted inputs rather than one number.

    Term

    Numerator

    Definition

    The top of a fraction. It is the amount divided by the denominator.

    1 In plain words

    Picture a square tile whose area you know. A square root asks for its nonnegative side length. The number under the root sign is the radicand. A negative area cannot make a real square tile, so a real square root needs a nonnegative radicand, meaning zero or more. Zero is allowed: 0 = 0. For a composition, a square root can appear at the first gate or the second gate, so check its radicand at the stage where it appears. Also notice whether a root sits on the bottom of a fraction. Then zero fails the division even though the root itself exists.

    2 Picture it

    no square ever lands below 0(−3, 9)(3, 9)(0, 0)−33−49
    Squares of real numbers never fall below zero, so a real square root needs a nonnegative radicand.

    Reminder

    Reminder: Square roots, Inequality reversal, Squaring a nonnegative inequality, Intersection of bounds, Denominator, Substitution, Solve a root equation, Squares greater than a bound
    • Square roots. 9 = 3, 0 = 0, and −1 has no real value.
    • Inequality reversal. −x ≥ −3 becomes x ≤ 3 after multiplying by −1.
    • Squaring a nonnegative inequality. If u ≥ 0, then u ≤ 4 is equivalent to u ≤ 16; 4 is nonnegative too.
    • Intersection of bounds. x ≥ −1 and x ≤ 15 together give [−1, 15].
    • Denominator. 10 is undefined, even when that zero came from 0.
    • Substitution. For f(x) = x+2, replacing x with g(x) gives g(x)+2.
    • Solve a root equation. x+9 = 5 has nonnegative sides. Square to get x + 9 = 25, hence x = 16; plug back in to obtain 25 = 5. A negative right side would give no solution.
    • Squares greater than a bound. x2 > 36 means x < −6 or x > 6. For example, (−10)2 = 100 > 36, while 02 = 0 fails.

    3 Why

    Every real number squared is nonnegative, so no real number can square to a negative radicand. The root symbol chooses the nonnegative answer, which makes an inner root's range useful: its output can never be below zero. This may make an outer requirement automatic or may impose an upper bound. When squaring a root inequality, first establish that both sides are nonnegative; squaring preserves their order there, but can erase important sign information otherwise.

    4 The rule

    A(x) requires A(x)≥0.

    A denominator A(x) requires A(x) > 0.
    For f(g(x)), apply every root requirement at its own stage and keep both gates.

    The same idea, five ways

    Say it

    A square root needs zero or more inside. A root on the bottom needs more than zero.

    Write it

    Every root must exist at the stage where you use it, and every bottom must be nonzero.

    In math
    • A:A≥0
    • 1A:A>0
    • 0=0
    • [a, ∞) includes a; (a, ∞) excludes a
    Like

    A tile may have zero area, but you cannot divide by its zero side length.

    See it
    0[0, ∞)
    The filled zero belongs to an ordinary root domain. Division by that root removes zero.

    The same idea, other ways

    As square tiles

    A tile with area 9 has side length 3. Area zero has side length zero. A negative area does not have a real side length, because no real square has negative area.

    933
    A square of side 3 has area 9, so 9 = 3.
    As the inner output's range

    If g is a square root, every value coming out is at least zero. Then an outer root of g(x) + 2 always has a radicand at least 2, once g exists.

    x ≤ 3g: √(3 − x)f: √(u + 2)firstsecondg(x) ≥ 0real answer
    The inner range settles the second gate automatically.
    With a root reaching a forbidden value

    A root can hand the next fraction its zero-bottom input. For g(x) = x+9, start 16 gives 5. The fraction 3u−5 then fails. The first root exists, so you must inspect the second stage too.

    16√(x + 9)3/(u − 5)firstsecond5undefined
    The root works at 16, but its output 5 breaks the outer division.

    Part 1: A root at the first gate

    A root in the inner function restricts the starting inputs. An outer operation cannot remove that restriction, even when it squares the inner root and shortens the formula.

    • For g(x) = x−2, the first gate requires x ≥ 2.
    • Squaring an existing nonnegative root returns its radicand.
    2included[2, ∞)
    The first root accepts zero at input 2.

    Worked example

    Squaring a root preserves its starting restriction

    Let g(x) = x−2 and f(x) = x2. Find the formula and domain of f(g(x)). You want to square the inner root after checking that it exists. Plan: require the inner radicand x − 2 to be nonnegative, then square the existing root while keeping its original restriction.

    Show the steps and the answer
    x ≥ 2√(x − 2)squarefirstsecondroot ≥ 0x − 2
    The simpler formula keeps the original root's domain.
    1. Require x−2≥0, so x≥2.The inner square root must have a nonnegative radicand.
    2. f(g(x))=(x−2)2=x−2, on x≥2.Squaring undoes an existing square root but does not create values where that root failed.
    Answer
    • f(g(x))=x−2.
    • Domain: [2, ∞).
    Double-check At 2 the path is 2 to 0 to 0. At 1 the first root would require −1, so the simplified value −1 cannot be used.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: The formula simplifies to x − 2, so start 0 works.
    The first stage would be −2, which has no real answer.
    ✓ Instead: Keep the original condition x ≥ 2 even after squaring.

    Tips and tricks

    • A square can remove a root symbol, but it cannot repair a root that never existed.

    Part 2: A root at the second gate

    When the outer function is a square root, its input is the inner output. Check that output against the outer radicand condition. Sometimes an inner square root also needs to stay below a bound.

    • For f(x) = 4−x, the outer function requires its input ≤ 4.
    • If g(x) = x+1, both x ≥ −1 and g(x) ≤ 4 are required.
    −115inner boundaryouter boundary[−1, 15]
    The two gates create a closed interval of starting inputs.

    Worked example

    An outer root bounds the inner root

    Let f(x) = 4−x and g(x) = x+1. Find the domain of f(g(x)). You want starting inputs that produce a real inner root no larger than 4. Plan: keep the inner root’s existence condition, bound its answer by 4 for the outer root, and square only after checking nonnegative sides.

    Show the steps and the answer
    −115includedincluded[−1, 15]
    Both endpoints give valid roots, including outer output zero.
    1. Gate 1 requires x+1≥0, so x≥−1.The inner root must exist.
    2. Gate 2 requires 4−x+1≥0, so x+1≤4.The outer radicand cannot be negative.
    3. Square both sides: x+1≤16, so x≤15.The inner root is nonnegative and 4 is nonnegative, so squaring preserves order.
    4. Combine x≥−1 and x≤15.Both gates must work for the same starting input.
    Answer
    Domain: [−1, 15].
    Double-check At −1 the path gives inner 0 then outer 2. At 15 it gives inner 4 then outer 0. At 16 the inner output 17 exceeds 4, so the outer radicand is negative.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: Only the inner bound x ≥ −1 matters.
    Start 16 passes the inner root but gives 17 > 4, so the outer inside is negative.
    ✓ Instead: Keep both x ≥ −1 and x ≤ 15.

    Tips and tricks

    • Write the inner lower bound before finding the outer upper bound.

    Part 3: A root in a denominator

    A root on the bottom must exist and must not be zero. Those two requirements combine into a positive radicand. The boundary that an ordinary root accepts is removed by division.

    • 1x−2 requires x − 2 > 0, so x > 2.
    • A zero numerator over a nonzero denominator is allowed; a zero denominator is not.
    2excluded(2, ∞)
    The open endpoint excludes a denominator equal to zero.

    Worked example

    Division removes the zero-root endpoint

    Let f(x) = 1x and g(x) = x − 2. Find the domain of f(g(x)). You want the reciprocal of a root, so its denominator must be real and nonzero. Plan: substitute x − 2 into the outer input and require it to be positive, so the root exists and the denominator is nonzero.

    Show the steps and the answer
    2zero denominator(2, ∞)
    The open point at 2 excludes a zero bottom; inputs farther right make the root positive.
    1. g accepts every real input.Subtracting 2 has no restriction.
    2. The outer rule requires g(x) > 0.A negative input has no real root, and zero would give denominator zero.
    3. x−2>0, so x > 2.Adding 2 preserves the inequality direction.
    Answer
    Domain: (2, ∞).
    Double-check At 3 the denominator is 1 = 1. At 2 it is 0 = 0, so division fails; below 2 the radicand is negative.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: The domain is [2, ∞) because zero under a root is allowed.
    The root exists at 2 but sits in a denominator, where zero is forbidden.
    ✓ Instead: The domain is (2, ∞).

    Tips and tricks

    • Look for the fraction bar before choosing an open or closed endpoint.

    5 How

    1. Write the inner radicand requirement before using the inner function's output.
    2. Substitute the inner output into the outer radicand and require it to be nonnegative.
    3. Use the inner range when possible. A real square root output is always at least zero.
    4. Before squaring an inequality, check that both compared sides are nonnegative. Then square and solve while preserving the earlier requirements.
    5. If a root is a denominator, replace its nonnegative condition with a greater than zero one.
    6. Combine the bounds and test endpoints in the original two-stage formula.

    Apply the two gates to roots

    1
    Is a square root itself a bottom?
    YesUse its inside > 0: this makes the root real and prevents its value being 0.
    NoUse its inside ≥ 0; zero is allowed.
    ↓
    2
    Does an inner root need to equal a forbidden negative value?
    YesNo start can produce that value; gate 2 removes nothing for this equation.
    NoIf the forbidden value is nonnegative, square to locate the failed start and plug back in.
    ↓
    3
    Must a root be no larger than a nonnegative number?
    YesKeep the root’s existence condition, then square both nonnegative sides to find the upper bound.
    NoCheck the required sign before choosing another operation.
    ↓
    4
    Does a squared expression need to be greater than a positive number?
    YesThe allowed starts can lie in two separated pieces. Use the distance-from-zero method taught in the refresher.
    NoKeep all restrictions found from the two gates.
    1. Use the two-gate strategy from the preceding lesson. Write the original inner restrictions first.
    2. At every root require the whole inside ≥ 0. When that root is a bottom, require the inside > 0.
    3. An inner root gives only nonnegative answers. Check whether this makes an outer requirement automatic or impossible.
    4. If a forbidden outer value is nonnegative, solve the root equation by squaring both nonnegative sides, then substitute the candidate back into the original root.
    5. For an outer upper bound on a root, establish both sides nonnegative before squaring. Retain the inner lower bound.
    6. Combine every restriction and test included boundaries and excluded points in the original stages.

    6 Worked example

    Worked example

    A root inside a root

    OpenStax problem

    Let f(x) = x+2 and g(x) = 3−x. Find (f ∘ g)(x) and its domain. You want a nested-root formula and the starting inputs for which both roots exist. Plan: find where the inner root exists, then use its nonnegative output to check the outer radicand after adding 2.

    Show the steps and the answer
    3included(−∞, 3]
    Starting input 3 is included because an ordinary root accepts radicand zero.
    1. (f∘g)(x)=f(3−x)=3−x+2.The whole inner root replaces the outer input.
    2. The inner root requires 3−x≥0.A real square root cannot have a negative radicand.
    3. −x≥−3, so x≤3.Subtracting 3 gives the first inequality; multiplying by −1 reverses its direction.
    4. The outer root requires 3−x+2≥0. This adds no restriction.Where the inner root exists, it is at least zero, so adding 2 makes the outer radicand at least 2.
    Answer
    • (f∘g)(x)=3−x+2.
    • Domain: (−∞, 3].
    Double-check At x = 3, the inner output is 0 and the outer output is 2, so the endpoint is included. At x = 4, the inner radicand is −1, so that input fails. At x = −6, g(−6) = 3 and f(3) = 5, confirming that a composite input can lie outside f's own domain x ≥ −2.

    Ladder: from easy to exam-hard

    Try each rung before you open its steps.

    Rung 1 of 7

    An inner root and an unrestricted outer rule

    Let g(x) = x and f(x) = x + 1. Find the composite domain. You want a real root followed by addition. Plan: require a real inner root, then check that adding 1 accepts every resulting output.

    Show the steps and the answer
    0[0, ∞)
    An ordinary root includes input zero.
    1. The inner root requires x≥0.Its radicand is the starting input.
    2. The outer function adds no restriction.Any real inner output can have 1 added to it.
    Answer
    [0, ∞).
    Double-check At 0, the path is 0 to 0 to 1, so the boundary is included.

    Rung 2 of 7

    A line feeds an outer root

    Let g(x) = 5x − 15 and f(x) = x. Find the composite domain. You need the inner output to be nonnegative. Plan: require the line’s output 5x − 15 to be nonnegative before it enters the outer root.

    Show the steps and the answer
    3[3, ∞)
    The outer root shifts the allowed starting boundary to 3.
    1. g accepts every real x; f requires 5x−15≥0.The outer root's radicand is the entire g output.
    2. 5x≥15, so x≥3.Add 15, then divide by the positive number 5 without reversing the sign.
    Answer
    [3, ∞).
    Double-check At 3 the inner output is 0 and its root is 0; at 2 the inner output is −5 and the outer root fails.

    Rung 3 of 7

    The inner range makes gate 2 automatic

    Let g(x) = 7−x and f(x) = x+5. Find the domain of f(g(x)). You want both roots to exist. Plan: find where the inner root exists, then use its nonnegative output to check the outer radicand after adding 5.

    Show the steps and the answer
    x ≤ 7√(7 − x)√(u + 5)firstsecondroot ≥ 0real answer
    The inner root's range settles the outer condition.
    1. 7−x≥0 gives x≤7.This is the inner root requirement; reversing the sign when multiplying by −1 gives the bound.
    2. The inner output is at least 0, so g(x)+5 is at least 5.A square root's output is nonnegative.
    3. No further restriction is needed.The outer radicand is already positive whenever the inner function exists.
    Answer
    (−∞,7].
    Double-check At 7 the inner root is 0 and the outer root is 5; at 8 the inner root fails.

    Rung 4 of 7

    An inner root reaches a forbidden outer input

    Let g(x) = x+9 and f(x) = 3x−5. Find the domain of f(g(x)). You need the root to exist and its answer to avoid 5. Plan: keep the inner lower bound, solve x+9 = 5, then exclude the verified start.

    Show the steps and the answer
    −916[−9, 16) ∪ (16, ∞)
    Include −9, where the inner root is zero. Exclude 16, where that root is 5 and the outer bottom is zero.
    1. Gate 1: x+9≥0 gives x≥−9.This finds the starting inputs where the inner root exists.
    2. Gate 2: f rejects input 5, since 5−5=0. Solve x+9=5 to find the start that hands f that value.The equation locates the failed outer handoff.
    3. Both sides are nonnegative. Square: x+9=25. Subtract 9: x=16.Squaring reverses the existing root here; subtraction isolates the failed start.
    4. Plug back in: g(16)=25=5 and f(5)=30. Exclude 16.The candidate truly breaks gate 2 and already lies in the inner domain.
    5. At the lower boundary −9,g(−9)=0 and f(0)=3−5=−35, so include −9.A zero root is permitted here because the outer bottom is −5, not zero.
    Answer
    Domain: [−9, 16) ∪ (16, ∞).
    Double-check At x = 0, g(0) = 3 and f(3) = −32, so an input between the boundaries works. At 16 only the second stage fails.

    Rung 5 of 7

    Both a lower and an upper bound

    Let g(x) = x+2 and f(x) = 3−x. Find the composite domain. The inner root must exist and its output must be no greater than 3. Plan: keep the inner lower bound, require its root output to be at most 3, then square the nonnegative comparison to find the upper bound.

    Show the steps and the answer
    −27[−2, 7]
    The inner and outer roots impose different boundaries.
    1. x+2≥0 gives x≥−2.Gate 1 requires a real inner root.
    2. 3−x+2≥0 gives x+2≤3.Gate 2 requires a real outer root.
    3. Square to get x+2≤9, so x≤7.Both the existing root and 3 are nonnegative.
    4. Combine the two bounds.Both stages must exist.
    Answer
    [−2,7].
    Double-check At −2 the outputs are 0 then 3. At 7 the outputs are 3 then 0. At 8 the outer radicand is negative.

    Rung 6 of 7

    A denominator makes the bound strict

    Let g(x) = 3x − 9 and f(x) = 1x. Find the composite domain. You need a real square root that is also a nonzero denominator. Plan: require the line’s output to be positive, because its outer root is also a denominator.

    Show the steps and the answer
    3excluded(3, ∞)
    A root in a denominator excludes the zero-radicand boundary.
    1. Require 3x−9>0.The outer input must be positive, not only nonnegative, to avoid a zero denominator.
    2. 3x > 9, so x > 3.Add 9 and divide by positive 3.
    Answer
    (3, ∞).
    Double-check At 3 the denominator would be zero. At 6, the inner output is 9 and the final answer is 13, so an allowed input works.

    Rung 7 of 7

    A square feeds a root in a bottom

    Let m(x) = x2 − 36 and p(x) = 1x. Find both p(m(x)) and m(p(x)), with their domains. You want to compare the two orders and keep any restriction hidden by simplification. Plan: first require x2 − 36 > 0 for p after m; then retain p’s positive-input requirement for the reverse order.

    Show the steps and the answer
    −66(−∞, −6) ∪ (6, ∞)
    The first order accepts two outside pieces because squares grow on both sides of zero.
    0(0, ∞)
    The reverse order requires a positive start for its first reciprocal root.
    1. p(m(x))=1x2−36. Require x2−36>0.The root is a bottom, so its inside must be positive to make it real and nonzero.
    2. Add 36: x2>36. This means distance from zero greater than 6, so x<−6 or x > 6.Both positive and negative numbers can have squares larger than 36. The points 6 and −6 give a zero bottom.
    3. For the reverse order, p must act first, so require x > 0.An inner root on the bottom rejects negative starts and zero before m can act.
    4. m(p(x))=(1÷x)2−36=1x−36, still for x > 0.An existing root squares to x. The shorter expression retains the inner positive-input restriction.
    Answer
    • p(m(x))=1x2−36.
    • Domain: (−∞, −6) ∪ (6, ∞).
    • m(p(x))=1x−36.
    • Domain: (0, ∞).
    Double-check For p after m, starts 10 and −10 each give m = 64, then p = 18. Starts 6 and −6 give a zero bottom, and 0 gives a negative root inside. For m after p, start 1 gives p(1) = 1 then m(1) = −35, matching 1 − 36; a negative start still fails the first root.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: A square root's radicand must always be greater than zero.
    0 = 0 is a valid real value unless a separate denominator restriction rejects it.
    ✓ Instead: Use radicand ≥ 0 for an ordinary root, and > 0 for a root denominator.
    ✗ Not this: Square x+1 ≤ −2 to get x + 1 ≤ 4.
    A nonnegative root can never be ≤ a negative number. Squaring erased the sign obstruction.
    ✓ Instead: This inequality has no real solutions; check the signs before squaring.
    ✗ Not this: For f(x) = 3x+5 and g(x) = x+9, exclude 16 after squaring x+9 = −5.
    The equation is impossible: a square-root answer never equals −5. At 16 the root is 5 and the outer bottom is 10, so that start works.
    ✓ Instead: Gate 2 removes nothing. Keep only the inner condition x ≥ −9, giving [−9, ∞).

    Tips and tricks

    • Put on the cheat sheet for study: ordinary root means ≥ 0; root denominator means > 0.
    • Know cold: zero is allowed under a root but not under a fraction bar. Picture a filled endpoint for the root and an open endpoint for division.
    • Test boundary inputs in the original nested formula before choosing brackets.

    7 The trap

    Demanding a positive radicand for every square root. Ordinary roots allow zero; roots in denominators must avoid zero because of division.

    Problems marked OpenStax come from Precalculus 2e by Jay Abramson, published by OpenStax, under the CC BY-NC-SA 4.0 licence. Access for free at https://openstax.org/books/precalculus-2e/pages/1-introduction-to-functions.