{"base":{"id":"alcm-1-03","subject":"Combined Maths","title":"Functions: domain, codomain and range","scene":"alcm","steps":[{"mode":"fig","fig":{"view":[0,0,10,10],"items":[{"k":"circle","c":[2.2,5],"r":2.6,"col":"b","fill":"b"},{"k":"circle","c":[7.8,5],"r":2.6,"col":"g","fill":"g"},{"k":"txt","p":[2.2,8.2],"t":"A","col":"b","size":40},{"k":"txt","p":[7.8,8.2],"t":"B","col":"g","size":40},{"k":"txt","p":[2.2,6.6],"t":"1","col":"k","size":34},{"k":"txt","p":[2.2,5],"t":"2","col":"k","size":34},{"k":"txt","p":[2.2,3.4],"t":"3","col":"k","size":34},{"k":"txt","p":[7.8,7],"t":"2","col":"k","size":34},{"k":"txt","p":[7.8,5.6],"t":"4","col":"k","size":34},{"k":"txt","p":[7.8,4.2],"t":"6","col":"k","size":34},{"k":"txt","p":[7.8,2.8],"t":"7","col":"k","size":34},{"k":"seg","p":[2.7,6.6,7.3,7],"col":"o","end":1,"s":1},{"k":"seg","p":[2.7,5,7.3,5.6],"col":"o","end":1,"s":1},{"k":"seg","p":[2.7,3.4,7.3,4.2],"col":"o","end":1,"s":1},{"k":"txt","p":[5,1.2],"t":"f(x) = 2x","col":"o","size":40,"s":1},{"k":"txt","p":[5,0.4],"t":"range = {2, 4, 6}","col":"r","size":32,"s":2}],"stages":2},"say":["Tap to apply the rule.","Each x has exactly one arrow.","7 is in B but no arrow reaches it."],"actions":[{"id":"step","label":"Show the next step"}],"eyebrow":"A rule with one output","title":"What makes a function","body":"A function f from set A to set B gives each element x of A exactly one image f(x) in B. A is the domain and B is the codomain. Two arrows from one x are not allowed."},{"mode":"fig","fig":{"view":[-3,-2,3,7],"items":[{"k":"fn","e":"x^2","col":"b","w":7},{"k":"line","p":[0,0,1,0],"col":"r","w":7,"s":1}],"axes":{"xl":"x","yl":"y"},"free":true},"work":{"title":"Write it like this","lines":["f : R → R,  f(x) = x²","x² ≥ 0 for every real x",{"t":"range = {y : y ≥ 0}","note":"part of the codomain R"}]},"say":["Tap to find the range.","Domain and codomain are both R.","The graph never goes below the x-axis.","So the range is y ≥ 0."],"actions":[{"id":"step","label":"Show the next step"}],"eyebrow":"Range","title":"The images actually reached","body":"The range is the set of images that are actually reached. It is part of the codomain and can be smaller. For f(x) = x² on R, the codomain may be R, but the range is only y ≥ 0."},{"mode":"fig","work":{"title":"Write it like this","lines":[{"t":"f(x) = 1/(x − 3)","note":"x ≠ 3"},{"t":"g(x) = √(x + 2)","note":"x + 2 ≥ 0   →   x ≥ −2"},{"t":"h(x) = √(4 − x²)","note":"4 − x² ≥ 0   →   −2 ≤ x ≤ 2"},{"t":"k(x) = 1/√(x − 1)","note":"x − 1 > 0   →   x > 1"}]},"say":["Tap for four domains.","The bottom cannot be 0.","Inside the root ≥ 0.","Solve the quadratic inequality.","Both rules: strictly greater than 0."],"actions":[{"id":"step","label":"Show the next step"}],"eyebrow":"Largest domain","title":"Where the formula makes sense","body":"If only a formula is given, take the largest set of real x for which it works. Two rules: never divide by zero, and never take the square root of a negative number."},{"mode":"plot","controls":[{"id":"a","label":"a","min":-3,"max":3,"step":1,"value":1}],"view":[-4,-1,8,5],"axes":{"xl":"x","yl":"y"},"fns":[{"e":"sqrt(x-a)+1","col":"b"}],"pts":[{"x":"a","y":"1","col":"r","t":"({a|0}, 1)"}],"ptitle":"Domain and range","rows":["y = √(x − {a|0}) + 1",["domain: x ≥ {a|0}","b"],["range: y ≥ 1","r"]],"note":"The root needs x − a ≥ 0. The smallest value of the root is 0, so y starts at 1.","st":"Domain x ≥ {a|0}, range y ≥ 1.","eyebrow":"Explore","title":"Domain and range on a graph","body":"Move a to shift the graph y = √(x − a) + 1. The domain starts at x = a and the range starts at y = 1. Read both from the picture."},{"mode":"quiz","look":"fig","fig":{"view":[0,0,10,10],"items":[{"k":"txt","p":[5,5],"t":"f(x) = √(6 − 2x)","size":84,"col":"v","max":1400}]},"eyebrow":"Check yourself","title":"Domain","body":"Inside the root must not be negative.","question":"The largest domain of f(x) = √(6 − 2x) is…","options":["x ≥ 3","x ≤ 3","x ≤ 6"],"answer":1,"right":"Correct. 6 − 2x ≥ 0 gives x ≤ 3.","wrong":"Not quite. Solve 6 − 2x ≥ 0; dividing by −2 flips the sign."}],"more":[{"type":"cards","id":"detail","eyebrow":"The ideas in detail","title":"Functions in detail","items":[{"tag":"Notation","title":"Ways to write a function","body":"f : A → B,  x ↦ 2x + 1\nf(x) = 2x + 1, x ∈ A\ny = 2x + 1\n\nf(3) is the image of 3: f(3) = 7. The letter x is only a place-holder: f(t) = 2t + 1 is the same function."},{"tag":"Vertical line test","title":"Is a graph a function?","body":"A curve is the graph of a function of x when every vertical line meets it at most once. The circle x² + y² = 4 fails: x = 1 meets it at y = √3 and y = −√3. The upper half y = √(4 − x²) passes."},{"tag":"Constants","title":"Constants and variables","body":"In f(x) = ax + b, x is the variable, and a, b are constants for one function. Changing a or b gives a new function from the same family, as the slider showed."}]},{"type":"cards","id":"ideas","eyebrow":"Marks lost in the exam","title":"Common mistakes","items":[{"tag":"Common mistake","title":"Mixing codomain and range","body":"The codomain is the set you are allowed to land in; the range is what you actually land on. The range may be smaller."},{"tag":"Common mistake","title":"Using > instead of ≥ under a root","body":"For √(x + 2), x = −2 is allowed because √0 = 0. Use > only when the root is also in a denominator."}]},{"type":"quiz","id":"quiz","eyebrow":"Go further","title":"Thirty questions: easy, medium, hard","questions":[{"level":"easy","question":"f(x) = 2x + 1. f(3) = ?","options":["7","5","6"],"answer":0,"right":"Correct. 2 × 3 + 1 = 7.","wrong":"Not quite. Replace x by the number."},{"level":"easy","question":"f(x) = 3x − 2. f(4) = ?","options":["10","14","5"],"answer":0,"right":"Correct. 3 × 4 − 2 = 10.","wrong":"Not quite. Replace x by the number."},{"level":"easy","question":"f(x) = −x + 5. f(2) = ?","options":["−7","3","6"],"answer":1,"right":"Correct. −1 × 2 + 5 = 3.","wrong":"Not quite. Replace x by the number."},{"level":"easy","question":"f(x) = 4x + 7. f(−3) = ?","options":["−19","8","−5"],"answer":2,"right":"Correct. 4 × (−3) + 7 = −5.","wrong":"Not quite. Replace x by the number."},{"level":"easy","question":"A function from A to B gives each element of A…","options":["at least two images","exactly one image in B","no image"],"answer":1,"right":"Correct. One input, one output.","wrong":"Not quite. Think of the definition."},{"level":"easy","question":"The set of images actually reached is the…","options":["range","domain","codomain only"],"answer":0,"right":"Correct. The range is a subset of the codomain.","wrong":"Not quite. Not all of B need be reached."},{"level":"easy","question":"The largest domain of f(x) = 1/x is…","options":["R","x > 0","R except 0"],"answer":2,"right":"Correct. Division by 0 is not allowed.","wrong":"Not quite. Where is 1/x undefined?"},{"level":"easy","question":"The vertical line test checks whether a graph is…","options":["one-one","continuous","a function of x"],"answer":2,"right":"Correct. Each x must give one y.","wrong":"Not quite. A vertical line meets the graph at most once."},{"level":"easy","question":"f(x) = 5 for every x. This is called…","options":["an identity function","a constant function","not a function"],"answer":1,"right":"Correct. Every input gives 5.","wrong":"Not quite. The output never changes."},{"level":"easy","question":"f(x) = x². The range on R is…","options":["R","y ≥ 0","y > 0"],"answer":1,"right":"Correct. Squares are never negative, and 0 is reached.","wrong":"Not quite. Can x² be negative?"},{"level":"medium","question":"The largest domain of f(x) = √(4 − x²) is…","options":["x ≤ 2","x ≥ 2","−2 ≤ x ≤ 2"],"answer":2,"right":"Correct. Need 4 − x² ≥ 0.","wrong":"Not quite. The expression under the root must be ≥ 0."},{"level":"medium","question":"The largest domain of f(x) = √(9 − x²) is…","options":["−3 ≤ x ≤ 3","x ≤ 3","x ≥ 3"],"answer":0,"right":"Correct. Need 9 − x² ≥ 0.","wrong":"Not quite. The expression under the root must be ≥ 0."},{"level":"medium","question":"The largest domain of f(x) = √(1 − x²) is…","options":["−1 ≤ x ≤ 1","x ≤ 1","x ≥ 1"],"answer":0,"right":"Correct. Need 1 − x² ≥ 0.","wrong":"Not quite. The expression under the root must be ≥ 0."},{"level":"medium","question":"The largest domain of f(x) = 1/(x − 2) is…","options":["R except −2","R except 2","x > 2"],"answer":1,"right":"Correct. x = 2 makes the bottom 0.","wrong":"Not quite. Solve bottom = 0."},{"level":"medium","question":"The largest domain of f(x) = 1/(x − 3) is…","options":["R except −3","R except 3","x > 3"],"answer":1,"right":"Correct. x = 3 makes the bottom 0.","wrong":"Not quite. Solve bottom = 0."},{"level":"medium","question":"The largest domain of f(x) = 1/(x − 5) is…","options":["R except −5","x > 5","R except 5"],"answer":2,"right":"Correct. x = 5 makes the bottom 0.","wrong":"Not quite. Solve bottom = 0."},{"level":"medium","question":"The range of f(x) = 2x + 1 on 0 ≤ x ≤ 3 is…","options":["0 ≤ y ≤ 3","1 ≤ y ≤ 7","1 ≤ y ≤ 6"],"answer":1,"right":"Correct. f is increasing: f(0) = 1, f(3) = 7.","wrong":"Not quite. Find the end values."},{"level":"medium","question":"The range of f(x) = (x − 2)² + 3 on R is…","options":["y ≥ 3","y ≥ 2","R"],"answer":0,"right":"Correct. Least value 3 at x = 2.","wrong":"Not quite. A square is at least 0."},{"level":"medium","question":"f(x) = x² − 4x. f(a + 1) = ?","options":["a² − 4a + 1","a² − 2a − 3","a² − 3"],"answer":1,"right":"Correct. (a + 1)² − 4(a + 1) = a² + 2a + 1 − 4a − 4.","wrong":"Not quite. Replace every x by a + 1."},{"level":"medium","question":"The largest domain of ln(x − 1) is…","options":["x ≥ 1","x > 0","x > 1"],"answer":2,"right":"Correct. ln needs a positive input.","wrong":"Not quite. x − 1 > 0."},{"level":"hard","question":"The largest domain of f(x) = √((x − 1)(x − 4)) is…","options":["1 ≤ x ≤ 4","x ≤ 1 or x ≥ 4","x ≥ 4"],"answer":1,"right":"Correct. The product is ≥ 0 outside the roots.","wrong":"Not quite. Sign table for (x − 1)(x − 4)."},{"level":"hard","question":"The range of f(x) = 1/(x² + 1) on R is…","options":["0 ≤ y ≤ 1","0 < y ≤ 1","y ≥ 1"],"answer":1,"right":"Correct. x² + 1 ≥ 1, so 0 < f ≤ 1; f never reaches 0.","wrong":"Not quite. The bottom is at least 1."},{"level":"hard","question":"The range of f(x) = (x + 1)/(x − 1), x ≠ 1, is…","options":["R except −1","R","R except 1"],"answer":2,"right":"Correct. y = (x + 1)/(x − 1) gives x = (y + 1)/(y − 1), needs y ≠ 1.","wrong":"Not quite. Solve for x in terms of y."},{"level":"hard","question":"The range of f(x) = x² − 6x + 10 for 0 ≤ x ≤ 5 is…","options":["5 ≤ y ≤ 10","1 ≤ y ≤ 5","1 ≤ y ≤ 10"],"answer":2,"right":"Correct. (x − 3)² + 1: least 1 at x = 3, greatest f(0) = 10.","wrong":"Not quite. Complete the square and check the ends."},{"level":"hard","question":"The largest domain of f(x) = √(x − 2) + 1/√(5 − x) is…","options":["2 ≤ x < 5","2 < x ≤ 5","2 ≤ x ≤ 5"],"answer":0,"right":"Correct. x − 2 ≥ 0 and 5 − x > 0.","wrong":"Not quite. The second root is in a denominator."},{"level":"hard","question":"If f(x) = x² and the codomain is R, f is…","options":["not onto: negatives are missed","onto","not a function"],"answer":0,"right":"Correct. The range is y ≥ 0, smaller than R.","wrong":"Not quite. Compare range and codomain."},{"level":"hard","question":"f(x) = 3x − 2 on −1 ≤ x ≤ 2. Range?","options":["−1 ≤ y ≤ 2","−5 ≤ y ≤ 2","−5 ≤ y ≤ 4"],"answer":2,"right":"Correct. f(−1) = −5, f(2) = 4.","wrong":"Not quite. A straight line: check the ends."},{"level":"hard","question":"The range of f(x) = |x − 1| + 2 on R is…","options":["y ≥ 1","y ≥ 3","y ≥ 2"],"answer":2,"right":"Correct. Least value 2 at x = 1.","wrong":"Not quite. A modulus is at least 0."},{"level":"hard","question":"The range of f(x) = 4/(x² + 2) on R is…","options":["0 < y ≤ 4","0 < y ≤ 2","y ≥ 2"],"answer":1,"right":"Correct. Greatest 4/2 = 2 at x = 0; it approaches 0.","wrong":"Not quite. The bottom is at least 2."},{"level":"hard","question":"Which is NOT a function from R to R?","options":["y² = x","y = x³","y = |x|"],"answer":0,"right":"Correct. x = 4 gives y = ±2: two images.","wrong":"Not quite. Look for one x with two y."}]},{"type":"keywords","id":"words","title":"Key words","items":[{"word":"Function","meaning":"A rule giving each element of the domain exactly one image."},{"word":"Domain","meaning":"The set of inputs of a function."},{"word":"Codomain","meaning":"The set in which the outputs must lie."},{"word":"Range","meaning":"The set of outputs actually reached."},{"word":"Image","meaning":"The output f(x) of one input x."},{"word":"Variable","meaning":"A letter that can take different values."}]},{"type":"checklist","id":"check","title":"I can…","items":["say what makes a rule a function","find the largest domain of a formula","find the range of a simple function from its graph"]},{"type":"sources","id":"sources","title":"Sources","items":["NIE Sri Lanka, G.C.E. (A/L) Combined Mathematics syllabus, Grade 12 and 13, 2017 (competency level I 2.1)."]}],"slug":"functions-domain-codomain-range"},"overlay":null}