Question 113203
To find the slope of a line given two points, the first thing to decide is which will be Point 1 and which Point 2.  It doesn't matter which you pick, as long as you keep it consistent as you solve the problem.


Let's say that your point (-3, 1) is {{{P[1]}}} and (-6, 10) is {{{P[2]}}}


The coordinates of {{{P[1]}}} are {{{x[1]=-3}}} and {{{y[1]=1}}}, and 


The coordinates of {{{P[2]}}} are {{{x[2]=-6}}} and {{{y[2]=10}}}


Now we can use the formula for the slope to compute it.


{{{m=(y[1]-y[2])/(x[1]-x[2])=(1-10)/(-3-(-6))=(-9)/3=-3}}}


===============================


The slope-intercept form of a straight line is {{{y=mx+b}}} where m is the slope and b is the y-coordinate of the y-intercept.  The y-intercept is the point where the line intersects the y-axis, in other words, the value of y when x = 0.


Given that the slope of the line is -5 and the y-intercept is (0, 5), we can write the equation directly by substitution in the slope-intercept form.


{{{y=mx+b}}}
{{{y=-5x+5}}}


Can you see that if you put 0 in for x in this equation that y = 5?


=================================


A line with an undefined slope is a line where all of the x-coordinate points are equal.  That means that if you tried to compute the slope, the slope formula, {{{m=(y[1]-y[2])/(x[1]-x[2])}}} would have a zero denominator.  Such a line must be a vertical line for all of the x-coordinates to be equal. 


Since all of the x-coordinates are equal, we know what that value is from the x-coordinate of the x-intercept, (-1, 0).  Since x = -1 for all values of y, the equation {{{x=-1}}} fully describes the line and is therefore the sought after equation.


Hope this helps,
John