Equations and graphs of lines
There are several forms of equations for a line.
Using these, if you see a line on a Cartesian plane,
then you can pick two variables (usually x and y)
and write an equation for that line.
Conversely, if you understand the slope–intercept form,
then you can draw a graph
of any linear equation —or even inequality— in two variables.
Equations for lines
There are three common forms of equations for lines:
- The general form;
- The point–slope forms;
- The slope–intercept form.
There are also special forms for horizontal and vertical lines.
The general form is not very important for graphing,
and I will mostly skip it.
A point–slope form is useful
if you know the slope of the line
and the coordinates of one of the points on the line.
If your variables are x and y (as usual),
the slope is m, and the known point is (a, b),
then the point–slope form of the line for that point
is
y − b =
m(x − a).
Note that a, b, and m
will all stand for specific numbers that you know;
only x and y will remain variables.
If you know two different points on one line,
then you can use those two points to calculate the slope,
then use the slope with either of the original points
to get an equation in point–slope form.
(Sometimes the resulting equation
is called a point–point form of the line.)
The slope–intercept form of a line
is basically a special case of the point–slope form
when the point used is the y-intercept of the line.
Specifically, if m is the slope
and the y-intercept is (0, b),
then the slope–intercept form of the line
is
y =
mx + b.
A horizontal line has slope 0,
so the equation of a horizontal line
will simply be
y = b,
where b
is the y-coordinate of any point on the line.
Vertical lines don't have slopes,
but you can still write the equation of a vertical line in a similar way,
as
x = a,
where a is the x-coordinate of any point on the line.
Graphing a linear equation
Here are the steps
to graph a linear equation (or inequality)
in two variables (say x and y):
- Solve for y (or whatever the second variable is).
Note: if y disappears when you try to solve for it,
then see the exceptions below.
- Simplify the right side
so it looks like mx + b
(where x is the first variable,
and m and b are constants that might be zero).
- Draw the line through the point (0, b) with the slope m.
If you're graphing an equation or a weak inequality,
then draw this line solid;
but if you're graphing a strict inequality,
then draw this line dashed.
- If you're graphing an inequality,
then shade the region either above or below the line,
depending on whether y
may be greater than or less than mx + b.
Here are the exceptional cases
when y disappears (or was never there):
- Solve for x (or whatever the remaining variable is) if you can;
then draw a vertical line (solid or dashed, as above).
For an inequaltiy, shade one side (right or left).
- If both variables disappear,
then you'll get a statement which is either True or False.
For True, shade in the entire plane;
for False, leave the graph empty.
Go back to
the MATH-0950-ES32
homepage.
This web page was written in 2007 by Toby Bartels.
Toby reserves no legal rights to it.
The permanent URI of this web page
is
http://tobybartels.name/MATH-0950/2007SP/lines/
.