Linear equations in two variables

Learning objectives

What you should be able to do

Connect equations, ordered pairs, tables, and graphs; calculate and interpret slope; write a line from points or a slope; use parallel and perpendicular relationships; interpret intercepts and coefficients; and model a constraint involving two quantities.

A line is a set of solutions

A linear equation in two variables has the form Ax + By = C, where A and B are not both zero. A solution is an ordered pair (x, y) that makes the equation true. Its graph consists of all such pairs. One equation usually does not determine one unique pair; it determines a relationship between the coordinates.

The first coordinate is the horizontal position, and the second is the vertical position. On the x-axis, y = 0; on the y-axis, x = 0. An intercept is where the line meets an axis. Distinguish an intercept’s coordinate value from the full point: an x-intercept of 6 means the point (6, 0).

Slope is change in output divided by change in input. For two points with different x-coordinates,

m = ΔyΔx = y2 − y1x2 − x1.

Use the same subtraction order in numerator and denominator. Reversing both orders leaves the slope unchanged; reversing only one changes its sign incorrectly.

A line passes through (−2, 1) and (5, 8). A dashed triangle shows a horizontal change of 7 and vertical change of 7; the labeled slope is 7 divided by 7, or 1.xy(−2,1)(5,8)Δx=7Δy=7m=77=1

The slope triangle uses coordinate changes, not the angle a printed line seems to make.

Read the scale before counting squares. If a horizontal square is worth 2 units and a vertical square is worth 3 units, rising one square and moving right one square produces slope 3/2, not 1. The shape of a drawing can also change when a graph is stretched, but its labeled coordinate relationships do not.

Signs have meaning. Positive slope means y increases as x increases; negative slope means y decreases. A horizontal line has slope zero. A vertical line has undefined slope because its horizontal change is zero.

Choose the equation form that exposes the information

The same nonvertical line can be represented in several forms. Forms are tools, not different kinds of lines.

Form

Equation

What it makes convenient

Slope-intercept

y = mx + b

Read slope m and y-intercept b.

Point-slope

y − y1 = m(x − x1)

Use a known point and slope directly.

Standard

Ax + By = C

Model a total; find intercepts by setting a coordinate to zero.

Vertical

x = h

The same x-coordinate at every point.

Horizontal

y = k

The same y-coordinate at every point.

From two points to a line. First compute m. Then use either point in point-slope form, or substitute into y = mx + b to find b. If the two points have the same x-coordinate, stop: the line is vertical and cannot be written as y = mx + b.

For Ax + By = C, if B ≠ 0, solving for y gives

y = −AB x + CB.

Thus the slope is −A/B, not A/B. When A ≠ 0, the x-intercept is C/A. When B ≠ 0, the y-intercept is C/B. If a denominator is zero, use the actual equation rather than a formula that does not apply.

Parallel and perpendicular lines

Distinct nonvertical parallel lines have equal slopes and different y-intercepts. Equal slopes and equal intercepts describe the same line, not two distinct lines. Two distinct vertical lines are parallel as well.

Perpendicular nonvertical lines have slopes whose product is −1. If one slope is m ≠ 0, the perpendicular slope is −1/m: reverse the fraction and change its sign. The special case is a horizontal line paired with a vertical line; the product rule is not usable because one slope is undefined.

Why a negative reciprocal appears

A direction with horizontal and vertical changes (u, v) rotates through a right angle to (−v, u). Its original slope is v/u; its rotated slope is u/(−v). Their product is −1 when both slopes exist. The sign change and reciprocal come from the geometry of a right-angle turn.

A quick verification habit. After writing a line, substitute the given point and verify the required slope relationship. These are independent checks: a line can have the correct slope but pass through the wrong point, or the correct point but the wrong slope.

Coefficients, intercepts, tables, and constraints

An equation such as 4x + 7y = 140 can represent combinations of two purchases. If x and y count items priced at $4 and $7, each term has units of dollars. The right side is the fixed total. Neither variable has to be “the output” until you choose how to view the relationship.

A coefficient is not automatically a rate of y per x. In 4x + 7y = 140, the numbers 4 and 7 are per-item prices. Solving for y gives y = 20 − (4/7)x, so the rate at which y changes with x is −4/7. Holding a total fixed creates a tradeoff: increasing one type of item forces the other to decrease.

