Arena 99 · Lessonsالعربية
Lessons › Mathematics

Relations and Functions

Book: رياضيات 4، رياضيات 5 · 6 lessons
  1. Relations, Functions and Evaluating Them
  2. Domain and Range
  3. Special Functions: Piecewise, Absolute Value and Greatest Integer
  4. Even and Odd Functions and Graph Transformations
  5. Composition of Functions and the Inverse Function
  6. Slope, Rate of Change and Linear Models
1

Relations, Functions and Evaluating Them

What you will learn
  • 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.

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 .

12324inputsoutputsa function: one output per input
A relation that is a function: inputs 1 and 2 share the output 2, which is allowed because each input has only one output.

Laws and rules

Value of a functiona is the input; the result is the output.

Worked examples

Which of these relations is a function: or ?
Show the solution
  1. In the first relation the inputs 2, 3 and 5 are different, so each input has one output.
  2. The output 4 appears with two different inputs, which is allowed.
  3. In the second relation the input 2 appears with the outputs 4 and 7, so this input has two outputs.
Answer: The first is a function; the second is not.
If , find .
Show the solution
  1. Substitute in brackets: .
  2. and .
  3. .
Answer:
If , find .
Show the solution
  1. .
  2. .
  3. .
Answer: 12
Common mistakes
  • 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.
Summary
  • 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.
Test yourself on this lesson · freePractise this lesson in the app
2

Domain and Range

What you will learn
  • 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:

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.

xymaximum = 4range: every value up to 4
The downward parabola : its highest point is 4, so the range is every number not more than 4.

Laws and rules

Fraction ruleExclude every number that makes the denominator zero.
Root ruleThe square root of a negative number is not defined in the real numbers.

Worked examples

Find the domain and range of .
Show the solution
  1. Domain: the first numbers: 1, 2 and 3.
  2. Range: the second numbers: 5, 7 and 5.
  3. Do not repeat a value: the range is 5 and 7 only.
Answer: Domain , range
Find the domain of .
Show the solution
  1. Root: the expression under it is not negative, so and .
  2. Denominator: , so and .
  3. The number is below , so it is already excluded; only 2 remains to exclude.
Answer: and , that is
Find the range of .
Show the solution
  1. for every real number x.
  2. Multiply by and the direction flips: .
  3. Add 4: .
  4. The value 4 is reached at .
Answer: Range
Common mistakes
  • 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.
Summary
  • 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.
Test yourself on this lesson · freePractise this lesson in the app
3

Special Functions: Piecewise, Absolute Value and Greatest Integer

★ Key
What you will learn
  • 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.

xyvertex (3, 1)(-2, 6)
The graph of : its vertex is and the two arms are symmetric about it.

Laws and rules

Absolute valueand it equals if .
Absolute value equationb is not negative. If b is negative there is no solution.
Greatest integer is the largest integer that does not exceed x.

Worked examples

If when and when , find .
Show the solution
  1. 2 satisfies , so use : .
  2. 0 satisfies , so use : .
  3. The sum is .
Answer: 4
Solve .
Show the solution
  1. Case 1: , so and .
  2. Case 2: , so and .
  3. Check: and .
Answer: or
A car park charges 3 riyals for each hour or part of an hour. How much does a driver pay for 2 hours 10 minutes?
Show the solution
  1. 2 hours 10 minutes is more than 2 hours, and the extra part counts as a full hour.
  2. The counted hours are 3.
  3. The cost is riyals.
Answer: 9 riyals
Common mistakes
  • 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.
Summary
  • 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.
Test yourself on this lesson · freePractise this lesson in the app
4

Even and Odd Functions and Graph Transformations

What you will learn
  • 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.

xyf(x)f(x+4)4 units left
The graph of is the graph of shifted 4 units to the left.

Laws and rules

Even functionSymmetric about the y-axis.
Odd functionSymmetric about the origin.

Worked examples

If f is an odd function and , find .
Show the solution
  1. An odd function satisfies .
  2. At : .
  3. .
Answer:
Classify and .
Show the solution
  1. , so f is even.
  2. .
  3. This is not , and not .
Answer: f is even; g is neither even nor odd.
How does the graph of move to become the graph of ? Where is the new vertex?
Show the solution
  1. inside the bracket: shift 2 units right.
  2. outside the bracket: shift 3 units up.
  3. The vertex of is , so it moves to .
Answer: 2 right and 3 up; the new vertex is .
Common mistakes
  • 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).
Summary
  • 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.
Test yourself on this lesson · freePractise this lesson in the app
5

Composition of Functions and the Inverse Function

★ Key
What you will learn
  • 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 .

finversey = xxy
The function and its inverse are reflections of each other in the dashed line .

Laws and rules

CompositionCompute g first, then f.
InverseThe inverse returns the original input.

Worked examples

If and , find and .
Show the solution
  1. and .
  2. .
  3. .
Answer: and
If and , find .
Show the solution
  1. .
  2. Put into f: .
  3. .
  4. Check at : and , and .
Answer:
Find the inverse of .
Show the solution
  1. Write .
  2. Swap x and y: .
  3. Solve for y: , so .
  4. Check: and .
Answer:
Common mistakes
  • 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.
Summary
  • : 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 .
Test yourself on this lesson · freePractise this lesson in the app
6

Slope, Rate of Change and Linear Models

★ Key
What you will learn
  • 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.

xy(1, 3)(3, 11)run 2rise 8
The line through and : slope = rise 8 ÷ run 2 = 4.

Laws and rules

SlopeThe points are and .
Average rate of changeThe interval from a to b.
Linear modelm: change per unit; c: starting value.

Worked examples

A line passes through and . Find its slope.
Show the solution
  1. Vertical change: .
  2. Horizontal change: .
  3. Slope .
Answer: 4
Find the average rate of change of on .
Show the solution
  1. .
  2. .
  3. Rate .
Answer: 3
The values of y for are . Find y at if the pattern continues.
Show the solution
  1. Differences: and , so the slope is 3.
  2. The model is . At : , so .
  3. , and at : .
  4. Check at : .
Answer: 34
A tank held 120 litres of water, and after 4 minutes it held 80 litres. If the loss continues at a constant rate, write a linear model for the amount of water y (in litres) after x minutes, then find when the tank is empty.
Show the solution
  1. Slope = change in amount ÷ change in time: litres per minute.
  2. The starting value at is , so the model is .
  3. The tank is empty when : , so .
  4. Check at : .
Answer: , and the tank is empty after 12 minutes.
Common mistakes
  • 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.
Summary
  • 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.
Test yourself on this lesson · freePractise this lesson in the app