Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Linear Functions Explained with Graphs and Real Examples

Reviewed by:
ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon

What Is a Linear Function Definition Formula Graph and How to Solve Problems

The concept of linear functions plays a key role in mathematics and is widely applicable to both real-life situations and exam scenarios. Understanding linear functions can help you solve equations, plot graphs, and model many real-life patterns—making it a fundamental topic for students in classes 8–12, as well as in JEE, NEET, and Olympiad preparation.


What Is a Linear Function?

A linear function is defined as a function that creates a straight line when graphed on a coordinate plane. The general form is \( f(x) = mx + c \) (or \( y = mx + c \)), where m is the slope and c is the y-intercept. Linear functions are used throughout mathematics in solving linear equations, understanding motion (constant speed), and business (cost vs. quantity problems).


Key Formula for Linear Functions

Here’s the standard formula: \( f(x) = mx + c \)


Where:
m = slope (rate of change)
c = y-intercept (where the line crosses the Y-axis)
x = independent variable
f(x) or y = dependent variable


Key Properties of Linear Functions

Property Explanation
Degree Always 1 (the highest exponent of x)
Graph Shape Straight Line
Rate of Change Constant (given by slope m)
Y-Intercept Where the line crosses the Y-axis (value c)
One Variable Standard linear function involves one independent variable

Forms of Linear Function Equations

Form Equation Usage
General \( ax + by + c = 0 \) Works for one or two variables
Slope-Intercept \( y = mx + c \) Most popular form for graphing
Point-Slope \( y - y_1 = m(x - x_1) \) Best if a point and slope are known
Intercept \( x/a + y/b = 1 \) Highlights intercepts easily

Graphing Linear Functions

To graph a linear function such as \( f(x) = 2x + 1 \):

  1. Choose any two x-values (for example, x = 0 and x = 2).
  2. Calculate y for each x:
    If x=0: y = 2(0) + 1 = 1
    If x=2: y = 2(2) + 1 = 5
  3. Plot the points (0,1) and (2,5) on a graph paper.
  4. Draw a straight line connecting the two points. That is the graph of the function.

Notice: The line is straight, not curved—this is a unique feature of linear functions.


Types & Examples of Linear Functions

  • Standard Linear Function: \( f(x) = 3x + 6 \)
  • Constant Linear Function: \( f(x) = 2 \) (slope = 0, flat line)
  • Linear Function of Two Variables: \( 2x + 3y = 7 \)
  • Real Life Example: "A taxi charges ₹50 as base fare and ₹10 per km" is modelled as \( f(x) = 10x + 50 \)

Step-by-Step Illustration

Let’s solve for x: \( 3x + 5 = 20 \)

1. Start with the equation: \( 3x + 5 = 20 \)

2. Subtract 5 from both sides: \( 3x = 15 \)

3. Divide by 3: \( x = 5 \)

4. Final Answer: x = 5

Common Linear Function Word Problem

Example: "If a gym membership costs ₹200 per month plus a registration fee of ₹500, write the linear function and find the total cost for 6 months."

1. Cost formula: Cost = 200x + 500, where x = number of months.

2. For 6 months: Cost = 200(6) + 500 = 1200 + 500 = ₹1700

3. Final Answer: ₹1700 is the total cost for 6 months.

Linear vs Nonlinear Functions

Feature Linear Function Nonlinear Function
Graph Straight Line Curve (parabola, circle, etc.)
Equation Only first power of x (e.g., 2x+3) Powers of x more than one, square roots, etc.
Slope Constant Variable (changes)

Speed Trick or Vedic Shortcut

Here’s a quick shortcut for graphing: If you know the y-intercept (c) and the slope (m) in \( y = mx + c \), plot the point (0, c), then use the slope (“rise over run”) to mark another point quickly. Vedic tricks like reverse calculation or digit-sum checks can also help spot calculation errors quickly. Vedantu’s live classes share more such shortcuts to boost confidence for JEE and boards.


Try These Yourself

  • Write a linear function that passes through (0, 2) with slope 5.
  • Is \( y = 2x^2 + 3 \) a linear function? Why or why not?
  • Graph \( y = -4x + 1 \) and list two points on its line.
  • Find the equation of a line parallel to \( y = 3x - 7 \) and passing through (2,5).

Frequent Errors and Misunderstandings

  • Confusing linear and nonlinear equations (e.g., treating \( y = x^2 + 2 \) as linear).
  • Forgetting that in the standard form \( y = mx + c \), x must have power 1 only.
  • Swapping x and y axes while plotting points on the graph.
  • Not using enough points for the graph, leading to a crooked line instead of a straight one.

Relation to Other Concepts

