Graphing Linear Equations
Slope-Intercept Form
- A linear function of two variables can be written in slope-intercept form:
is the dependent variable (on the vertical axis) is the independent variable (on the horizontal axis) is the slope of the line- you may have been taught the slope as “
”, this is just personal taste, but again, get used to using different letters!
is the vertical-intercept, a constant number where the line crosses the vertical axis- if
is the dependent variable, this is the “ -intercept”, where
- if
- Any point on the line has an
-coordinate and -coordinate
Other Forms
- A linear function can equivalently be expressed in the following form:
is the dependent variable (on the vertical axis) is the independent variable (on the horizontal axis) is a constant
- This is a valid equation, but is difficult to visualize in the traditional graph as above. Simply solve for the dependent variable on the vertical axis
as if you were solving for :
The vertical intercept is
The horizontal intercept is
The slope is
This is extremely useful for dealing with constraints in constrained optimization problems: budget constraints and isocost lines
Drawing a Graph From an Equation
If we already have a linear equation that we would like to graph, we can follow these steps:
- Take the equation and plug in two values, e.g. if we have:
- We can find two points on the graph. The easiest one to find is the vertical-intercept, where the line crosses the vertical axis, where
, so plug in :
Thus, one point is
- For our second point, let’s plug in
:
Thus, another point is
- Now, plot the two points on the graph, and connect them with a line
Note: A quick shortcut to plot a line is to find the vertical intercept and plot that, and then find the next point using the slope. Here, start our line at 4 on the vertical axis, and then, as the slope is
Finding an Equation from a Graph
In order to find the equation of an existing line, we follow these steps:
- First, take two points on the line and find the slope,
, between them. Let’s pick and .
There is a shortcut that we can use to find the slope faster by eye-balling the graph: When
- Now with the slope, we need to find the vertical intercept, or
, we solve this by plugging in the slope and any point on the graph, we will use (1,6):
Note, there is another easy way to eye-ball what this value is. It is simply that
- Thus, we have the slope and the intercept, so our equation is: