What are Linear Functions? (Definition, Examples) - BYJUS

Linear Functions

Functions are relations that derive one output for each input for an operation. Linear functions are functions whose rules contain variables raised to 1. Learn the difference between linear functions. Here we will learn how to determine whether a function is linear or not and some methods to interpret functions....Read MoreRead Less

Select your child's grade in school:

What are Linear functions?

Definition: A linear function can be defined as an algebraic equation whose variables are raised to the power 1. The graph of a linear equation is a straight line. 

One of the most common examples of a linear function is \(y=mx+b \), where \(x\) and \(y\)  are variables and \(m\)  and \(b\)  are constants.

How do we determine whether a function is linear or not?

In order to determine whether a function is linear or not, we can simplify an equation to the closest possible form of \(y=mx+b\), The “m” in this equation is a constant, and represents the slope or gradient in the equation. 

We can find out the function’s linearity by graphing the equation as well. If the line on the graph is not a straight line, then it’s a nonlinear function.

How do we derive a Linear function?

A linear function can be found in two ways:

  • Using a graph
  • Using table of values

Using a graph:

When we observe a graph with a straight line, we can interpret a linear function.

graph1

By observing the graph, we can see that the line crosses the y-axis at 3 or (0, 3). Here the line slopes upward and to the right which means that the slope is positive. We can write a linear function from this graph. We already know that the linear function has to be in the form of y = mx + b.

Hence, we have to obtain the line’s slope (m) and the y-intercept (b) to form the linear function.

The line passes through (1,5) and (0,3)

So slope \(m=\frac{\text{change in}~ y}{\text{change in}~ x} = \frac{5-3}{1-0} = 2\)

The line crosses the y axis at (0,3) hence the y intercept (b) is 3. 

So the linear equation can be written as y = 2x + 3.

Using a table of values:

A linear function can be derived from a data table as well. Let us take an example where we have a table of data for the coordinates of x and y. In the following table, we have taken data ranging from -2 to 2 for x. Simultaneously, the data for y ranges from -1 to 7.

Now we can find the slope m, by taking two values (1, 5) and (0, 3)

\(m=\frac{\text{change in}~ y}{\text{change in}~ x} = \frac{5-3}{1-0} = 2\)

Once we find the slope, m, then we can use the value of the slope to find the linear equation.

graph2

In the table we can see that, when x = 0, y = 3. We know that when the line crosses the y axis, the x coordinate is zero and the value of the y coordinate at that point is the y intercept. Hence the y intercept “b” is 3. 

So the equation can be written as y = 2x + 3.

How to interpret a linear function?

Let us look at an example to better understand this concept. Terry bought some candies for herself. In 0 seconds, she ate 4 candies, in the next 2 seconds, she ate 8 candies, and in 4 seconds, she ate 12 candies.

 

We will now interpret this situation by creating a table and interpreting from there on to understand the rate of change.

graph3

From the above table, we can see that there is a constant rate of increase in the number of candies that Terry ate. We can write the linear function where the dependent variable, y is related with the independent variable, x. The point (0, 4) shows that the y-intercept is 4. We can use the points (0, 4) and (2, 8) to get the slope value.

 

\(m= \frac{\text{change in}~ y}{\text{change in}~ x} = \frac{(8-4)}{(2-0)} = 2\)

 

Slope = 2 also means that Terry had two candies every second. 

 

So, the linear function is \(y=2x+4\).

Learn More About Functions in This Video

Solved Linear Function Examples

Example 1: Amanda is renting her scooter out to her friends and its cost is represented by \(y=20x+40\), where \(x\) is the number of days. If she rents her scooter for 15 days, how much will she earn?

 

Solution: Here, Amanda is charging \(y=20x+40\) for renting her scooter.

 

To find the cost for 15 days, we will substitute \(x = 15\) in the linear function.

 

Thus, \( y= 20(15) + 40 \)

             \( = 300 + 40 \)

             \( = 340 \)

Amanda earns $340 for renting her scooter out for 15 days.

 

Example 2: Look at the following table and state if it’s forming a linear function or not.

 

graph4

 

Solution: Without creating a graph, we can decide whether the above table could form a linear function or not. In order to do that, we will need to check whether the table is showing a constant rate of change.

 

If we observe the x values, there is a constant rate of change, with each value increasing by +1. 

 

Now, if we observe the y values, the change is not constant. If we find the differences between the values, the first difference is -5 (7 – 12), the second difference is -3 (4 – 7), and the third difference is -1 (3 – 4). 

 

Hence, there is no constant rate of change for the y values. Thus, this is not a linear function. If we plot these values on a graph, we will not get a straight line.

 

Example 3: Determine whether the following graphs are linear or nonlinear.

 

graph5

 

Solution: By observing these two graphs, we can say that the first graph is that of a linear function, and the second graph is that of a nonlinear function.

This is because in the first graph the line drawn is straight. We know that when the data based on which the graph is plotted has a constant rate of change, then the plotted data will form a straight line.

 

Example 4: Fill the blanks for the following linear equation, \(y=3x-2\) in the following table.

 

graph6

 

Solution: Here, the linear equation is\(y=3x-2\). Now, we will substitute the values of x in the equation to fill the blanks in the table.

 

graph7

 

So, the final table will look like this:

 

graph8

Frequently Asked Questions on Linear Functions

A library charges a one-time fee of $50 for its members, if a member borrows only one book in a month. If more than 1 book is borrowed in a month, then $4 is charged additionally for every extra book that is borrowed by a member. So, the total expenses incurred by a member is \(y=4x+50\), where \(x\) is the number of extra(additional) books borrowed each month.

The slope of any linear equation measures the steepness of the line plotted on the graph. It is represented by the ratio of the constant rate of change between the y and x intercepts. It is given by \(m= \frac{(y_2- y_1)}{(x_2- x_1)}\) where \((x_1, y_1)\) are coordinates of the first point in the line, and \((x_2, y_2)\) are coordinates of the second point in the line.