The idea of linear functions connects closely with linear equations in one variable, systems of equations, slope, and coordinate geometry. Mastering linear functions makes it easier to learn about quadratic functions, straight line equations, and calculus topics.


Classroom Tip

A quick way to remember linear functions: “Straight line, straight solution!” If the highest power of your variable is 1, you’re safe—it's a linear function. Teachers in Vedantu’s sessions also use color-coding on graphs to help students instantly spot the slope and intercept, making it easier during revision or quick problem-solving.


We explored linear functions—from definition, formula, examples, common mistakes, and links to other maths topics. Practice more questions and access interactive practice sheets at Vedantu to master linear functions for any exam or classroom challenge. Your confidence will soar as you connect patterns in algebra and everyday life with this powerful concept!


Explore Related Topics:


FAQs on Linear Functions Explained with Graphs and Real Examples

1. What is a linear function in maths?

A linear function is a function that can be written in the form f(x) = mx + b, where m and b are constants and the graph is a straight line. In this form:

  • m is the slope (rate of change).
  • b is the y-intercept (value when x = 0).
Linear functions show a constant rate of change and are commonly studied in algebra and coordinate geometry.

2. What is the formula for a linear function?

The formula for a linear function is y = mx + b. In this slope-intercept form:

  • m = (change in y)/(change in x) represents the slope.
  • b represents the y-intercept.
Another common form is the point-slope form: y − y₁ = m(x − x₁), which is useful when the slope and one point are known.

3. How do you find the slope of a linear function?

The slope of a linear function is found using the formula m = (y₂ − y₁)/(x₂ − x₁). To calculate it:

  • Choose two points: (x₁, y₁) and (x₂, y₂).
  • Subtract the y-values: y₂ − y₁.
  • Subtract the x-values: x₂ − x₁.
  • Divide the differences.
For example, between (1, 3) and (4, 9), slope = (9 − 3)/(4 − 1) = 6/3 = 2.

4. How do you graph a linear function?

To graph a linear function, plot the y-intercept and use the slope to find another point, then draw a straight line. For example, for y = 2x + 1:

  • Plot the y-intercept at (0, 1).
  • Use slope m = 2 (rise 2, run 1).
  • From (0,1), move up 2 and right 1 to get (1,3).
  • Draw a straight line through the points.
The result is a straight-line graph showing constant rate of change.

5. What does the slope mean in a linear function?

The slope in a linear function represents the rate of change of y with respect to x. It tells how much y increases or decreases when x increases by 1.

  • If m > 0, the line rises (increasing function).
  • If m < 0, the line falls (decreasing function).
  • If m = 0, the line is horizontal.
For example, in y = 3x + 2, the slope 3 means y increases by 3 units for every 1 unit increase in x.

6. What is the y-intercept of a linear function?

The y-intercept of a linear function is the point where the graph crosses the y-axis, given by (0, b) in the equation y = mx + b. To find it:

  • Set x = 0 in the equation.
  • The resulting y-value is the intercept.
For example, in y = −4x + 5, the y-intercept is (0, 5).

7. How do you write a linear function from two points?

To write a linear function from two points, first find the slope and then use point-slope form. Steps:

  • Find slope: m = (y₂ − y₁)/(x₂ − x₁).
  • Use point-slope form: y − y₁ = m(x − x₁).
  • Simplify to slope-intercept form y = mx + b.
Example: For (1,2) and (3,6), slope = (6−2)/(3−1) = 4/2 = 2. Using (1,2): y − 2 = 2(x − 1), which simplifies to y = 2x.

8. What is the difference between a linear function and a linear equation?

A linear function expresses y as a function of x (y = mx + b), while a linear equation may be written in different forms like Ax + By = C. Key differences:

  • A linear function passes the vertical line test and defines one output for each input.
  • A linear equation can represent the same line but is not always written in function form.
For example, 2x + y = 5 is a linear equation, which can be rewritten as the linear function y = −2x + 5.

9. Can you give an example of a linear function with a real-life application?

A real-life example of a linear function is a taxi fare calculated with a fixed starting fee plus a cost per kilometre. For instance:

  • Base fare = $3
  • Cost per km = $2
The function is f(x) = 2x + 3, where x is distance travelled. The slope (2) represents cost per km, and the y-intercept (3) represents the fixed starting charge.

10. How do you know if a function is linear?

A function is linear if it has a constant rate of change and can be written in the form f(x) = mx + b. You can check by:

  • Seeing if the graph is a straight line.
  • Checking if the slope between any two points is constant.
  • Confirming the highest power of x is 1.
For example, f(x) = 5x − 7 is linear, but f(x) = x² + 3 is not because it has a squared term.