Interpret intercepts with the context. Setting x = 0 describes buying only the y-type item; setting y = 0 describes buying only the x-type item. The full mathematical line extends forever, but a purchase model may allow only nonnegative whole-number points. A fractional axis intercept still describes the algebraic line even when that exact purchase is impossible.

One relationship, four representations

Equation: substitute a coordinate, solve for the other, or isolate the slope.

Table: compute Δy/Δx between rows; a linear relationship requires a consistent rate.

Graph: use labeled points and axes, then connect the coordinates to an equation.

Words: define variables, attach units, and translate the fixed total or rate.

Unequal input gaps. A table can represent a line even when the x values are not evenly spaced. Compare rates, not raw output differences. If x changes by 2 in one interval and 6 in another, the corresponding y changes should be in the ratio 2 : 6 for a nonzero constant slope.

Equivalent line equations. Multiplying all of A, B, and C by the same nonzero number leaves Ax + By = C unchanged as a set of points. Matching only two coefficients is not enough to guarantee the same line. For a known point, substitution is often the quickest way to reject a proposed equation.

Translations. If a point (u, v) is shifted right h and up k, its new coordinates are (x, y) = (u + h, v + k). Therefore u = x − h and v = y − k. A translated version of Au + Bv = C has equation

A(x − h) + B(y − k) = C.

This explains the apparently backward signs inside translated equations; they recover the old coordinates from the new ones.

Scope connection. This section studies the whole line as a solution set. Section 3 views a nonvertical line as a function with a chosen input and output. Section 4 asks where two constraints hold simultaneously.

15 worked examples

2.01. Test an ordered pair in the original equation

Which ordered pair satisfies 3x + 2y = 17?

A) (3, 2) B) (3, 4) C) (4, 3) D) (5, 2)

Show worked solutionHide worked solution for example 2.01

Recognize the structure. The first coordinate replaces x; the second replaces y.

Work it through. For (3, 4), the left side is 3(3) + 2(4) = 9 + 8 = 17. The other options give 13, 18, and 19, respectively, so only one pair works.

Answer: B, (3, 4).

Key takeaway. A solution to a two-variable equation is a pair, not two independent solutions. The pair must satisfy the equation as a whole.

Avoid the trap. Switching the coordinates changes the test. In general, (x, y) and (y, x) are not interchangeable.

2.02. Compute slope with negative coordinates

A line passes through (−3, 8) and (5, −4). What is its slope?

Show worked solutionHide worked solution for example 2.02

Recognize the structure. Use the same point order in both coordinate differences.

Work it through. Moving from the first point to the second, the changes are Δy = −4 − 8 = −12 and Δx = 5 − (−3) = 8. Thus m = −128 = −32.

Answer: −32.

Check. As x increases from −3 to 5, y decreases from 8 to −4, so the slope must be negative.

Avoid the trap. 5 − (−3) is 8, not 2. Parentheses keep subtraction of a negative coordinate clear.

2.03. Read the coordinate scale, not the visual steepness

The graph shows a line through the labeled intercepts. What is its slope?

A descending line meets the vertical axis at 12 and the horizontal axis at 6. Horizontal grid labels increase by 2; vertical grid labels increase by 3.xy24683691215
Show worked solutionHide worked solution for example 2.03

Recognize the structure. The points are (0, 12) and (6, 0).

Work it through. Compute m = (0 − 12)/(6 − 0) = −12/6 = −2.

Answer: −2.

Avoid the trap. The axes use different values per grid interval. Counting four vertical squares and three horizontal squares would not give the coordinate slope.

2.04. Find an intercept by making the other coordinate zero

The line 4x + 5y = 20 intersects the x-axis at (a, 0). What is a?

A) −4/5 B) 4 C) 5 D) 20

Show worked solutionHide worked solution for example 2.04

Recognize the structure. Every point on the x-axis has y = 0.

Work it through. Substituting y = 0 gives 4x = 20, so x = 5.

Answer: C, 5.

Check. 4(5) + 5(0) = 20. The full intercept point is (5, 0).

Avoid the trap. Setting x = 0 would find the other intercept, (0, 4). The slope −4/5 is a different feature of the same line.

