Somewhere on a mountain road there is a yellow sign showing a truck on a wedge and the number 12%. It means that for every 100 metres you travel horizontally, the road drops 12 metres. Over a kilometre of map distance that is a descent of 0.12×1000=1200.12 \times 1000 = 120 metres, and the number on the sign is nothing more than the slope of a line written as a percentage: 120/1000=0.12120/1000 = 0.12.

That is the whole idea. The slope of a straight line is rise over run, the vertical change divided by the horizontal change between any two of its points. If the points are (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2), the slope formula is

m=y2−y1x2−x1=riserun.m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\text{rise}}{\text{run}}.

A slope of 0.120.12 means you go up 0.120.12 units for every unit you move right. A slope of 33 means up three for every one across. A slope of −2-2 means down two for every one across. The rest of this article is about how to find slope in practice, how it sits inside the equation of a line, and why such a simple ratio turns out to be one of the most heavily used numbers in mathematics.

What is the slope of a line?

Pick any two points on a straight line. Move from the left one to the right one. The horizontal distance you covered is the run, Δx=x2−x1\Delta x = x_2 - x_1, and the vertical distance is the rise, Δy=y2−y1\Delta y = y_2 - y_1. The Greek capital delta is just shorthand for “change in”. The slope is

m=ΔyΔx.m = \frac{\Delta y}{\Delta x}.

What makes this a property of the line, rather than of the two points you picked, is similar triangles. Any two rise-and-run triangles drawn against the same straight line have the same angles, so their sides are in the same proportion: choose points twice as far apart and both rise and run double, leaving the ratio untouched.

The sign of mm tells you the direction at a glance:

  • Positive slope (m>0m > 0): the line rises from left to right. More xx means more yy.
  • Negative slope (m<0m < 0): the line falls from left to right. More xx means less yy.
  • Zero slope (m=0m = 0): the line is horizontal. Changing xx never changes yy.
  • Undefined slope: the line is vertical. The run is zero, and the formula would divide by zero.

The size of the slope, ∣m∣\lvert m\rvert, tells you how steep the line is. A line with m=5m = 5 is steeper than one with m=0.2m = 0.2, and a line with m=−5m = -5 is just as steep as m=5m = 5, only falling instead of rising.

How do you find the slope from two points?

Take the points (1,2)(1, 2) and (5,4)(5, 4). Label them (x1,y1)=(1,2)(x_1, y_1) = (1, 2) and (x2,y2)=(5,4)(x_2, y_2) = (5, 4), then substitute:

m=4−25−1=24=12.m = \frac{4 - 2}{5 - 1} = \frac{2}{4} = \frac{1}{2}.

Geometrically, you walk 4 units to the right and climb 2 units, as in Figure 1. The line through these two points crosses the yy-axis at 1.51.5, a number we will meet again in the next section.

Slope of a line: rise over run between (1, 2) and (5, 4)xy−112345678−11234560run = 4rise = 2(1, 2)(5, 4)b = 1.5m = 2/4 = 1/2y = 0.5x + 1.5

Figure 1 — The line through (1, 2) and (5, 4). The dashed right triangle has run 4 and rise 2, so the slope is 2/4 = 1/2; the line meets the y-axis at b = 1.5, giving y = 0.5x + 1.5.

Does the order of the points matter? No, provided you use the same order on top and bottom. Swap the labels so that (x1,y1)=(5,4)(x_1, y_1) = (5, 4) and (x2,y2)=(1,2)(x_2, y_2) = (1, 2):

m=2−41−5=−2−4=12.m = \frac{2 - 4}{1 - 5} = \frac{-2}{-4} = \frac{1}{2}.

Both differences change sign, and the two minus signs cancel. Algebraically, y1−y2x1−x2=−(y2−y1)−(x2−x1)\frac{y_1 - y_2}{x_1 - x_2} = \frac{-(y_2 - y_1)}{-(x_2 - x_1)}, which is the same fraction. What you must not do is mix orders, taking y2−y1y_2 - y_1 on top but x1−x2x_1 - x_2 underneath; that silently flips the sign of your answer.

A negative slope. Find the slope through (−2,7)(-2, 7) and (3,−3)(3, -3):

m=−3−73−(−2)=−105=−2.m = \frac{-3 - 7}{3 - (-2)} = \frac{-10}{5} = -2.

