Linear Equations
Linear equations describe straight-line relationships between two variables. In the context of regression and correlation, they're the foundation for building models that predict one variable from another. Getting comfortable with slopes, intercepts, and graphing here will pay off when you move into fitting regression lines to real data.

Linear Equations

Components of linear equations
The general form of a linear equation used in statistics is:
Each piece has a specific meaning:
- is the dependent variable (the one being predicted or explained)
- is the independent variable (the one doing the predicting)
- is the y-intercept, the value of when . On a graph, this is where the line crosses the y-axis.
- is the slope, which tells you how much changes for each one-unit increase in . It captures both the steepness and direction of the line.
Slope in detail:
Slope is calculated as , where is the vertical change and is the horizontal change between two points.
- A positive slope means the line rises from left to right (as increases, increases)
- A negative slope means the line falls from left to right (as increases, decreases)
- A slope of 0 produces a horizontal line ( doesn't change regardless of )
- An undefined slope occurs with a vertical line ( doesn't change), though vertical lines don't represent functions
You may also encounter point-slope form: , where is a known point on the line and is the slope. This is useful when you know a point and a slope but not the y-intercept.

Predictions using linear equations
One of the main reasons you write a linear equation is to make predictions. To predict for a given , substitute the value into the equation and solve.
Example: For , predict when .
-
Substitute:
-
Multiply:
-
Subtract:
The predicted value of when is 13.
Follow order of operations (PEMDAS) when solving: handle multiplication before addition or subtraction.
A note on notation: You'll sometimes see instead of . These mean the same thing. Function notation just makes it easier to specify which input you're using, like writing .
Graphing of linear equations
To graph a linear equation:
- Identify the y-intercept and plot it on the coordinate plane.
- Use the slope to find a second point. From the y-intercept, move units vertically for every 1 unit horizontally (rise over run).
- Plot the second point and draw a straight line through both points, extending in both directions.
A few things to notice about linear graphs:
- The line is straight everywhere, which reflects the constant rate of change
- It crosses the y-axis at
- It extends infinitely in both directions
Example: Graph .
- The y-intercept is .
- The slope is , so the line drops 1 unit for every 2 units you move to the right.
- From , move right 2 and down 1 to reach . You could also move left 2 and up 1 to reach .
- Plot these points and connect them with a straight line.
Relationships between linear equations
- Parallel lines have the same slope but different y-intercepts. They never intersect. For example, and are parallel because both have a slope of 2.
- Perpendicular lines have slopes that are negative reciprocals of each other. If one line has slope , a perpendicular line has slope . Their product always equals .
- A system of linear equations involves two or more equations considered together. The solution is the point (or points) where the lines intersect, which you'll revisit when comparing regression models or checking for consistency between predictions.