Linear Relationship: Definition, Formula, and Examples
What is a linear relationship?
A linear relationship between two variables is one that can be represented by a straight line on a Cartesian graph. As one variable changes, the other changes proportionally. Linear relationships appear throughout statistics, economics, physics, and everyday life and are often contrasted with nonlinear relationships, which produce curved or more complex patterns.
Key points
- When graphed, a linear relationship produces a straight line.
- It can be expressed by the equation
y = m x + b, wheremis the slope andbis the y-intercept. - A positive slope means both variables increase together; a negative slope means one increases while the other decreases.
- Linear models (for example, linear regression) are widely used to describe and predict relationships between variables.
Formula and components
The standard form for a linear relationship in two variables is:
y = m x + b
Explore More Resources
Where:
* m = slope = rate of change of y with respect to x. From two points (x1, y1) and (x2, y2), m = (y2 - y1) / (x2 - x1).
* b = y-intercept = value of y when x = 0.
Interpretation:
* Slope m determines the steepness and direction of the line.
* Intercept b sets where the line crosses the y-axis.
Explore More Resources
When is a relationship linear?
For two variables, a relationship is linear when:
* The equation relating them is first-degree (variables appear to the first power).
* The plot of the data or the model is well-approximated by a straight line.
Note: In practice, data rarely align perfectly on a line; analysts use correlation and regression to quantify how closely data follow a linear pattern.
Explore More Resources
Linear functions vs. linear relationships
A linear function is a mapping written as f(x) = m x + b. Using f(x) emphasizes the functional mapping from x to output. The algebraic form and interpretation are the same as y = m x + b.
In linear algebra, the word “linear” has a stricter meaning (homogeneous and additive), but in basic algebra and statistics f(x) = m x + b is commonly called a linear function.
Explore More Resources
Common examples
- Speed and distance:
distance = rate × time. If rate is constant, distance grows linearly with time. - Temperature conversion: Fahrenheit and Celsius are linearly related:
°F = (9/5) × °C + 32°C = (5/9) × (°F − 32)- Real estate pricing (simplified):
price = (price per sq ft) × (square feet) + constant. If price per square foot is constant, market value increases linearly with size. - Proportional relationships (a special case):
y = k x(hereb = 0), soyis directly proportional tox.
Positive vs. negative linear relationships
- Positive linear relationship: slope
m > 0. Asxincreases,yincreases. - Negative linear relationship: slope
m < 0. Asxincreases,ydecreases.
Nonlinear relationships
When changes between variables are not constant and the plot is curved or more complex, the relationship is nonlinear. Examples include exponential growth, quadratic relationships, and other polynomial or non-polynomial forms.
Use in statistics
Correlation measures the strength and direction of a linear relationship between two variables. Linear regression fits the best straight line to data, allowing for prediction and interpretation of the linear trend. While no real-world relationship is perfectly linear, linear models are often useful approximations.
Explore More Resources
Conclusion
A linear relationship is a simple and powerful way to describe how one variable changes with another using a straight line. The form y = m x + b captures the core idea: a constant rate of change (slope) and a starting level (intercept). Linear models are foundational in data analysis because they are easy to interpret and often provide good first-order approximations of real phenomena.