The line drops 10 units over a run of 5, so it falls 2 units for every unit to the right. The most common error here is the double negative in the denominator: 3−(−2)=53 - (-2) = 5, not 11. Writing the parentheses explicitly before simplifying avoids it.

A fractional result. Through (−1,4)(-1, 4) and (3,−2)(3, -2):

m=−2−43−(−1)=−64=−32.m = \frac{-2 - 4}{3 - (-1)} = \frac{-6}{4} = -\frac{3}{2}.

Leave slopes as fractions where you can. −32-\tfrac{3}{2} reads directly as “down 3, across 2”, which is exactly how you would plot it, while −1.5-1.5 hides that instruction.

What is slope-intercept form y = mx + b?

Every non-vertical straight line can be written as

y=mx+b,y = mx + b,

where mm is the slope and bb is the y-intercept, the height at which the line crosses the yy-axis. You can see why bb earns that name by setting x=0x = 0: then y=m⋅0+b=by = m \cdot 0 + b = b, so the point (0,b)(0, b) is on the line.

For the line in Figure 1 we know m=12m = \tfrac{1}{2}. To find bb, substitute either point. Using (1,2)(1, 2):

2=12(1)+b⟹b=2−0.5=1.5.2 = \tfrac{1}{2}(1) + b \quad\Longrightarrow\quad b = 2 - 0.5 = 1.5.

So the line is y=0.5x+1.5y = 0.5x + 1.5. Check with the other point: 0.5(5)+1.5=2.5+1.5=40.5(5) + 1.5 = 2.5 + 1.5 = 4. Correct.

The negative-slope example works the same way. With m=−2m = -2 through (−2,7)(-2, 7): 7=−2(−2)+b=4+b7 = -2(-2) + b = 4 + b, so b=3b = 3 and the line is y=−2x+3y = -2x + 3. Check (3,−3)(3, -3): −2(3)+3=−3-2(3) + 3 = -3.

Reading and graphing. The appeal of y=mx+by = mx + b is that both numbers can be read off directly. In y=3x−4y = 3x - 4 the slope is 33 and the intercept is −4-4, because the equation is y=3x+(−4)y = 3x + (-4); watch that sign. To draw y=23x−1y = \tfrac{2}{3}x - 1, start at the intercept (0,−1)(0, -1). The slope 23\tfrac{2}{3} says: up 2, right 3. That lands on (3,1)(3, 1), and repeating gives (6,3)(6, 3); the third point checks the first two. For a negative slope such as −32-\tfrac{3}{2}, go down 3 and right 2: the numerator is always the vertical move and the denominator the horizontal one.

How do you find the equation of a line?

Slope-intercept form is convenient for reading a line, but it is not always the fastest way to build one. If you know a slope mm and one point (x1,y1)(x_1, y_1), the definition of slope hands you the equation directly. Any other point (x,y)(x, y) on the line must satisfy

y−y1x−x1=m,\frac{y - y_1}{x - x_1} = m,

and multiplying both sides by (x−x1)(x - x_1) gives point-slope form:

y−y1=m(x−x1).y - y_1 = m(x - x_1).

Example: a point and a slope. The line through (2,5)(2, 5) with slope 33 is y−5=3(x−2)y - 5 = 3(x - 2). Expanding, y−5=3x−6y - 5 = 3x - 6, so y=3x−1y = 3x - 1.

Example: two points. This is the question students search for most often, and it is two steps. Find the equation of the line through (−1,4)(-1, 4) and (3,−2)(3, -2).

Step 1, the slope. We already computed m=−32m = -\tfrac{3}{2}.

Step 2, point-slope. Use (−1,4)(-1, 4):

y−4=−32(x−(−1))=−32(x+1).y - 4 = -\tfrac{3}{2}\bigl(x - (-1)\bigr) = -\tfrac{3}{2}(x + 1).

Expanding gives y−4=−32x−32y - 4 = -\tfrac{3}{2}x - \tfrac{3}{2}, so

y=−32x+52,that is,y=−1.5x+2.5.y = -\tfrac{3}{2}x + \tfrac{5}{2}, \qquad\text{that is,}\qquad y = -1.5x + 2.5.

Check with the other point: −1.5(3)+2.5=−4.5+2.5=−2-1.5(3) + 2.5 = -4.5 + 2.5 = -2. Correct. Starting from (3,−2)(3, -2) instead simplifies to the same line.

