Back to homeMathematics · Integrated Math I · Change subject
Start for free
Math I · Mathematics
Functions · Functions

Concept of a Function

The battery on your phone drops while you play a game. A streaming plan costs more the longer you subscribe. A hiker's altitude changes as she walks up a trail. In each case one quantity depends on another. When every value of the first gives exactly one value of the second, you have a function. By the end of this page you will be able to say exactly why the battery example is one.

What is a function?

A relation is any rule that pairs numbers (or objects) together. A function is a special relation where nothing is ambiguous.

Think of a function as a machine: you drop in one number and exactly one number comes out.

A function drawn as a machine: the input x = 3 goes in, the rule f(x) = 2x + 1 is applied, and the single output f(3) = 7 comes out. fthe "machine" x = 3 f(3) = 7 f(x) = 2x + 1: one number goes in, ONE comes out

Here is the same idea with arrows. On the left every input has one arrow, so it is a function (two inputs may share an output). On the right the input $1$ has two arrows, so it is not.

Two mapping diagrams. On the left each input has exactly one arrow, so it is a function. On the right the input 1 has two arrows, so it is not a function. 123 35 input → output function 12 357 input → output not a function
Practice★☆☆Not started
In an app store, each premium game has a fixed price of $\$2,50…

In an app store, each premium game has a fixed price of $\$2,50$. We want to analyse the relationship between the number of games bought and the total cost of the purchase.

  1. a) Identify which is the independent variable and which is the dependent variable.
  2. b) Is this relationship a function? Give reasons for your answer based on the definition of a function.
  3. c) Write the algebraic expression (formula) that relates both quantities, calling $x$ the number of games and $y$ the total cost.
Solve
Practice★☆☆Not started
Observe the following relationships between quantities and determine, in each case, whether it is a function or not: a) Each mobile phone number is associated with its…

Observe the following relationships between quantities and determine, in each case, whether it is a function or not:

  1. a) Each mobile phone number is associated with its owner's name in the contacts.
  2. b) Each student in your class is associated with their height measured in inches.
  3. c) Each barcode in a supermarket is associated with the price of the corresponding product.
  4. d) Each person is associated with the eye color of their siblings.
Solve
Practice★★☆Not started
In a middle school, different relationships between quantities are being analysed. Determine with reasons which of the following situations correspond to a function and,…

In a middle school, different relationships between quantities are being analysed. Determine with reasons which of the following situations correspond to a function and, if so, identify the independent variable and the dependent variable:

  1. a) Each student's ID number is associated with their current age.
  2. b) Each maximum temperature reached in the playground during a day is associated with the times at which that temperature was recorded.
  3. c) The amount of gigabytes ($GB$) consumed on a mobile plan is associated with the monthly price of the bill.
  4. d) Each natural number is associated with its divisors.
Solve

Four ways to describe a function

The same function can be shown in four ways. Take a streaming plan that charges a $\$5$ activation fee plus $\$9$ per month.

Way Example
Words "$\$5$ to sign up and $\$9$ for each month"
Table months: 1, 2, 3, 4 → total cost: 14, 23, 32, 41
Formula $y = 9x + 5$
Graph points on a line in the coordinate plane

The formula is the most powerful form because it lets you calculate any value. To write one from a situation, ask two questions: what is paid only once? (that is the constant) and what repeats for every unit of $x$? (that multiplies $x$).

A formula can also be read. In $H(d) = 400 + 150d$ (altitude in feet after $d$ miles of hiking), the $400$ is the starting value (the altitude when $d = 0$) and the $150$ is the change for each unit of $d$ (the hiker climbs $150$ ft per mile). The same works with formulas from geometry: if a rectangle's base is $3$ times its height $x$, then its area is $A(x) = x \cdot 3x = 3x^2$.

Practice★☆☆Not started
A hiker climbs a mountain following a path. The function that relates their altitude above sea level, $H$ (in feet), to the horizontal distance travelled, $d$ (in…

A hiker climbs a mountain following a path. The function that relates their altitude above sea level, $H$ (in feet), to the horizontal distance travelled, $d$ (in miles), is $H(d) = 400 + 150d$.

  1. a) At what altitude is the starting point of the route ($d = 0$)?
  2. b) If the hiker has travelled $3$ miles horizontally, at what altitude are they?
  3. c) Identify the variables of the function and explain their physical meaning.
