First of all, to answer this question we are assuming that you are talking about a straight line!
To find the slope (also known as the gradient) of a straight line, you need to know how much it changes in the vertical (the y-direction) for a given change in the horizontal direction (the x-direction).
As such you would normally divide the change in the y-coordinate by the change in x.
As such the gradient would be (5-1)/(1-1) = 4/0.
However the example you have given is a special case as there is no change in the x-coordinates (hence the zero on the bottom of the fraction). This means that the line is going up without going along (the line is vertical).
As it is impossible to divide by zero this gradient is described as being "undefined".
For more information on finding the gradient of straight lines see the related link.
Where are the points!
The slope is 2.
The slope is 1/2.
Points: (2, 1) and (5, 3) Slope: 2/3
Points: (3,-1) and (-2, -5) Slope: 4/5
The slope of a line that passes through two points is (difference in y) / (difference in x).
Where are the points!
The slope is zero.
The slope is 2.
The slope is 1/2.
The slope of the line that passes through the points (3,15) and (5,9), is -3; use the formula change in Y-axis/change in X-axis.
Points: (2, 1) and (5, 3) Slope: 2/3
Points: (14, 5) and (20, 4) Slope: -1/6
The slope is -2/3.
y=mx+b
It is: 6
Points: (0, 5) and (10, -15) Slope: -2