Standard form. A third common way to write a line is

Ax+By=C,Ax + By = C,

with AA, BB, CC usually integers and A≥0A \ge 0. To convert y=−32x+52y = -\tfrac{3}{2}x + \tfrac{5}{2}, multiply through by 2 to clear fractions, 2y=−3x+52y = -3x + 5, and move the xx term across:

3x+2y=5.3x + 2y = 5.

Both original points check: 3(−1)+2(4)=−3+8=53(-1) + 2(4) = -3 + 8 = 5 and 3(3)+2(−2)=9−4=53(3) + 2(-2) = 9 - 4 = 5.

Standard form can describe vertical lines, which slope-intercept form cannot (take B=0B = 0).

Converting the other way. Take 4x−5y=204x - 5y = 20. Solve for yy: −5y=−4x+20-5y = -4x + 20, so y=45x−4y = \tfrac{4}{5}x - 4, with slope 45\tfrac{4}{5} and yy-intercept −4-4. In general, solving Ax+By=CAx + By = C for yy when B≠0B \ne 0 gives

y=−ABx+CB,y = -\frac{A}{B}x + \frac{C}{B},

so the slope of a line in standard form is m=−A/Bm = -A/B; here −4/(−5)=45-4/(-5) = \tfrac{4}{5}, as found.

What is the slope of a horizontal or vertical line?

Horizontal lines. Take the line through (−3,2)(-3, 2) and (4,2)(4, 2). The slope is

m=2−24−(−3)=07=0.m = \frac{2 - 2}{4 - (-3)} = \frac{0}{7} = 0.

Every point on the line has y=2y = 2, so its equation is simply y=2y = 2. That is slope-intercept form with m=0m = 0 and b=2b = 2. In general, the horizontal line through height cc is y=cy = c.

Vertical lines. Take the line through (3,−1)(3, -1) and (3,5)(3, 5). The formula gives

m=5−(−1)3−3=60,m = \frac{5 - (-1)}{3 - 3} = \frac{6}{0},

and division by zero is not defined. This is not a technicality to be worked around. Asking “what number mm satisfies m×0=6m \times 0 = 6?” has no answer, because every number times zero is zero. So a vertical line has no slope; the usual phrase is that its slope is undefined.

Every point on this line has x=3x = 3, so its equation is x=3x = 3, and in general a vertical line is x=cx = c. It cannot be written as y=mx+by = mx + b at all, since the single input x=3x = 3 corresponds to every possible yy. Keep the distinction straight: zero slope is a perfectly good number (a flat road), while undefined slope means the ratio does not exist (a wall).

Parallel lines have the same steepness and never meet, so two non-vertical lines are parallel exactly when

m1=m2m_1 = m_2

and their intercepts differ. The lines y=2x+1y = 2x + 1 and y=2x−5y = 2x - 5 are parallel. All vertical lines are parallel to one another too, even though none of them has a slope.

Perpendicular lines meet at a right angle, and for two non-vertical lines the condition is

m1m2=−1,equivalentlym2=−1m1.m_1 m_2 = -1, \qquad\text{equivalently}\qquad m_2 = -\frac{1}{m_1}.

Each slope is the negative reciprocal of the other. Slope 22 pairs with −12-\tfrac{1}{2}; slope −34-\tfrac{3}{4} pairs with 43\tfrac{4}{3}. The exception is the horizontal-vertical pair, which is perpendicular even though the vertical line has no slope to multiply.

Why the product is minus one. A line of slope mm points in the direction of the vector (1,m)(1, m): one step right, mm steps up. Now rotate the plane a quarter-turn counterclockwise about the origin. That rotation sends each point (a,b)(a, b) to (−b,a)(-b, a): east (1,0)(1, 0) goes to north (0,1)(0, 1), and north goes to west (−1,0)(-1, 0). Every direction turns through exactly 90 degrees.

Apply the rotation to the direction vector (1,m)(1, m):

(1,m)  ⟼  (−m,1).(1, m) \;\longmapsto\; (-m, 1).

The rotated vector is perpendicular to the original by construction. Its slope is rise over run, 1−m=−1m\frac{1}{-m} = -\frac{1}{m}, provided m≠0m \ne 0. Multiply the two slopes and you get m⋅(−1m)=−1m \cdot \left(-\frac{1}{m}\right) = -1.