2.05. Write a line from a point and its slope

A line has slope 3 and passes through (2, −1). What is its equation in slope-intercept form?

Show worked solutionHide worked solution for example 2.05

Recognize the structure. Use y = 3x + b and determine the intercept from the given point.

Work it through. Substitute (2, −1):

−1 = 3(2) + b b = −7.

Therefore the equation is y = 3x − 7.

Answer: y = 3x − 7.

Another route. Point-slope form gives y − (−1) = 3(x − 2), so y + 1 = 3x − 6 and again y = 3x − 7.

Avoid the trap. The given y-coordinate is not necessarily the y-intercept. The point has x = 2, not x = 0.

2.06. Write an equation from two points

Which equation represents the line through (−2, 7) and (4, −5)?

A) 2x + y = 3 B) 2x − y = 3 C) x + 2y = 12 D) 2x + y = 11

Show worked solutionHide worked solution for example 2.06

Recognize the structure. Find the slope, then use either point to find the intercept.

Work it through. The slope is (−5 − 7)/(4 − (−2)) = −12/6 = −2. Write y = −2x + b and use (−2, 7):

7 = 4 + b b = 3.

Thus y = −2x + 3, or 2x + y = 3.

Answer: A, 2x + y = 3.

Check. Both points satisfy the proposed equation: 2(−2) + 7 = 3 and 2(4) − 5 = 3.

Another route. With answer choices, substitute both points into a promising equation. One passing point alone is not enough.

2.07. Identify the constant coordinate

A line passes through (−4, 6) and (3, 6). What is its equation?

A) x = −4 B) x = 3 C) y = 6 D) y = 6x

Show worked solutionHide worked solution for example 2.07

Recognize the structure. Both points have the same y-coordinate, so the line is horizontal.

Work it through. The vertical change is 6 − 6 = 0, while the horizontal change is 7. The slope is zero, and every point on the line has y = 6.

Answer: C, y = 6.

Key takeaway. A horizontal line fixes y and allows x to vary. A vertical line fixes x and allows y to vary.

Avoid the trap. A zero slope is not an undefined slope. Undefined slope comes from zero horizontal change, not zero vertical change.

2.08. A parallel line keeps the slope, not the intercept

A line passes through (−1, 5) and is parallel to 6x − 3y = 12. What is its y-intercept?

Show worked solutionHide worked solution for example 2.08

Recognize the structure. Convert the given line to slope-intercept form, then use the new point.

Work it through. Rearranging 6x − 3y = 12 gives y = 2x − 4, so the required line has slope 2. In y = 2x + b, substitute the new point: 5 = 2(−1) + b b = 7.

Answer: 7.

Check. The line y = 2x + 7 has the same slope as the original but a different intercept. It passes through (−1, 5).

Avoid the trap. The coefficient 6 in standard form is not the slope. Isolate y, or use −A/B = −6/(−3) = 2.

2.09. Use a negative reciprocal and the specified point

A line passes through (6, −1) and is perpendicular to 3x + 2y = 10. What is its y-intercept?

Show worked solutionHide worked solution for example 2.09

Recognize the structure. The original slope is −3/2, so the perpendicular slope is 2/3.

Work it through. Write the required line as y = (2/3)x + b. Substitution gives

−1 = 23(6) + b = 4 + b b = −5.

Answer: −5.

Check. The slopes multiply to (−3/2)(2/3) = −1, and (2/3)(6) − 5 = −1.

Avoid the trap. Changing only the sign gives 3/2, not the negative reciprocal 2/3. Both operations are necessary.

2.10. Interpret a tradeoff under a fixed total

A purchase consists of x notebooks at $4 each and y binders at $7 each, for a total of $140. If the number of binders increases by 4 while the total cost stays fixed, by how much must the number of notebooks decrease?

Show worked solutionHide worked solution for example 2.10

Recognize the structure. The extra spending on binders must be offset by an equal reduction in notebook spending.

Work it through. Four extra binders cost 4(7) = 28 dollars. Each notebook removed saves 4 dollars, so the required decrease is 28/4 = 7 notebooks.

Answer: 7 notebooks.

