Relations and Functions
- Relations, Functions and Evaluating Them
- Domain and Range
- Special Functions: Piecewise, Absolute Value and Greatest Integer
- Even and Odd Functions and Graph Transformations
- Composition of Functions and the Inverse Function
- Slope, Rate of Change and Linear Models
Relations, Functions and Evaluating Them
- Tell a function from a general relation
- Evaluate a function at a given number
- Avoid sign errors when substituting
Relations and functions
A relation is a set of ordered pairs (input, output). The first number is the input and the second is the output.
A relation is a function when every input is paired with exactly one output. Think of a machine: you put in a number and always get one fixed result.
A relation can be shown as ordered pairs, a table, an arrow diagram, an equation or a graph; the same rule applies to all of them.
- To test a relation written as pairs: look for an input that repeats with two different outputs. If there is one, it is not a function.
- A repeated output is fine: two different inputs may give the same output.
- On a graph: a vertical line stands for one input, so if it meets the curve more than once that input has more than one output, and the graph is not a function.
Evaluating a function
The symbol is read "f of x" and is the output when the input is x. It does not mean f times x.
To find , replace every x in the rule by 3. If the number is negative, put it in brackets so the sign is not lost.
The input may be an expression, not a number, such as : put the whole expression in brackets in place of x. If then .
Laws and rules
Worked examples
Show the solution
- In the first relation the inputs 2, 3 and 5 are different, so each input has one output.
- The output 4 appears with two different inputs, which is allowed.
- In the second relation the input 2 appears with the outputs 4 and 7, so this input has two outputs.
Show the solution
- Substitute in brackets: .
- and .
- .
Show the solution
- .
- .
- .
- Thinking a relation is not a function because an output repeats. What matters is an input repeating with different outputs.
- Writing . In fact but , so use brackets when substituting a negative number.
- Reading as multiplication. It names the output at input x.
- Writing . Substituting changes the input inside the rule, so replace x by the whole expression in brackets.
- A function gives every input exactly one output.
- A repeated output is allowed; a repeated input with different outputs is not.
- To evaluate, substitute into the rule and use brackets for negative numbers.
Domain and Range
- Find the domain and range from pairs
- Exclude values that make a function undefined
- Find the range of a simple quadratic
What are domain and range?
The domain is the set of all allowed inputs and the range is the set of all outputs that come out.
For a set of ordered pairs, the domain is the first numbers and the range is the second numbers, each written once.
On a graph, the domain is how far the curve stretches horizontally along the x-axis, and the range is how far it stretches vertically along the y-axis.
Domain restrictions
The domain is all real numbers unless something forbids a value; so the domain of a polynomial such as is all real numbers. Two things forbid most often:
- A denominator can not be zero: set it equal to zero and exclude those solutions.
- The expression under a square root can not be negative: put the expression under the root and solve the inequality.
Finding the range
Ask what smallest or largest value the output can reach. For example is never negative, so its smallest value is 0. Multiplying by reverses the direction, so is never positive.
Then adding or subtracting a number moves that limit up or down: the range of is every number not more than 4.
Laws and rules
Worked examples
Show the solution
- Domain: the first numbers: 1, 2 and 3.
- Range: the second numbers: 5, 7 and 5.
- Do not repeat a value: the range is 5 and 7 only.
Show the solution
- Root: the expression under it is not negative, so and .
- Denominator: , so and .
- The number is below , so it is already excluded; only 2 remains to exclude.
Show the solution
- for every real number x.
- Multiply by and the direction flips: .
- Add 4: .
- The value 4 is reached at .
- Simplifying the fraction before finding the domain. Exclude the denominator values of the function as it was written: simplifies to , but 2 stays excluded.
- Mixing domain with range. Domain is the first numbers, range the second, each written once.
- Thinking the range of is . The negative sign makes 4 the largest value, not the smallest.
- Domain: all allowed inputs. Range: all outputs.
- Exclude zeros of the denominator and square roots of negatives.
- For the range, find the largest or smallest value, and watch a negative sign.
Special Functions: Piecewise, Absolute Value and Greatest Integer
★ Key- Evaluate a piecewise function by choosing the right rule
- Solve absolute value equations
- Use the greatest integer function and step functions
Piecewise functions
It has several rules, each with a condition on x. To evaluate at a number: see which condition the number satisfies, then use that rule only.
Watch the boundary: if the condition is then 2 uses this rule; if it is then it does not.
Absolute value
The absolute value of a number is its distance from zero, so it is never negative: and . It is a piecewise function: when and when .
The graph of has two straight arms that meet at a vertex and open upward. The vertex is where the expression inside the absolute value becomes zero: , and there , so the vertex is .
It can be written as a piecewise function: when , and when . Its value at is .
To solve with : either or , so there are usually two solutions.
Greatest integer and step functions
is the greatest integer not more than x. Examples: , , . For negative numbers we move down, not toward zero.
Its graph looks like stairs, so it is called a step function: the value is 2 for every x in , with a filled dot at the start and an open circle at the end, and then the function jumps to 3.
Step functions appear in situations like "per hour or part of an hour": any part of an hour counts as a full hour, so we round up.
Laws and rules
Worked examples
Show the solution
- 2 satisfies , so use : .
- 0 satisfies , so use : .
- The sum is .
Show the solution
- Case 1: , so and .
- Case 2: , so and .
- Check: and .
Show the solution
- 2 hours 10 minutes is more than 2 hours, and the extra part counts as a full hour.
- The counted hours are 3.
- The cost is riyals.
- In a piecewise function: substituting in both rules. Pick only the rule whose condition the number satisfies, and watch versus at the boundary.
- In an absolute value equation: giving one solution to (it has two cases, positive and negative), or finding two for (an absolute value is never negative, so there is no solution).
- Thinking . The greatest integer not above is .
- In step situations: rounding a part of an hour down. "Or part of it" means round up.
- Piecewise: use the rule whose condition x satisfies.
- gives two cases: or .
- is the greatest integer not above x; for a negative non-integer the result is further from zero.
- "Or part of it" means the part counts as a whole.
Even and Odd Functions and Graph Transformations
- Decide whether a function is even, odd or neither
- Use the odd property to find a value
- Describe a shift from the rule
Even and odd functions
Replace x with in the rule. If the function does not change, that is , it is even and its graph is symmetric about the y-axis, like . If it becomes , the opposite in sign, it is odd and its graph is symmetric about the origin, like .
If neither happens, the function is neither even nor odd.
A quick rule for polynomials: if every power of x is even (a constant counts as an even power) the function is even; if every power is odd it is odd; if both kinds appear it is neither even nor odd.
Graph transformations
We start from the graph of and change the rule slightly to get a shift or a reflection.
Adding outside the bracket moves the graph vertically, as you expect. Adding inside the bracket moves it horizontally, in the opposite direction to what you expect.
- : shift k units up. : shift k units down.
- : shift k units left. : shift k units right.
- : reflect in the x-axis. : reflect in the y-axis.
- : if the graph is stretched vertically, moving away from the x-axis; if it is squashed toward it.
Laws and rules
Worked examples
Show the solution
- An odd function satisfies .
- At : .
- .
Show the solution
- , so f is even.
- .
- This is not , and not .
Show the solution
- inside the bracket: shift 2 units right.
- outside the bracket: shift 3 units up.
- The vertex of is , so it moves to .
- Thinking moves the graph to the right. The sign inside the bracket works backwards: means left.
- Thinking a function is even because it contains . Every term must have an even power; has an odd term, so it is neither even nor odd.
- For an odd function writing . The sign flips, so it is .
- Mixing up and . The first changes the sign of the output (a reflection in the x-axis); the second changes the sign of the input (a reflection in the y-axis).
- Even: . Odd: .
- If neither holds, it is neither even nor odd.
- shifts left; shifts right.
- Adding outside the bracket shifts vertically in the natural direction.
Composition of Functions and the Inverse Function
★ Key- Compute the composition of two functions in the correct order
- Find the rule of the inverse function
- Check an inverse by substitution
Composition of functions
Composing two functions means the output of the first becomes the input of the second. We write , read "f after g".
Always start with the inner function (the one inside the bracket), then put its result into the outer function. Order matters: is usually different from .
The inverse function
The inverse takes an output back to its input: if then . It undoes what f does.
To find the rule: write , swap x and y, then solve for y. The graph of the inverse is the reflection of the graph of f in the line .
A function has an inverse function only if it is one-to-one, that is, no output comes from two different inputs (any horizontal line meets the graph at most once). So on all numbers has no inverse, because and give the same output 4.
Domain and range swap places: the domain of is the range of f, and its range is the domain of f.
A value of the inverse without its rule
To find , look for the input that gives the output 7. If then , so , that is .
Laws and rules
Worked examples
Show the solution
- and .
- .
- .
Show the solution
- .
- Put into f: .
- .
- Check at : and , and .
Show the solution
- Write .
- Swap x and y: .
- Solve for y: , so .
- Check: and .
- Reversing the order of composition: means apply g first, then f.
- Thinking means . The exponent here marks the inverse function, not the reciprocal.
- When finding the inverse: forgetting to swap x and y, or moving a term wrongly. Always check with one number.
- : start from the inner function.
- Order matters: is usually not equal to .
- Inverse: write y, swap x and y, solve for y.
- undoes f, and its graph is the reflection of f in .
Slope, Rate of Change and Linear Models
★ Key- Find the slope of a line from two points
- Find the average rate of change of a function over an interval
- Build a linear model from a situation or a table
Slope
Slope measures steepness: how much y changes when x increases by 1. It equals the vertical change divided by the horizontal change between any two points on the line.
Take the differences in the same order on top and bottom. If you start with one point on top, start with it at the bottom too.
The sign of the slope gives the direction: a positive slope means y grows with x, a negative slope means it falls, and a horizontal line has slope zero. A vertical line has no defined slope because the horizontal change is zero.
Average rate of change
For any function, the average rate of change over the interval is the slope of the line joining the points and on its graph. It tells us how much the function changes on average for each unit of x.
If the function is linear, its average rate of change is the same on every interval and equals its slope.
Linear models and tables
Many situations have a fixed amount and a steady change, written : m is the change per unit (the slope) and c is the value at .
Example: a taxi charges 5 riyals fixed plus 2 riyals per kilometre: , and for 10 km: riyals.
In a table: if y rises by a constant amount each time x rises by 1, the pattern is linear, and that constant is the slope. To find c, substitute a known point: . If the slope is negative, the decrease is steady.
Laws and rules
Worked examples
Show the solution
- Vertical change: .
- Horizontal change: .
- Slope .
Show the solution
- .
- .
- Rate .
Show the solution
- Differences: and , so the slope is 3.
- The model is . At : , so .
- , and at : .
- Check at : .
Show the solution
- Slope = change in amount ÷ change in time: litres per minute.
- The starting value at is , so the model is .
- The tank is empty when : , so .
- Check at : .
- Reversing the order in one of the differences: is wrong. Start from the same point on top and bottom.
- In a table: multiplying the slope by x only and forgetting the constant, which gives , wrong here.
- For average rate of change: not finding the two values of f first, or adding the values instead of subtracting.
- Slope = vertical change ÷ horizontal change.
- Average rate of change on = .
- Linear model : m per unit, c the starting value.
- In a table: the constant difference is the slope, then fix the constant with one point.