For the converse, suppose m1m2=−1m_1 m_2 = -1. The direction vectors (1,m1)(1, m_1) and (1,m2)(1, m_2) have dot product 1⋅1+m1m2=1−1=01 \cdot 1 + m_1 m_2 = 1 - 1 = 0, and a zero dot product means a right angle. So the rule works in both directions. The dot product and the rotation map are both linear-algebra ideas; the article on vector spaces sets out the general framework.

Worked example. Find the lines through (4,3)(4, 3) that are parallel and perpendicular to y=2x+1y = 2x + 1.

Parallel: same slope, m=2m = 2. Point-slope gives y−3=2(x−4)y - 3 = 2(x - 4), so y=2x−5y = 2x - 5.

Perpendicular: slope −12-\tfrac{1}{2}. Then y−3=−12(x−4)=−12x+2y - 3 = -\tfrac{1}{2}(x - 4) = -\tfrac{1}{2}x + 2, so y=−12x+5y = -\tfrac{1}{2}x + 5.

Both pass through (4,3)(4, 3): 2(4)−5=32(4) - 5 = 3 and −12(4)+5=3-\tfrac{1}{2}(4) + 5 = 3. And 2×(−12)=−12 \times \left(-\tfrac{1}{2}\right) = -1, as required.

Draw a line making an angle θ\theta with the positive xx-axis. In the rise-run triangle the rise is the side opposite θ\theta and the run is the side adjacent to it, so by the definition of the tangent ratio

m=riserun=tan⁡θ,θ=arctan⁡m.m = \frac{\text{rise}}{\text{run}} = \tan\theta, \qquad \theta = \arctan m.

This is the bridge between algebra and trigonometry; the sine, cosine and tangent article develops the ratios and their inverses. Some benchmarks: tan⁡45∘=1\tan 45^\circ = 1, so a slope of 1 is a 45-degree line; tan⁡30∘≈0.577\tan 30^\circ \approx 0.577; arctan⁡(0.5)≈26.57∘\arctan(0.5) \approx 26.57^\circ, the angle of the line in Figure 1. As θ\theta approaches 90∘90^\circ, tan⁡θ\tan\theta grows without bound, which is another way of seeing why a vertical line has no finite slope.

Percent grade. Engineers and road signs express slope as a percentage:

grade=100 m  %.\text{grade} = 100\,m \;\%.

So the 12% sign from the opening means m=0.12m = 0.12, and the angle of the road is

θ=arctan⁡(0.12)≈6.84∘.\theta = \arctan(0.12) \approx 6.84^\circ.

A 100% grade is not vertical; it is m=1m = 1, a 45-degree slope. And going from a 10% grade to a 12% grade is a rise of 2 percentage points but a 20% increase in steepness, a distinction covered in percentage points vs percent.

The steepest street. Guinness World Records lists Baldwin Street in Dunedin, New Zealand, as the world’s steepest street, at a gradient of about 34.8%. The record briefly passed to Ffordd Pen Llech in Harlech, Wales, in July 2019, on a measured gradient of 37.45%. In April 2020 Guinness reinstated Baldwin Street after an appeal, having settled on measuring along the centreline of the road, by which Ffordd Pen Llech came out at 28.6%. In degrees, 34.8% is arctan⁡(0.348)≈19.19∘\arctan(0.348) \approx 19.19^\circ, still nowhere near 45 degrees.

Wheelchair ramps. The 2010 ADA Standards for Accessible Design (section 405.2) require that a ramp’s running slope be no steeper than 1:12, meaning at least 12 units of horizontal run for every unit of rise. As a slope that is

m=112≈0.0833,grade≈8.33%,θ=arctan⁡112≈4.76∘.m = \frac{1}{12} \approx 0.0833, \qquad \text{grade} \approx 8.33\%, \qquad \theta = \arctan\tfrac{1}{12} \approx 4.76^\circ.

The standard also caps the rise of a single ramp run at 30 inches (section 405.6), and at 1:12 that rise needs 30×12=36030 \times 12 = 360 inches of run, which is 30 feet, before a level landing.

What does slope mean as a rate of change?

When the axes carry units, the slope carries units too: units of yy per unit of xx. That turns the slope into a rate of change, which is where most of its practical importance comes from.