Solve
Practice★★☆Not started
An electric scooter rental company charges a fixed fee of $\$1,20$ to unlock the vehicle and a variable fee of $\$0,15$ for each minute of use. a) Identify the two…

An electric scooter rental company charges a fixed fee of $\$1,20$ to unlock the vehicle and a variable fee of $\$0,15$ for each minute of use.

  1. a) Identify the two variables involved and classify them as dependent and independent.
  2. b) Write the analytical expression or formula that allows calculating the total cost of the rental, $y$, in terms of the time of use in minutes, $x$.
  3. c) Calculate how much a student will pay who uses the scooter for $22$ minutes to go from their house to the school.
Solve
Practice★★☆Not started
The area of a rectangle whose base is twice its height can be expressed as a function. a) If we call $x$ the measure of the height of the rectangle, write the analytical…

The area of a rectangle whose base is twice its height can be expressed as a function.

  1. a) If we call $x$ the measure of the height of the rectangle, write the analytical expression of the area function $A(x)$.
  2. b) Which is the independent variable and which is the dependent one?
  3. c) Calculate the area when the height is $4,5$ $cm$.
  4. d) If the area of the rectangle is $50$ $cm^2$, what is its height?
Base = twice the height A(x) x 2x
Solve

Function notation and evaluating

The symbol $f(x)$ is the output of the function $f$ when the input is $x$. To find $f(a)$, substitute $a$ for every $x$ in the formula and calculate, following the order of operations.

Some problems call the output $f(a)$ the image of $a$, and the input $a$ the pre-image of that output. In this page we just say input and output.

Practice★☆☆Not started
Given the function defined by the algebraic expression $f(x) = 3x - 2$, complete the following table of values in your exercise book: | $x$ (Input) | $-2$ | $-1$ | $0$ |…

Given the function defined by the algebraic expression $f(x) = 3x - 2$, complete the following table of values in your exercise book:

$x$ (Input) $-2$ $-1$ $0$ $1$ $2$
$f(x)$ (Output)

Once completed, state what the image of $x = -1$ is.

Solve
Practice★★☆Not started
Given the function $f(x) = \frac{x^2 - 4}{2}$, carry out the following tasks: a) Calculate the images of the values $x = 0$, $x = 2$ and $x = -4$. b) Determine the value…

Given the function $f(x) = \frac{x^2 - 4}{2}$, carry out the following tasks:

  1. a) Calculate the images of the values $x = 0$, $x = 2$ and $x = -4$.
  2. b) Determine the value of $x$ (pre-image) whose image is $f(x) = 6$.
  3. c) Does the point $P(-1, -1.5)$ belong to the graph of the function? Justify your answer by performing the necessary calculations.
Solve
Practice★★★Not started
A water tank has the shape of an inverted cone. It is being filled with water at a constant rate. The relationship between the volume of water ($V$) and the height the…

A water tank has the shape of an inverted cone. It is being filled with water at a constant rate. The relationship between the volume of water ($V$) and the height the water reaches ($h$) is given by the function:

$$V(h) = \frac{1}{3} \cdot \pi \cdot (0,5h)^2 \cdot h$$
  1. a) Simplify the expression of the function $V(h)$.
  2. b) Is it a linear function? Justify your answer by observing the degree of the variable $h$.
  3. c) Calculate the pre-image of $V = \frac{2\pi}{3}$, that is, the height $h$ needed to have that volume.
  4. d) If the tank has a total height of $4 metros$, what is the domain and the range of the function in this situation?
Solve

Tables and plotted points

A table lists pairs $(x, y)$. It describes a function when no input $x$ appears with two different outputs. A table can have repeated outputs, but never a repeated input with different outputs.

To graph a table, plot each pair as a point. Then ask: should I connect the points? That depends on what $x$ can be.

Left: separate dots for the cost of 1 to 4 movie tickets. Right: a continuous line for the gallons left in a draining tank over time. Whole tickets only: separate dots Any time works: connect the points
  • If $x$ counts whole things (movie tickets, months, games), only whole numbers make sense, so you plot separate points (a discrete function).

  • If $x$ can be any value in between (time, distance, weight), you can connect the points with a line or curve (a continuous function).

