<p><span style="font-size:22px"><a href="https://www.prepswift.com/quizzes/quiz/prepswift-calculating-slope" target="_blank">Calculating Slope Exercise</a></span></p>
<p><strong>Note</strong>: in some parts of the video, we mention that the slope of a line of the form <em>x</em> = <em>k</em>, where <em>k</em> is a constant, is infinity. This isn't quite right, because "infinity" isn't a real number. Instead, we should have said that the slope is not defined, because when we look at the formula for calculating the slope, we divide by the horizontal change - which is 0. </p><p>In the previous mountain entry, we said that any linear equation that contains both an $x$ and a $y$ will be "slanted," or "sloped." If you have two points on that line, you can <span style="color:#27ae60;">Calculate the Slope</span> using the formula below, assuming the two points are $(x_1, y_1)$ and $(x_2, y_2)$:</p>
<p>$$\frac{y_2 - y_1}{x_2 - x_1}$$</p>
<p><strong><span style="color:#8e44ad;">Example</span></strong></p>
<p>What is the slope of a line containing the points $(3, -5)$ and $(-2, 7)$?</p>
<p>$$\frac{7 - -5}{-2 - 3}$$</p>
<p>$$slope = \frac{12}{-5} = - \frac{12}{5}$$</p>
<p><strong><span style="color:#8e44ad;">What about a horizontal line or a vertical line?</span></strong></p>
<ul>
<li><strong>Horizontal line</strong>: the slope is $0$.</li>
<li><strong>Vertical line</strong>: the slope is "undefined." You might hear some people say infinity, but the GRE calls it "undefined."</li>
</ul>