Calculating Slope

<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&nbsp;<em>x</em>&nbsp;=&nbsp;<em>k</em>, where&nbsp;<em>k</em>&nbsp;is a constant, is infinity. This isn&#39;t quite right, because &quot;infinity&quot; isn&#39;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.&nbsp;&nbsp;</p><p>In the previous mountain entry, we said that any linear equation that contains both an $x$ and a $y$ will be &quot;slanted,&quot; or &quot;sloped.&quot; 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&nbsp;$(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 &quot;undefined.&quot; You might hear some people say infinity, but the GRE calls it &quot;undefined.&quot;</li> </ul>