Practice★☆☆Not started
The price of a monthly subscription to a streaming service is $\$9$, but the first month has an offer and only costs $\$3$. a) Create a table relating the number of…

The price of a monthly subscription to a streaming service is $\$9$, but the first month has an offer and only costs $\$3$.

  1. a) Create a table relating the number of months subscribed (from $1$ to $4$ months) to the total accumulated expense.
  2. b) Plot these four points on a Cartesian coordinate system.
  3. c) Does it make sense to join the points with a continuous line? Explain why.
Solve
Practice★★☆Not started
The following table shows the amount of water (in gallons) remaining in a portable swimming pool while it is being emptied by an extraction pump: | Time (minutes) | 0 |…

The following table shows the amount of water (in gallons) remaining in a portable swimming pool while it is being emptied by an extraction pump:

Time (minutes) 0 5 10 15 20
Water (gallons) 4500 3600 2700 1800 900
  1. a) Is it a functional relationship? Explain why.
  2. b) Plot the points on a coordinate axis system choosing a suitable scale.
  3. c) If the trend remains constant, how long will it take for the pool to empty completely?
  4. d) What volume of water will there be $12$ minutes after starting to empty it?
Solve
Practice★★★Not started
Observe the following table of values that relates two quantities, $A$ and $B$: | Quantity A ($x$) | -2 | -1 | 0 | 1 | 2 | | :--- | :---: | :---: | :---: | :---: | :---:…

Observe the following table of values that relates two quantities, $A$ and $B$:

Quantity A ($x$) -2 -1 0 1 2
Quantity B ($y$) 5 2 1 2 5
  1. a) Find an analytical expression (formula) that relates $y$ to $x$.
  2. b) State whether it is a function and justify why.
  3. c) Determine the points of intersection with the axes.
  4. d) If we expand the table with the value $x = 1$ and assign it $y = 3$, would it still be a function? Give reasons for your answer.
Solve

Reading graphs

Graphs tell stories. On a graph of "hiker's altitude vs. distance walked", a part that goes up is an uphill stretch, a flat part is level ground, and a part that goes down is a descent. When you read a graph, always ask first: what is on each axis, and in what units?

Graph of a hike with distance in miles on the horizontal axis and altitude in feet on the vertical axis, showing an uphill stretch, a level stretch, another uphill stretch to the peak, and a descent. distance (mi) altitude (ft) uphillleveluphilldownhill peak

Now go back to the phone battery from the start. If the horizontal axis is minutes of play and the vertical axis is battery percentage, then each minute has exactly one battery reading. That is why battery vs. time is a function.

Practice★☆☆Not started
Olivia is monitoring the battery consumption of her smartphone while playing a video game. The following graph shows the percentage of battery remaining according to the…

Olivia is monitoring the battery consumption of her smartphone while playing a video game. The following graph shows the percentage of battery remaining according to the time she has been playing (in minutes):

100 75 50 25 0 10 20 30 40 Time (min) Battery (%)

From the graph, answer:

  1. a) What percentage of battery did she have when she started playing (time = $0$)?
  2. b) How much battery does she have left after $20$ minutes of playing?
  3. c) If the battery reaches $0\%$, how many minutes has she been playing in total?
Solve
Practice★☆☆Not started
Observe the points plotted on the following Cartesian plane, which show the temperature of a greenhouse during the early hours of the morning: State the coordinates…

Observe the points plotted on the following Cartesian plane, which show the temperature of a greenhouse during the early hours of the morning:

0 1 2 3 4 5 5 10 15 20 25 Time (h) Temperature (°F) 11 16 21 23

State the coordinates $(x, y)$ of the four points marked on the graph and explain what each of them means in the context of the problem. (Example: At time $1$, the temperature is... ).

Solve
Practice★★☆Not started
A hiker records the percentage of battery remaining on their smartphone during a mountain walk. The resulting graph is as follows: Looking at the graph, answer: a) What…

A hiker records the percentage of battery remaining on their smartphone during a mountain walk. The resulting graph is as follows:

0% 20% 40% 60% 80% 100% 0 1 2 3 4 5 Time [h] Charge [%]