Speed from a distance-time graph. A car is 20 km from home at time t=0t = 0 and 260 km from home at t=3t = 3 hours, travelling at a steady speed. Plot distance against time and the slope of the line is

m=260−203−0=240 km3 h=80 km/h.m = \frac{260 - 20}{3 - 0} = \frac{240 \text{ km}}{3 \text{ h}} = 80 \text{ km/h}.

The slope is the speed. The yy-intercept, 20 km, is the starting distance, and the full equation is d=80t+20d = 80t + 20.

Cost per item. A print shop quotes 90 euros for 20 posters and 190 euros for 60 posters, and its pricing is linear. The slope is

m=190−9060−20=10040=2.5 euros per poster.m = \frac{190 - 90}{60 - 20} = \frac{100}{40} = 2.5 \text{ euros per poster}.

That is the marginal cost: each extra poster adds 2.5 euros. The intercept follows from 90=2.5(20)+b90 = 2.5(20) + b, giving b=40b = 40. So the cost model is C=2.5n+40C = 2.5n + 40.

The intercept has a real meaning: it is the fixed cost, the 40 euros of setup you pay even for zero posters. A quote for 100 posters is 2.5(100)+40=2902.5(100) + 40 = 290 euros. The average cost per poster, 290/100=2.9290/100 = 2.9 euros, is higher than the slope because the fixed cost is spread over the order; slope and average agree only when b=0b = 0. Optimisation problems built entirely from linear relationships like this are the subject of linear programming.

What about curves and scattered data?

Curves: secants and tangents. On a curve, the slope between two points is no longer constant, but you can still draw the straight line through them, called a secant, and compute its slope. That number is the average rate of change over the interval. For f(x)=x2f(x) = x^2 between x=1x = 1 and x=3x = 3:

f(3)−f(1)3−1=9−12=4.\frac{f(3) - f(1)}{3 - 1} = \frac{9 - 1}{2} = 4.

Now slide the second point toward the first. The secant pivots and settles into the tangent line, and its slope settles to the slope of the curve at that single point, which for x2x^2 at x=1x = 1 is 2. Making that limiting process precise is the definition of the derivative, and it is treated properly in what is a derivative?. The thing to take from this article is that a derivative is a slope; calculus is the art of computing slopes of lines you cannot directly draw.

Data: the line of best fit. Real measurements rarely fall on one line. Given points (1,2)(1, 2), (2,3)(2, 3) and (3,5)(3, 5), no single line passes through all three, but one line comes closest in the sense of minimising the sum of squared vertical errors. Its slope is

m=∑(xi−xˉ)(yi−yˉ)∑(xi−xˉ)2,m = \frac{\sum (x_i - \bar x)(y_i - \bar y)}{\sum (x_i - \bar x)^2},

where xˉ\bar x and yˉ\bar y are the means. Here xˉ=2\bar x = 2, yˉ=103\bar y = \tfrac{10}{3}, the numerator is 33 and the denominator is 22, so m=1.5m = 1.5 and the line passes through (xˉ,yˉ)(\bar x, \bar y), giving b=103−3=13b = \tfrac{10}{3} - 3 = \tfrac{1}{3}. The best-fit line is y=1.5x+13y = 1.5x + \tfrac{1}{3}. The derivation and the interpretation of that slope as an estimated effect are in how linear regression works.

How do the distance and midpoint formulas fit in?

Slope tells you the direction between two points. Two companion formulas tell you how far apart they are and where the halfway point is, and both use the same differences Δx\Delta x and Δy\Delta y.

Distance. The run and rise are the legs of a right triangle whose hypotenuse joins the two points, so by the Pythagorean theorem

d=(x2−x1)2+(y2−y1)2.d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}.

For (1,2)(1, 2) and (5,4)(5, 4), the triangle in Figure 1, the legs are 4 and 2:

d=42+22=20=25≈4.472.d = \sqrt{4^2 + 2^2} = \sqrt{20} = 2\sqrt{5} \approx 4.472. Midpoint. The point halfway between is the average of the coordinates:

M=(x1+x22,  y1+y22).M = \left(\frac{x_1 + x_2}{2},\; \frac{y_1 + y_2}{2}\right).

For the same two points, M=(1+52,2+42)=(3,3)M = \left(\tfrac{1 + 5}{2}, \tfrac{2 + 4}{2}\right) = (3, 3). It lies on the line, as it must: 0.5(3)+1.5=30.5(3) + 1.5 = 3.

