# Linear Relationship: Definition, Examples

Regression Analysis > Linear Relationship

## What is a Linear Relationship?

A linear relationship means that you can represent the relationship between two sets of variables with a line (the word “linear” literally means “a line”). In other words, a linear line on a graph is where you can see a straight line with no curves.

This data, for force stretching a rubber band, shows a linear relationship.

This set of data shows a set of curves (it isn’t linear).

## Linear Equations

If a set of data is linearly related, you can show that relationship using a linear equation. A linear equation has the form:
y = mx + b
Where:
“m” is the slope of the line,
“x” is any point (an input or x-value) on the line,
and “b” is where the line crosses the y-axis.

The “b” in the slope formula is the y-intercept and the “m” is the slope.

Y = mx + b is sometimes called the Slope Formula.

## Positive and Negative Linear Relationships

• If a straight line on a graph travels upwards from left to right, it has a positive linear relationship. It shows a steady rate of increase.
• If a straight line on a graph travels downwards from left to right, it has a negative linear relationship. It shows a steady rate of decrease.

## Determining Linear Relationships from Data

If you have a set of data and you want to find out if the data has a perfectly linear relationship, you could make a scatter plot and draw a line through the dots. If all of the dots are on the line, you have a perfect relationship.

Variables on a scatter plot showing a linear relationship.

If you have a very large data set, you may not want to make a scatter plot of your data, as large numbers of dots can clutter up your graph. In this case, you may want to consider figuring out the correlation coefficient, which is a mathematical measure of how linearly related your variables are.

------------------------------------------------------------------------------

If you prefer an online interactive environment to learn R and statistics, this free R Tutorial by Datacamp is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try this Statistics with R track.