Looking at the graph, answer:

  1. a) What are the independent and dependent variables? State the units of measurement.
  2. b) What was the battery percentage at the start of the walk?
  3. c) Is it an increasing or decreasing function? What physical meaning does this have in the context of the problem?
  4. d) Estimate how much time has passed when the phone has exactly $50$% of charge left.
Solve

The vertical line test

A graph shows a function if every vertical line crosses it at most once. If some vertical line crosses it twice, then one $x$ has two $y$-values, and that breaks the definition.

The vertical line test on two graphs. A curve crossed by a vertical line at one point is a function. A circle crossed by a vertical line at two points is not a function. a function not a function

You can also test an equation without a graph. Pick an $x$ and see how many $y$-values come out.

  • $y = x^2$: for $x = 4$, $y = 16$ only. One output, so it is a function.

  • $x = y^2$: for $x = 4$, $y = 2$ or $y = -2$. Two outputs, so it is not a function.

  • $x^2 + y^2 = 25$ (a circle): for $x = 3$, $y = 4$ or $y = -4$. Not a function.

  • A vertical line like $x = 4$ passes through many points with the same $x$, so it is not a function. A horizontal line like $y = 3$ is a function (every input gives $3$).

Practice★☆☆Not started
For a graph to represent a function, any vertical line we draw must intersect the graph at a single point. Use this "vertical line test" to decide which of the following…

For a graph to represent a function, any vertical line we draw must intersect the graph at a single point. Use this "vertical line test" to decide which of the following graphs is NOT a function:

x y x y x y 1 point 2 points 1 point A B C

Justify your choice by explaining what happens in the chosen graph when drawing a vertical line.

Solve
Practice★★☆Not started
Observe the following graphs plotted on the Cartesian plane. Using the vertical line test, state with reasons which of them represents a function and which does not.

Observe the following graphs plotted on the Cartesian plane. Using the vertical line test, state with reasons which of them represents a function and which does not.

x y 1 point Graph A x y 2 points Graph B
Solve
Practice★★★Not started
Analyze the following graphs and determine whether they represent a function or not. Justify your answer using the concept of the relationship between independent and…

Analyze the following graphs and determine whether they represent a function or not. Justify your answer using the concept of the relationship between independent and dependent variables.

  1. a) $x^2 + y^2 = 25$ (A circle of radius 5 centered at the origin).
  2. b) $y = \sqrt{x}$ (Considering only the positive root).
  3. c) A vertical line on the Cartesian plane passing through $x = 4$.
  4. d) A horizontal parabola whose equation is $x = y^2$.
x y x y x y x y r = 5 a) x² + y² = 25 b) y = √x c) x = 4 d) x = y²
Solve

Domain and range

Not every number can be used as an input, and not every number can come out.

Three things restrict the domain:

  1. The context. You cannot have a negative length or $2.5$ tickets.

  2. Division by zero. Any $x$ that makes a denominator $0$ is not allowed.

  3. A condition given in the problem (for example, "from 6 to 60 minutes").

Practice★★☆Not started
Consider the relationship that associates each integer $x$ with its modulus plus three units, that is, $y = |x| + 3$. a) Create a table of values for the integers…

Consider the relationship that associates each integer $x$ with its modulus plus three units, that is, $y = |x| + 3$.

  1. a) Create a table of values for the integers between $-3$ and $3$.
  2. b) Plot the points obtained on a Cartesian coordinate system.
  3. c) Does it make sense to join the points with a continuous line if the statement says that $x$ is an integer? Explain why.
  4. d) State what the range (set of values taken by the dependent variable) would be based on your table and graph.
Solve
Practice★★★Not started
A video game programmer is designing the reward system for a new level. The amount of "Star Credits" ($C$) a player receives depends on the time ($t$) in minutes it…

A video game programmer is designing the reward system for a new level. The amount of "Star Credits" ($C$) a player receives depends on the time ($t$) in minutes it takes to complete a mission, according to the relationship:

$$C(t) = \frac{600}{t-5}$$
  1. a) State with reasons whether this relationship is a function for any value of $t$ greater than zero.
  2. b) If the minimum physical time to complete the mission is 6 minutes and the maximum allowed by the server is 60 minutes, determine the domain and the range of this function in this real-life context.
  3. c) What happens to the reward as the player approaches the time of 5 minutes? Would it make sense for the domain to include the value $t = 5$?