Another route. The changes satisfy 4Δx + 7Δy = 0. With Δy = 4, 4Δx + 28 = 0 gives Δx = −7.

Avoid the trap. The answer is the size of the decrease, 7, not the signed change −7. The units of the two item counts are not interchangeable.

2.11. Use a constant rate across unequal table intervals

The points in the table lie on one line. What is k?

x

−1

2

8

y

9

3

k

Show worked solutionHide worked solution for example 2.11

Recognize the structure. Compute slope using the known points; then apply it over the new input change.

Work it through. From x = −1 to x = 2, the slope is (3 − 9)/(2 − (−1)) = −6/3 = −2. From x = 2 to x = 8, the input increases by 6, so the output changes by (−2)(6) = −12. Thus k = 3 − 12 = −9.

Answer: −9.

Check. The line is y = −2x + 7, and at x = 8 it gives −16 + 7 = −9.

Avoid the trap. The table’s input gaps are 3 and 6. Subtracting 6 from each successive output would not preserve a constant slope.

2.12. Use intercepts to determine unknown coefficients

The line ax + by = 24 passes through (4, 0) and (0, −6). What is a + b?

Show worked solutionHide worked solution for example 2.12

Recognize the structure. An axis intercept eliminates one variable, leaving just one coefficient.

Work it through. Using (4, 0) gives 4a = 24, so a = 6. Using (0, −6) gives −6b = 24, so b = −4. Therefore

a + b = 6 + (−4) = 2.

Answer: 2.

Check. The equation 6x − 4y = 24 is true at both supplied intercepts.

Avoid the trap. The negative y-intercept makes b negative here. Taking its magnitude, 6, instead of its coordinate value, −6, changes the line.

2.13. Translate every point of a line

The graph of 2x − 5y = 10 is translated 3 units to the right and 4 units up. Which equation represents the translated line?

A) 2x − 5y = 36 B) 2x − 5y = 24 C) 2x − 5y = 4 D) 2x − 5y = −4

Show worked solutionHide worked solution for example 2.13

Recognize the structure. The old coordinates equal the new coordinates minus the shift.

Work it through. Replace the original coordinates with x − 3 and y − 4:

2(x − 3) − 5(y − 4) = 10 2x − 5y = −4.

Answer: D, 2x − 5y = −4.

Check. The original point (5, 0) moves to (8, 4). Substituting into the new equation gives 16 − 20 = −4.

Avoid the trap. A right shift uses x − 3 inside the equation, not x + 3. Tracking one actual point is a reliable sign check.

2.14. Solve for a parameter through a slope condition

The line (k − 1)x + 4y = 12 is perpendicular to y = 2x + 3. What is k?

Show worked solutionHide worked solution for example 2.14

Recognize the structure. The required slope is −1/2; isolate the parameterized slope.

Work it through. Solve the first equation for y:

y = −k − 14 x + 3.

Set −(k − 1)/4 = −1/2. Multiplying by −4 gives k − 1 = 2, so k = 3.

Answer: 3.

Check. With k = 3, the line is 2x + 4y = 12, whose slope is −1/2. The product with 2 is −1.

Avoid the trap. Do not set k − 1 = −1/2. The coefficient of x before isolating y is not the slope.

2.15. A relationship between intercepts determines the slope

A line has intercepts (a, 0) and (0, 2a), where a > 0. The line passes through (3, 10). What is a?

Show worked solutionHide worked solution for example 2.15

Recognize the structure. The intercept ratio fixes the slope even before you know either intercept.

Work it through. Using the intercept points,

m = 0 − 2aa − 0 = −2,

where a > 0 ensures the denominator is nonzero. The line is therefore y = −2x + 2a. Substitute (3, 10):

10 = −6 + 2a a = 8.

Answer: 8.

Check. The intercepts are (8, 0) and (0, 16); the equation y = −2x + 16 also gives y = 10 at x = 3.

Avoid the trap. An intercept relationship may reveal a slope without revealing a size. Use the extra point to determine that remaining size.

Mastery check and error prevention

Attempt the exit check below, then reveal each answer and explanation.

Topic practice

Before leaving this section

Check that you can locate an intercept without confusing the axes, distinguish zero from undefined slope, calculate rates using actual coordinate scales, and check both the point and the slope of a proposed line.