A line is a straight path. 
A line is a straight path. 

Imagine you are walking up a hill. The hill might be very steep. It might be a gentle slope. In math, we use lines to show how things change. We call these linear functions. 
A linear function makes a straight line on a graph. The most important part is the slope. The slope tells us how steep the line is. It is a number that shows the rate of change. This means it shows how much the output changes for every step we take.
If the slope is a positive number, the line goes up. If the slope is negative, the line goes down. A flat line has a slope of zero. This is called a constant function. We also look at the y-intercept. This is the spot where the line crosses the center vertical axis. It is also called the initial value. 
Lines help us solve real problems. For example, they can show the cost of food. If you know the price of meat, a line shows your total cost. You can use these lines to predict what happens next.
A linear function is a special way to show how two things change together. In math, we often draw these relationships on a graph using a straight line. This line shows that the change in one value is always proportional to the change in the other. If you change your input by a certain amount, the output changes by a predictable amount every single time. This makes linear functions very useful for predicting what might happen next. 
To understand how these work, we look at a number called the slope. The slope measures how steeply the line is slanted. You can think of it as the "rise over run." This means you look at how much the line goes up or down compared to how far it moves to the side. If the slope is a positive number, the line goes up as it moves right. A negative slope means the line goes down. A slope of zero creates a flat, horizontal line called a constant function.
There are different ways to write these functions using math formulas. The most common way is called the slope-intercept form. This formula shows the slope and the initial value at the same time. The initial value is where the line crosses the vertical y-axis. This spot is also known as the y-intercept. Another way is the point-slope form, which uses one known point and the slope. You can even use the two-point form if you only know two spots on the line. 
We can use these lines to solve real-life puzzles about money or items. Imagine you have twelve euros to spend on meat. Salami might cost six euros per kilogram, while sausage costs three euros per kilogram. You can write an equation to show this relationship. If you buy more salami, you must buy less sausage to stay at twelve euros. In this case, the slope is negative two. The line shows that adding one kilo of salami means you must take away two kilos of sausage. 
Linear functions are also very important in the study of calculus. Calculus helps us understand how smooth curves change at any specific point. Even if a shape is a curvy line, we can zoom in very close to it. When we zoom in enough, the curve looks like a tiny straight line. This tiny line is called a tangent line. The slope of this line is called the derivative. This tells us the exact rate of change at that one specific moment. 
A linear function is a mathematical relationship where the change in an output is always proportional to the change in the input. In the Cartesian plane, these functions are represented by non-vertical lines. This predictability is the defining characteristic of the function. When you increase the input variable by a specific amount, the output responds with a consistent, measurable shift. This concept is fundamental to algebra and calculus because it describes constant rates of change. 
To understand the mechanics, we look at the function's components. A linear function is a polynomial function where the variable has a degree of at most one. This means the highest exponent on the variable is one. The standard form is often written as $y = ax + b$. In this equation, the coefficient $a$ is known as the slope. The constant $b$ represents the y-intercept, or the initial value. The y-intercept is the specific point where the line crosses the vertical y-axis.
There are several distinct types of linear functions to identify. If the slope $a$ is zero, the function is a constant function. This results in a horizontal line that does not rise or fall. Some mathematicians call these homogeneous functions if they pass through the origin, which is the point (0,0). In advanced mathematics, a distinction is often made between these. A homogeneous linear function passes through the origin, while a more general version is called an affine function. 
The slope, or $a$, measures the steepness of the line using the ratio of rise over run. This is the change in $y$ divided by the change in $x$. If the slope is positive, the function is increasing as it moves to the right. If the slope is negative, the function is decreasing. For any change in the input $x$, the output $y$ changes by exactly $a$ times that amount. This constant rate of change is what makes the line perfectly straight.
Mathematicians use different formulas to describe these lines depending on what information they have. The slope-intercept form, $y = ax + b$, is the simplest for seeing the slope and intercept. If you only know the slope and one point, you use the point-slope form: $y - y_1 = a(x - x_1)$. If you are given two different points, you can use the two-point form. This allows you to calculate the slope first and then build the equation. Each form provides a different way to view the same geometric path.
Linear functions are vital in calculus for understanding more complex shapes. The derivative of a function measures its rate of change at any given point. For a linear function, the derivative is always a constant equal to the slope $a$. A major idea in differential calculus is that any smooth curve can be approximated. If you zoom in close enough to a point on a curve, it looks like a unique linear function. This is called a linear approximation, and its graph is the tangent line. 
We can see these functions in practical scenarios, such as managing a budget. Suppose you have 12 euros to spend on salami and sausage. If salami costs 6 euros per kilogram and sausage costs 3 euros per kilogram, the relationship is linear. The equation $6x + 3y = 12$ can be rewritten to show $y$ as a function of $x$. In this case, the slope is $-2$. This means for every one kilogram of salami you buy, you must buy two fewer kilograms of sausage. 
Finally, linear functions connect to many other mathematical fields. If you express an exponential function on a logarithmic scale, it appears as a straight line. Similarly, if both the input and the output are on a logarithmic scale, the graph represents a power law. Even in polar coordinates, linear relationships can create interesting shapes. A linear function in polar coordinates can result in an Archimedean spiral or a circle. This shows how a simple concept can transform across different systems. 
🖼️ Images & Media (4)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.