t=5 Time t (min) Credits C(t) C(t) = 600 / (t - 5) 6 20 40 60 600 400 200 10.9 Domain [6, 60] Range [10.9, 600]
Solve
Practice★★★Not started
We want to build a rectangular wooden frame for a mirror. We have a wooden batten of $4$ feet in total length to make the entire outline. a) If we call $x$ the length of…

We want to build a rectangular wooden frame for a mirror. We have a wooden batten of $4$ feet in total length to make the entire outline.

  1. a) If we call $x$ the length of the base of the frame (in feet), express the function $A(x)$ that calculates the area enclosed by the frame.
  2. b) What is the domain of this function taking into account the physical restrictions of the problem?
  3. c) Calculate the area when the base measures $0,5 m$ and when it measures $1,5 m$.
  4. d) For what value of $x$ is the maximum area obtained? What geometric shape does the frame have in that case?
Solve

Piecewise functions

Many real prices follow different rules in different ranges: "the first 10 are one price, after that another". A function with several formulas, each for its own part of the domain, is a piecewise function.

Graph of the music app cost: a steeper segment from 0 to 10 songs and a flatter segment from 10 to 20 songs, with points at 10 songs for 10 dollars and 20 songs for 15 dollars. 1020 1015 songs (n) cost (dollars)

To graph a piecewise function, graph each piece only on its own part of the domain, and check where the pieces meet.

Practice★★★Not started
Consider the relationship that associates each real number $x$ with its distance to the nearest integer. For example, if $x = 2,3$, its distance to the nearest integer…

Consider the relationship that associates each real number $x$ with its distance to the nearest integer. For example, if $x = 2,3$, its distance to the nearest integer (2) is $0,3$. If $x = 2,8$, its distance to the nearest integer (3) is $0,2$.

  1. a) Represent this relationship graphically in the interval $x \in [0, 3]$.
  2. b) Explain why this relationship is a function.
  3. c) Determine the range (image) of the function.
  4. d) Is it a periodic function? If so, state its period.
Solve
Practice★★★Not started
A drone courier company charges for its services as follows: a fixed cost of $\$5$ for administration and, in addition, $\$2$ for each pound of weight. However, if the…

A drone courier company charges for its services as follows: a fixed cost of $\$5$ for administration and, in addition, $\$2$ for each pound of weight. However, if the package exceeds $10 kg$, the cost per additional pound (only the pounds over 10) is halved.

  1. a) Express the function $P(x)$ that represents the total price of the delivery in terms of the pounds $x$ of the package. Note: the function must have two expressions (a piecewise function).
  2. b) Calculate $P(8)$ and $P(15)$.
  3. c) Plot the graph of the function.
  4. d) If a customer has paid $\$31$, how many pounds did their package weigh?
Weight (lb) Price ($) 0 5 8 10 15 16 20 5 10 21 25 30 31 40 P(x) = 5 + 2x P(x) = 15 + x P(8)=21 P(15)=30 P(16)=31
Solve
Practice★★★Not started
A mobile phone company offers a plan for teenagers called "Gamer Pro". The monthly cost ($C$) in dollars depends on the Gigabytes ($g$) consumed: The first $20 GB$ are…

A mobile phone company offers a plan for teenagers called "Gamer Pro". The monthly cost ($C$) in dollars depends on the Gigabytes ($g$) consumed:

  • The first $20 GB$ are free (included in the fixed fee of $\$15$).

  • From $20 GB$ onwards, each extra Gigabyte costs $\$1,5$, but only up to a maximum of $50 GB$ of total consumption.

  • If more than $50 GB$ are consumed, the speed is reduced and nothing more is charged.

  1. a) Plot the graph of the function $C(g)$ for a consumption between $0$ and $80 GB$.
  2. b) Define the function using a piecewise analytical expression.
  3. c) State the intervals where the function is constant and where it is increasing.
  4. d) What is the domain and the range of this function?
0 10 30 40 60 70 80 10 20 30 40 50 70 20 50 15 60 Consumption (GB) Cost ($) C(g)
Solve

Summary

See all the exercises in this section