Where did slope and the letter m come from?

Slope as a number needs coordinates, and coordinates date from the 1630s. René Descartes published La Géométrie in 1637 as an appendix to his Discourse on Method, showing how geometric curves could be described by algebraic equations. Pierre de Fermat developed similar methods independently in his Ad locos planos et solidos isagoge (Introduction to Plane and Solid Loci), which circulated in manuscript around 1636 to 1637 but was not printed until 1679, after his death. Fermat showed that an equation of the first degree in two unknowns describes a straight line, which is the seed of everything in this article. Neither man used the clean picture of two perpendicular number lines with negative values that students now draw; that convention settled over the following century and a half.

The letter mm has a more uncertain story. You will often read that it comes from the French monter, “to climb”. There is no evidence for this. Jeff Miller’s Earliest Uses of Symbols of Geometry, hosted by the MacTutor archive at St Andrews, states that it is not known why mm was chosen and that the choice may have been arbitrary; it traces the monter remark to a high-school textbook that itself called the link unsupported, and notes that Descartes did not use mm. The earliest use of mm that Miller records is in Vincenzo Riccati’s 1757 Opuscula, which writes a first-degree equation as y=mx+ny = mx + n. Matthew O’Brien used y=mx+cy = mx + c in 1842 and 1844, George Salmon used y=mx+by = mx + b in his widely read Treatise on Conic Sections from 1848, and the notation spread through British and then American textbooks. It never became universal: Swedish and Russian textbooks commonly use kk for slope, and Dutch textbooks often write y=ax+by = ax + b.

Point-slope form has a recorded early sighting too: Carl Boyer’s History of Analytic Geometry points to Gaspard Monge’s memoir on cuts and fills (déblais et remblais), printed in the Paris Academy’s volume for 1781, as perhaps the first place the modern point-slope equation of a line appears explicitly.

The ratio is old, the notation is a historical accident, and the idea underneath is the one on the yellow road sign: how much up for how much across. Learn to compute it from two points, read it from y=mx+by = mx + b, and recognise it as a rate with units, and you have the tool that analytic geometry, calculus and statistics all build on.


Related topics: What Is a Derivative? The Difference Quotient Explained, How Does Linear Regression Work? Least Squares From Scratch, Sine, Cosine and Tangent, The Pythagorean Theorem Explained, Linear Programming, Vector Spaces, Percentage Points vs Percentage Change

Frequently asked

What is the slope formula?

For two points (x1, y1) and (x2, y2) on a line, the slope is m = (y2 - y1) / (x2 - x1). The top is the rise, the vertical change, and the bottom is the run, the horizontal change. For the points (1, 2) and (5, 4) the slope is 2 divided by 4, which is 1/2.

How do you find the slope from two points?

Subtract the y-coordinates, subtract the x-coordinates in the same order, and divide the first difference by the second. The order of the points does not matter as long as you use the same order on top and bottom, because swapping both points flips the sign of numerator and denominator together and the fraction is unchanged.

What does y = mx + b mean?

It is the slope-intercept form of a straight line. The number m is the slope, the change in y for every increase of 1 in x, and b is the y-intercept, the value of y where the line crosses the y-axis at x = 0. In y = 0.5x + 1.5 the line rises half a unit per unit to the right and crosses the y-axis at 1.5.

What is the slope of a horizontal and a vertical line?

A horizontal line has slope 0, because the rise between any two of its points is zero; its equation is y = c. A vertical line has undefined slope, because the run between any two of its points is zero and the slope formula would require dividing by zero; its equation is x = c and it cannot be written in the form y = mx + b.

How do you find the equation of a line from two points?

First compute the slope m from the two points. Then substitute m and either point into the point-slope form y - y1 = m(x - x1) and simplify. For (-1, 4) and (3, -2) the slope is -6/4 = -3/2, and the line is y = -1.5x + 2.5, or 3x + 2y = 5 in standard form.

How are the slopes of perpendicular lines related?

Two non-vertical lines are perpendicular exactly when the product of their slopes is -1, so each slope is the negative reciprocal of the other. A line of slope 2 is perpendicular to every line of slope -1/2. The rule follows from rotating a direction vector (1, m) by 90 degrees, which gives (-m, 1) and hence slope -1/m.