A linear function in math is a function that makes a straight line when you draw its graph. It shows a steady change between two values.
For example, if you earn $5 for every hour you work, your total pay grows at a constant rate. This is a simple example of a linear function.
A common formula for a linear function is f(x) = mx + b, where m is the slope and b is the y-intercept. Learning the linear function definition helps you understand equations, graphs, patterns, and real-life problems with ease.
1. What Is a Linear Function in Math?
A linear function is a rule that links an input to an output in a straight-line pattern. When you graph the function on a coordinate plane, the points form a straight line.
In math, the input is often called x, and the output is called y or f(x). You choose a value for x, use the function rule, and find the matching output.
For example:
[
f(x)=2x+1
]
This function tells you to multiply x by 2 and then add 1.
If (x=1), then:
[
f(1)=2(1)+1=3
]
If (x=2), then:
[
f(2)=2(2)+1=5
]
The input increases by 1, and the output increases by 2. This pattern continues at the same rate.
That steady change is a key feature of a linear function. Its graph is a straight line, and its slope stays constant.
2. Linear Function Formula
The most common formula for a linear function is:
[
f(x)=mx+b
]
You may also see it written as:
[
y=mx+b
]
Both forms describe the same type of relationship when the variables and constants have the same meanings.
Each part of the formula has a job.
- (x): The input value.
- (f(x)) or (y): The output value.
- (m): The slope, which tells you how fast y changes as x changes.
- (b): The y-intercept, which tells you where the line crosses the y-axis.
For example:
[
y=3x+2
]
Here, the slope is 3, and the y-intercept is 2.
When (x=0), the output is 2. Each time x increases by 1, y increases by 3.
The formula helps you calculate outputs, build tables, draw graphs, and solve many everyday problems.
Note: In some math courses, the term linear function is used for functions of the form (f(x)=mx), while (mx+b) is called an affine function when (b\ne0). In many school algebra courses, however, both forms are taught as linear functions.
3. What Is the Slope of a Linear Function?
The slope tells you how much a line rises or falls as you move from left to right.
It measures the change in y compared with the change in x.
The formula for slope is:
[
m=\frac{y_2-y_1}{x_2-x_1}
]
Here, ((x_1,y_1)) and ((x_2,y_2)) are two points on the line. The formula divides the change in y by the change in x.
For example, consider these two points:
[
(1,3)\quad \text{and}\quad (3,7)
]
Find the change in y:
[
7-3=4
]
Find the change in x:
[
3-1=2
]
Now divide:
[
m=\frac{4}{2}=2
]
The slope is 2. This means y increases by 2 whenever x increases by 1.
A slope can be positive, negative, or zero.
- Positive slope: The line rises from left to right.
- Negative slope: The line falls from left to right.
- Zero slope: The line is horizontal.
A vertical line has an undefined slope and cannot be written as (y=mx+b). It is not the graph of a function of x because one x-value would have many y-values.
4. What Is the Y-Intercept?
The y-intercept is the point where a graph crosses the y-axis.
At this point, the value of x is always zero.
In the formula:
[
y=mx+b
]
The value of (b) gives the y-coordinate of the y-intercept.
For example:
[
y=4x+3
]
Set (x=0):
[
y=4(0)+3=3
]
So, the graph crosses the y-axis at ((0,3)).
The y-intercept often represents the starting value in a real-life problem.
Imagine a taxi service that charges a starting fee of $4 and then adds $2 for every mile. The total cost can be written as:
[
C(x)=2x+4
]
Here, (x) is the number of miles, and (C(x)) is the cost in dollars.
The slope, 2, is the cost per mile. The y-intercept, 4, is the starting fee.
This makes the formula useful for understanding both the starting amount and the rate of change.
5. How to Graph a Linear Function
Drawing a linear function is easier when you use its formula to find a few points.
Let’s graph:
[
y=2x+1
]
Step 1: Choose values for x.
Use (x=-1, 0, 1,) and (2).
Step 2: Find each y-value.
Put each x-value into the formula.
| x | Calculation | y |
|---|---|---|
| -1 | (2(-1)+1) | -1 |
| 0 | (2(0)+1) | 1 |
| 1 | (2(1)+1) | 3 |
| 2 | (2(2)+1) | 5 |
Step 3: Plot the points.
Mark these coordinates on a graph:
[
(-1,-1),\ (0,1),\ (1,3),\ (2,5)
]
Step 4: Draw a straight line.
Connect the points with a straight line and extend it in both directions.
The result is the graph of the function.
<Graph expressions={[{“latex”:”y=2x+1″}]}/>
You can also graph a linear function by finding its y-intercept and using its slope. For (y=2x+1), start at ((0,1)). Then move 1 unit right and 2 units up to reach another point.
6. Examples of Linear Functions
Linear functions appear in many forms. Here are some simple examples.
Example 1: A basic linear function
[
f(x)=5x
]
The slope is 5, and the y-intercept is 0. Every time x increases by 1, the output increases by 5.
Example 2: A function with a starting value
[
f(x)=3x+4
]
The slope is 3, and the y-intercept is 4. The output starts at 4 when x is zero and rises by 3 for each increase of 1 in x.
Example 3: A decreasing function
[
f(x)=-2x+6
]
The slope is -2. As x increases by 1, the output falls by 2. The y-intercept is 6.
Example 4: A constant function
[
f(x)=7
]
This can also be written as (f(x)=0x+7). Its slope is zero, so its graph is a horizontal line.
Example 5: A real-life function
Suppose you save $10 each week and start with $20.
Your savings after (x) weeks can be modeled by:
[
S(x)=10x+20
]
After 4 weeks:
[
S(4)=10(4)+20=60
]
You would have $60, assuming you save the same amount each week and make no withdrawals.
These examples show how linear functions describe steady changes in numbers and real-life situations.
7. How to Tell If a Function Is Linear
You can use a few simple checks to decide whether a function is linear.
Check the formula. In the usual school form, a linear function can be written as:
[
f(x)=mx+b
]
The variable x has a power of 1. It is not multiplied by itself or placed inside a square root.
For example, (f(x)=4x+2) is linear. But (f(x)=x^2+2) is not linear because it contains (x^2).
Check the graph. A linear function makes a straight line. A curved graph is not linear.
Check the rate of change. When equal changes in x lead to equal changes in y, the function has a constant rate of change.
For example:
| x | y for (y=3x+1) | Change in y |
|---|---|---|
| 0 | 1 | — |
| 1 | 4 | +3 |
| 2 | 7 | +3 |
| 3 | 10 | +3 |
The output increases by 3 each time x increases by 1. This is a constant rate of change.
However, a table with a few points does not prove that an unknown function is linear unless the rule or context supports the pattern.
8. Linear Functions vs. Nonlinear Functions
A linear function has a straight-line graph and a constant rate of change. A nonlinear function does not have a straight-line graph over its full domain.
Nonlinear functions include many quadratic, exponential, and other types of functions.
Compare the examples below.
| Function | Type | Why? |
|---|---|---|
| (y=2x+3) | Linear | The graph is a straight line |
| (y=-x+5) | Linear | The slope is constant |
| (y=x^2) | Nonlinear | The graph is curved |
| (y=2^x) | Nonlinear | The rate of change is not constant |
| (y=1/x) | Nonlinear | The graph is not a straight line |
A linear function changes at a steady rate. A quadratic function such as (y=x^2) changes at a rate that depends on x.
For example, when x increases from 1 to 2, (x^2) increases from 1 to 4. When x increases from 2 to 3, it rises from 4 to 9. The changes are 3 and 5, so they are not equal.
This is a useful way to tell the two types apart.
9. Real-Life Uses of Linear Functions
Linear functions are useful because many situations involve a steady rate of change.
Shopping: If each notebook costs $3, the total cost of x notebooks is:
[
C(x)=3x
]
Buying 5 notebooks costs $15, before any extra fees or discounts.
Hourly pay: If you earn $12 per hour and have no extra pay or deductions, your earnings for x hours are:
[
P(x)=12x
]
Working 6 hours gives you $72.
Travel: If a vehicle travels at a steady speed of 50 miles per hour, its distance after x hours is:
[
D(x)=50x
]
After 3 hours, it travels 150 miles, assuming the speed stays constant.
Monthly costs: Suppose a service charges $8 per month plus a one-time setup fee of $15. The total cost after x months is:
[
C(x)=8x+15
]
After 4 months, the total is $47.
Linear models are also used in business, science, engineering, and data analysis. They help people estimate values, compare costs, and understand how one quantity changes when another changes.
Real-life situations are not always perfectly linear. A linear model works best when the rate stays constant over the range being studied.
10. Common Mistakes When Learning Linear Functions
Students often make a few common mistakes when working with linear functions. Knowing what to look for can make the topic easier.
Mistake 1: Mixing up slope and y-intercept.
In (y=3x+5), the slope is 3, and the y-intercept is 5. The slope describes the rate of change, while the y-intercept describes the starting value.
Mistake 2: Forgetting negative signs.
In (y=-2x+4), the slope is -2. The line falls as you move from left to right.
Mistake 3: Thinking every equation is linear.
An equation such as (y=x^2+1) is not linear because the variable is squared.
Mistake 4: Plotting points incorrectly.
A point ((2,5)) means move 2 units along the x-axis and 5 units along the y-axis. The first number is x, and the second is y.
Mistake 5: Confusing a function with its graph.
A function is a rule that assigns an output to each allowed input. Its graph is the set of points that show those input-output pairs.
To avoid these mistakes, write the formula clearly, identify the slope and intercept, check your calculations, and plot points carefully.
People Also Ask About Linear Function Definition Math
What is the simple definition of a linear function?
A linear function is a rule that produces a straight-line graph. In common school notation, it is written as (f(x)=mx+b), where m and b are constants.
What is the formula for a linear function?
The common formula is (f(x)=mx+b). The value m is the slope, and b is the y-intercept.
What is an example of a linear function?
An example is (f(x)=2x+3). Its graph is a straight line, its slope is 2, and its y-intercept is 3.
How do you know if a function is linear?
Check whether the function has a constant rate of change and a straight-line graph. In the usual algebraic form, it can be written as (f(x)=mx+b).
What does the slope mean in a linear function?
The slope tells you how much the output changes when the input increases by one unit. A positive slope rises, a negative slope falls, and a zero slope is horizontal.
Is (y=x^2) a linear function?
No. The function (y=x^2) is nonlinear because its graph is curved and its rate of change is not constant.
What is the difference between a linear function and a linear equation?
A linear function assigns one output to each allowed input and can be written as (f(x)=mx+b) in common school algebra. A linear equation is an equation involving variables to the first power, such as (2x+3y=6). Not every linear equation in two variables defines y as a function of x; for example, a vertical line does not.
Conclusion
The linear function definition in math describes a function that has a straight-line graph and a constant rate of change.
Its common formula is (f(x)=mx+b), where the slope shows how quickly the output changes and the y-intercept shows where the graph crosses the y-axis.
Linear functions help solve problems involving money, travel, savings, and other steady patterns. By learning the formula, plotting points, and checking the rate of change, you can recognize linear functions and understand how they work.

I am Amanda Green, turning simple words into blooming puns and colorful jokes here at Punzbloom.
I write humor that’s light, witty, and made to brighten your mood.



