Linear Equations & Functions

Study Sheet

Linear Equations & Functions

Everything you need: the coordinate plane, functions, slope, and the equations of lines

The Coordinate Plane

Concept
Axes, Origin, and Ordered Pairs

The coordinate plane is formed by two number lines that cross at the origin (0,0)(0,0).

  • The horizontal line is the xx-axis; the vertical line is the yy-axis.
  • Every point is named by an ordered pair (x,y)(x,y). The first number xx tells how far right (++) or left (−-) you go; the second number yy tells how far up (++) or down (−-).
  • The axes split the plane into four quadrants, numbered counterclockwise: @@BLOCK0@@

A linear function changes by the same amount for each unit step — that constant is the slope. Its graph is a line, and the three standard forms (slope-intercept, point-slope, standard) are the same information organized for different tasks: reading the intercept, building from a point, or spotting intercepts. Parallel lines share a slope; perpendicular slopes multiply to −1-1.

Two perpendicular number lines give every point of the plane exactly one address, and every address exactly one point. That two-way match is what lets algebra and geometry trade places for the rest of the course: an equation becomes a picture (its graph), and a geometric question (where do two lines meet?) becomes an equation.

Example
Plotting and naming points
xy−5−4−3−2−11234−6−5−4−3−2−1123A(3, 2)B(−4, 1)(−2, −5)
The three points of the example, one in each of Quadrants I, II, III.

Plot A(3,2)A(3,2): from the origin go right 33, then up 22. This lands in Quadrant I.

Plot B(−4,1)B(-4,1): go left 44, then up 11. This is in Quadrant II.

Name the point that is left 22 and down 55: that is (−2,−5)(-2,-5), which is in Quadrant III.

Side note
Where it goes wrong

Plotting (0,4)(0, 4) on the xx-axis because "it has a 44 in it." The xx-coordinate is 00, so there is no sideways move at all; the point is 44 up the yy-axis.

Tip

Order matters! (3,2)(3,2) and (2,3)(2,3) are different points. Always read (x,y)(x,y): run first (left/right), then rise (up/down). Points on an axis (like (0,4)(0,4) or (−3,0)(-3,0)) belong to no quadrant.

Try it
Try it: quadrants and axes

Name the quadrant or axis for (−7,2)(-7, 2), (5,−1)(5, -1), (0,−3)(0, -3), (−2,−9)(-2, -9).

Show the answer

(−7,2)(-7, 2): signs (−,+)(-, +), Quadrant II. (5,−1)(5, -1): (+,−)(+, -), Quadrant IV. (0,−3)(0, -3): x=0x = 0, so it is on the yy-axis. (−2,−9)(-2, -9): (−,−)(-, -), Quadrant III.

Functions and Function Notation

Concept
What Is a Function?

A function is a rule that assigns to each input exactly one output. Think of it as a machine: put in xx, get out one value.

We write f(x)f(x) (read “ff of xx”) for the output when the input is xx. Here xx is the input and f(x)f(x) is the output. The letters ff, gg, hh are just names for the rule.

The "exactly one output" condition is what makes a function predictable: once you know the input, the output is settled. That is also why the vertical line test works. A vertical line is the set of points with one particular input; if the graph met it twice, that input would have two outputs, and the rule would not be a function.

Example
Evaluating a function
xy−5−4−3−2−1123−4−2246810(3, 11)(0, 5)(−4, −3)
Each evaluation is one point on the graph of f(x)=2x+5f(x) = 2x + 5.

Let f(x)=2x+5f(x)=2x+5. To evaluate, substitute the input in place of xx.

f(3)=2(3)+5=6+5=11,f(0)=2(0)+5=0+5=5,f(−4)=2(−4)+5=−8+5=−3.\begin{aligned} f(3) &= 2(3)+5 = 6+5 = 11,\\ f(0) &= 2(0)+5 = 0+5 = 5,\\ f(-4) &= 2(-4)+5 = -8+5 = -3. \end{aligned}

So the ordered pairs (3,11)(3,11), (0,5)(0,5), and (−4,−3)(-4,-3) all lie on the graph of ff.

Side note
Where it goes wrong

Reading f(3)f(3) as "ff times 33." Function notation names an output: f(3)f(3) means "the output of ff when the input is 33," here 2(3)+5=112(3) + 5 = 11. The parentheses hold the input; they do not mean multiply.

Tip

Vertical Line Test: a graph is a function if no vertical line crosses it more than once. This checks the rule “one input, one output.”

Try it
Try it: evaluate and solve

Let g(x)=x2−3xg(x) = x^2 - 3x. Find g(−2)g(-2), then find every input xx with g(x)=0g(x) = 0.

Show the answer

g(−2)=(−2)2−3(−2)=4+6=10g(-2) = (-2)^2 - 3(-2) = 4 + 6 = 10. For g(x)=0g(x) = 0: x2−3x=x(x−3)=0x^2 - 3x = x(x - 3) = 0, so x=0x = 0 or x=3x = 3. Two inputs can share an output; what a function forbids is one input with two outputs.

Domain and Range

Concept
Inputs and Outputs

The domain is the set of all allowed inputs (the xx-values). The range is the set of all resulting outputs (the yy-values).

Drop each point straight onto the xx-axis and the shadows are the domain; slide each point onto the yy-axis and those shadows are the range. That picture explains why a repeated output is listed once (two points cast the same shadow on the yy-axis) and why a line with no restrictions has domain and range "all real numbers": its shadows cover both axes completely.

Example
Domain and range from a set of points
xy123456−4−2246
Shadows on the xx-axis: domain {1,2,5,6}\{1, 2, 5, 6\}. On the yy-axis: range {−3,4,7}\{-3, 4, 7\}.

For the function {(1,4),(2,7),(5,7),(6,−3)}\{(1,4),(2,7),(5,7),(6,-3)\}:

  • Domain (inputs): {1,2,5,6}\{1,2,5,6\}.
  • Range (outputs): {4,7,−3}\{4,7,-3\}. We list 77 only once even though it appears twice.

This is a function because each input has exactly one output.

Side note
Where it goes wrong

Swapping the two: listing the range of {(1,4),(2,7),(5,7),(6,−3)}\{(1,4),(2,7),(5,7),(6,-3)\} as {1,2,5,6}\{1, 2, 5, 6\}. The range is the set of outputs, the second coordinates: {−3,4,7}\{-3, 4, 7\}.

Tip

For a line like y=2x+1y=2x+1 with no restrictions, the domain is all real numbers and so is the range. A horizontal line y=3y=3 has range {3}\{3\} only.

Try it
Try it: domain and range

Give the domain and range of {(−2,0),(0,3),(3,3),(4,−1)}\{(-2, 0), (0, 3), (3, 3), (4, -1)\}. Is it a function? What about {(1,2),(1,5)}\{(1, 2), (1, 5)\}?

Show the answer

Domain (first coordinates): {−2,0,3,4}\{-2, 0, 3, 4\}. Range (second coordinates): {−1,0,3}\{-1, 0, 3\}. It is a function: no input repeats. {(1,2),(1,5)}\{(1, 2), (1, 5)\} is not: the input 11 has two outputs.

Rate of Change and Slope

Concept
Slope = Rise over Run

Slope mm measures steepness: how much yy changes for each unit that xx increases. Given two points (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2),

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

Slope is the rate of change of the line.

Why is the slope the same wherever you measure it? Any two slope triangles drawn on one line are similar: their horizontal sides are parallel, their slanted sides lie on the same line, so their angles match. Similar triangles have proportional sides, so rise divided by run comes out the same for every pair of points. That constant is what makes a line a line, and it is the rate at which yy changes per unit of xx.

Example
Slope from two points
xy1234246810(1, 2)(4, 11)run 3rise 9
Run 33, rise 99: slope 93=3\tfrac93 = 3.

Find the slope through (1,2)(1,2) and (4,11)(4,11).

m=11−24−1=93=3.m=\frac{11-2}{4-1}=\frac{9}{3}=3.

Each time xx goes up by 11, yy goes up by 33.

Side note
Where it goes wrong

Mixing the order of the points: 11−21−4=9−3=−3\tfrac{11 - 2}{1 - 4} = \tfrac{9}{-3} = -3. The top starts with the point (4,11)(4, 11) and the bottom starts with (1,2)(1, 2). Use the same point first in both: 11−24−1=3\tfrac{11 - 2}{4 - 1} = 3. A line that clearly rises cannot have a negative slope.

Example
A negative slope
xy−3−2−112−4−3−2−112345(−2, 5)(2, −3)run 4rise −8
Run 44, rise −8-8: slope −84=−2\tfrac{-8}{4} = -2.

Find the slope through (−2,5)(-2,5) and (2,−3)(2,-3).

m=−3−52−(−2)=−84=−2.m=\frac{-3-5}{2-(-2)}=\frac{-8}{4}=-2.

The line falls: as xx increases by 11, yy decreases by 22.

Tip

Reading the sign of slope:

  • Positive slope →\to line goes up left-to-right.
  • Negative slope →\to line goes down left-to-right.
  • Zero slope →\to horizontal line (no rise): m=0m=0.
  • Undefined slope →\to vertical line (run is 00, and we can't divide by 00).

Subtract the yy's and the xx's in the same order. Keep the points in the same order top and bottom!

Try it
Try it: rate of change

A phone plan costs $38\$38 for 44 GB of data and $53\$53 for 99 GB. Find the rate of change and say what it means.

Show the answer

Treat the plans as points (4,38)(4, 38) and (9,53)(9, 53). Rate of change =53−389−4=155=3= \tfrac{53 - 38}{9 - 4} = \tfrac{15}{5} = 3. Each extra gigabyte costs $3\$3.

Slope-Intercept Form: y=mx+by=mx+b

Concept
Read the Slope and Intercept Directly

In slope-intercept form

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

the number mm is the slope and bb is the yy-intercept (the yy-value where the line crosses the yy-axis, at the point (0,b)(0,b)).

Why are mm and bb exactly the slope and intercept? Put x=0x = 0 into y=mx+by = mx + b and you get y=by = b, so the line crosses the yy-axis at (0,b)(0, b). Then every step of 11 to the right adds mm to yy, because m(x+1)+b=(mx+b)+mm(x + 1) + b = (mx + b) + m. A starting value and a constant change per step: that is all a line is.

Example
Identify and graph
xy−2−112345−3−2−1123(0, −2)(4, 1)run 4rise 3
Start at (0,−2)(0, -2); right 44, up 33 reaches (4,1)(4, 1).

For y=34x−2y=\tfrac{3}{4}x-2: the slope is m=34m=\tfrac{3}{4} and the yy-intercept is b=−2b=-2, so the line passes through (0,−2)(0,-2).

To graph: start at (0,−2)(0,-2). Use the slope 34\tfrac{3}{4} (rise 33, run 44): move right 44 and up 33 to reach (4,1)(4,1). Connect the points.

Side note
Where it goes wrong

Reading the intercept of y=4−3xy = 4 - 3x as −3-3 and the slope as 44, because of the order. Match the pieces to y=mx+by = mx + b: the number multiplying xx is the slope, m=−3m = -3, and the constant is the intercept, b=4b = 4.

Example
Finding bb when you know slope and a point

A line has slope m=5m=5 and passes through (2,3)(2,3). Substitute into y=mx+by=mx+b:

3=5(2)+b  ⇒  3=10+b  ⇒  b=−7.3=5(2)+b \;\Rightarrow\; 3=10+b \;\Rightarrow\; b=-7.

The equation is y=5x−7y=5x-7.

Tip

A whole-number slope like 44 is really 41\tfrac{4}{1}: rise 44, run 11. To go the other direction on a line, you may move left and down instead.

Try it
Try it: from a sentence to a line

A tank holds 6060 liters and drains 44 liters per minute. Write the amount yy after xx minutes in slope-intercept form, and find when the tank is empty.

Show the answer

Start 6060, change −4-4 per minute: y=−4x+60y = -4x + 60. Empty means y=0y = 0: −4x+60=0-4x + 60 = 0, so x=15x = 15 minutes. The xx-intercept (15,0)(15, 0) is the moment it empties.

Point-Slope Form: y−y1=m(x−x1)y-y_1=m(x-x_1)

Concept
Build a Line from a Slope and Any Point

If a line has slope mm and passes through (x1,y1)(x_1,y_1), its equation is

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

This is the fastest way to write a line when you know a point and the slope.

Point-slope form is the slope formula with one point left free. A point (x,y)(x, y) is on the line through (x1,y1)(x_1, y_1) with slope mm exactly when the slope from (x1,y1)(x_1, y_1) to (x,y)(x, y) is mm: y−y1x−x1=m\tfrac{y - y_1}{x - x_1} = m. Multiply both sides by x−x1x - x_1 and you have y−y1=m(x−x1)y - y_1 = m(x - x_1). It uses the given point directly, so no intercept has to be found first.

Example
Point-slope, then simplify
xy−112345−22468(3, 4)(0, −2)12
Slope 22 through (3,4)(3, 4); simplifying reveals the intercept (0,−2)(0, -2).

Slope m=2m=2 through (3,4)(3,4):

y−4=2(x−3).y-4=2(x-3).

Distribute and solve for yy to get slope-intercept form:

y−4=2x−6  ⇒  y=2x−2.y-4=2x-6 \;\Rightarrow\; y=2x-2.
Side note
Where it goes wrong

Using the point's coordinates with the wrong signs: for (−1,5)(-1, 5) and m=3m = 3, writing y+5=3(x−1)y + 5 = 3(x - 1). The form subtracts the coordinates: y−5=3(x−(−1))=3(x+1)y - 5 = 3(x - (-1)) = 3(x + 1). Check: x=−1x = -1 must give y=5y = 5, and 5−5=3⋅05 - 5 = 3 \cdot 0 works.

Tip

Watch the signs: with a point like (−1,5)(-1,5), the form is y−5=m(x−(−1))=m(x+1)y-5=m(x-(-1))=m(x+1). Subtracting a negative becomes adding.

Try it
Try it: point-slope

Write the line with slope −12-\tfrac12 through (−4,7)(-4, 7) in point-slope form and in slope-intercept form.

Show the answer

Point-slope: y−7=−12(x+4)y - 7 = -\tfrac12(x + 4). Distribute: y−7=−12x−2y - 7 = -\tfrac12 x - 2, so y=−12x+5y = -\tfrac12 x + 5. Check with x=−4x = -4: 2+5=72 + 5 = 7.

Standard Form: Ax+By=CAx+By=C

Concept
Standard Form and Intercepts

Standard form is Ax+By=CAx+By=C, where AA, BB, CC are integers. It is especially handy for finding both intercepts:

  • xx-intercept: set y=0y=0 and solve for xx. Point (x,0)(x,0).
  • yy-intercept: set x=0x=0 and solve for yy. Point (0,y)(0,y).

Intercepts are easy in standard form because each one sits on an axis where the other coordinate is 00. Setting y=0y = 0 wipes out the ByBy term and leaves Ax=CAx = C; setting x=0x = 0 leaves By=CBy = C. Two points determine a line, so those two quick divisions are enough to graph it. The slope is hidden but recoverable: solving for yy gives y=−ABx+CBy = -\tfrac{A}{B}x + \tfrac{C}{B}.

Example
Finding both intercepts
xy−112345−1123456(4, 0)(0, 6)3x + 2y = 12
The two intercepts, (4,0)(4, 0) and (0,6)(0, 6), pin down the line.

For 3x+2y=123x+2y=12:

x-intercept: 3x+2(0)=12⇒3x=12⇒x=4, point (4,0).y-intercept: 3(0)+2y=12⇒2y=12⇒y=6, point (0,6).\begin{aligned} x\text{-intercept: } & 3x+2(0)=12 \Rightarrow 3x=12 \Rightarrow x=4, \text{ point }(4,0).\\ y\text{-intercept: } & 3(0)+2y=12 \Rightarrow 2y=12 \Rightarrow y=6, \text{ point }(0,6). \end{aligned}

Plot (4,0)(4,0) and (0,6)(0,6) and draw the line through them.

Side note
Where it goes wrong

Reading the slope of 3x+2y=123x + 2y = 12 as 33. Solve for yy first: 2y=−3x+122y = -3x + 12, so y=−32x+6y = -\tfrac32 x + 6 and the slope is −32-\tfrac32. The graph confirms it: from (0,6)(0, 6) to (4,0)(4, 0) the line falls 66 over a run of 44.

Tip

To convert y=mx+by=mx+b to standard form, move the xx-term to the left and clear fractions. Example: y=23x+1⇒3y=2x+3⇒−2x+3y=3⇒2x−3y=−3y=\tfrac{2}{3}x+1 \Rightarrow 3y=2x+3 \Rightarrow -2x+3y=3 \Rightarrow 2x-3y=-3.

Try it
Try it: intercepts

Find the intercepts and the slope of 5x−4y=205x - 4y = 20.

Show the answer

y=0y = 0: 5x=205x = 20, x=4x = 4, point (4,0)(4, 0). x=0x = 0: −4y=20-4y = 20, y=−5y = -5, point (0,−5)(0, -5). Slope from (0,−5)(0, -5) to (4,0)(4, 0): 0−(−5)4−0=54\tfrac{0 - (-5)}{4 - 0} = \tfrac54 (and −AB=−5−4=54-\tfrac{A}{B} = -\tfrac{5}{-4} = \tfrac54 agrees).

Writing the Equation of a Line

Concept
Three Common Situations
  • Slope ++ point: plug into point-slope y−y1=m(x−x1)y-y_1=m(x-x_1), then simplify.
  • Two points: first find m=y2−y1x2−x1m=\dfrac{y_2-y_1}{x_2-x_1}, then use point-slope with either point.
  • From a graph: read bb (where it crosses the yy-axis) and count rise/run for mm; write y=mx+by=mx+b.

Every recipe here gathers the same two ingredients, a slope and one point, because those two facts determine a line: the point fixes where it is, the slope fixes which way it goes. Two points are enough because they give the slope; a graph is enough because it shows the intercept and a slope triangle.

Example
Line through two points
xy−112345246810(1, 3)(5, 11)(0, 1)
Slope 22 from the two points; the line meets the yy-axis at (0,1)(0, 1).

Write the line through (1,3)(1,3) and (5,11)(5,11).

m=11−35−1=84=2.m=\frac{11-3}{5-1}=\frac{8}{4}=2.

Use point-slope with (1,3)(1,3):   y−3=2(x−1)⇒y−3=2x−2⇒y=2x+1.\;y-3=2(x-1)\Rightarrow y-3=2x-2 \Rightarrow y=2x+1.

Check with the other point: 2(5)+1=112(5)+1=11. ✓

Side note
Where it goes wrong

Finding the slope and then stopping: "the line through (1,3)(1, 3) and (5,11)(5, 11) is y=2xy = 2x." A slope alone describes a whole family of parallel lines. Use a point to choose the right one: 3=2(1)+b3 = 2(1) + b gives b=1b = 1, so y=2x+1y = 2x + 1.

Tip

Always check your equation by plugging in the point you did not use. If both points satisfy the equation, you can be confident it is right.

Try it
Try it: two points

Write the equation of the line through (−3,8)(-3, 8) and (6,−4)(6, -4).

Show the answer

Slope: m=−4−86−(−3)=−129=−43m = \tfrac{-4 - 8}{6 - (-3)} = \tfrac{-12}{9} = -\tfrac43. Point-slope with (−3,8)(-3, 8): y−8=−43(x+3)=−43x−4y - 8 = -\tfrac43(x + 3) = -\tfrac43 x - 4, so y=−43x+4y = -\tfrac43 x + 4. Check the other point: −43(6)+4=−8+4=−4-\tfrac43(6) + 4 = -8 + 4 = -4.

Parallel and Perpendicular Lines

Concept
Comparing Slopes
  • Parallel lines never meet: they have equal slopes, m1=m2m_1=m_2.
  • Perpendicular lines meet at a right angle: their slopes are negative reciprocals, m1⋅m2=−1m_1\cdot m_2=-1, so m2=−1m1m_2=-\dfrac{1}{m_1}.

Parallel lines never meet, and two lines with different slopes always do (they separate at a steady rate, so they must cross somewhere), so parallel lines must share a slope. For perpendicular lines, turn a slope triangle with run 33 and rise 22 by a quarter turn: the run becomes a rise of 33 and the rise becomes a run of 22 in the opposite direction, so the new slope is −32-\tfrac32. Flipping and changing the sign is that quarter turn.

Example
Parallel and perpendicular slopes
xy−11234567891011−112345678(6, 1)
Upper line y=23x+4y = \tfrac23 x + 4; the lower line y=23xy = \tfrac23 x is parallel to it. The steep line through (6,1)(6, 1), y=−32x+10y = -\tfrac32 x + 10, meets it at a right angle.

A line has slope m=23m=\tfrac{2}{3}.

  • Any parallel line also has slope 23\tfrac{2}{3}.
  • A perpendicular line has slope −32-\tfrac{3}{2} (flip and change the sign).

Write the line through (6,1)(6,1) perpendicular to y=23x+4y=\tfrac{2}{3}x+4: use m=−32m=-\tfrac{3}{2}.

y−1=−32(x−6)⇒y−1=−32x+9⇒y=−32x+10.y-1=-\tfrac{3}{2}(x-6)\Rightarrow y-1=-\tfrac{3}{2}x+9 \Rightarrow y=-\tfrac{3}{2}x+10.
Side note
Where it goes wrong

Only flipping, or only changing the sign: calling −2-2 perpendicular to 22, or 12\tfrac12 perpendicular to 22. Test the product: 2⋅(−2)=−42 \cdot (-2) = -4 and 2⋅12=12 \cdot \tfrac12 = 1, neither is −1-1. The perpendicular slope is −12-\tfrac12.

Tip

Negative reciprocal means do two things: (1) flip the fraction, (2) switch the sign. So 3=31→−133=\tfrac{3}{1}\to -\tfrac{1}{3}, and −45→54-\tfrac{4}{5}\to \tfrac{5}{4}.

Try it
Try it: build both

Write the line through (2,−1)(2, -1) parallel to 4x−2y=74x - 2y = 7, and the line through the same point perpendicular to it.

Show the answer

Solve for yy: y=2x−72y = 2x - \tfrac72, slope 22. Parallel: y+1=2(x−2)y + 1 = 2(x - 2), so y=2x−5y = 2x - 5. Perpendicular slope −12-\tfrac12: y+1=−12(x−2)y + 1 = -\tfrac12(x - 2), so y=−12xy = -\tfrac12 x. Check: 2⋅(−12)=−12 \cdot (-\tfrac12) = -1.

Horizontal and Vertical Lines

Concept
Special Lines
  • A horizontal line has the form y=cy=c. Every point has the same yy-value. Slope =0=0.
  • A vertical line has the form x=cx=c. Every point has the same xx-value. Slope is undefined. (A vertical line is not a function.)

On a horizontal line nothing rises, so the slope is 0run=0\tfrac{0}{\text{run}} = 0 and every point shares one yy-value: y=cy = c. On a vertical line nothing runs, so the slope would be rise0\tfrac{\text{rise}}{0}, which has no value; and every point shares one xx-value: x=cx = c. The equation names the coordinate that never changes.

Example
Reading and writing special lines
xy−3−2−11234−5−4−3−2−112(2, −3)y = −3x = 2
Through (2,−3)(2, -3): the horizontal line y=−3y = -3 and the vertical line x=2x = 2.

The horizontal line through (2,−3)(2,-3) is y=−3y=-3 (the yy-value stays −3-3).

The vertical line through (2,−3)(2,-3) is x=2x=2 (the xx-value stays 22).

The line y=5y=5 passes through (0,5)(0,5), (1,5)(1,5), (−4,5)(-4,5), all with height 55.

Side note
Where it goes wrong

Writing the horizontal line through (2,−3)(2, -3) as x=2x = 2 ("horizontal, so use xx"). Along a horizontal line the yy-value is what stays fixed, so it is y=−3y = -3; x=2x = 2 is the vertical line.

Tip

Mix-up alert: y=cy=c is horizontal (flat) and x=cx=c is vertical (straight up-and-down). Say it aloud: “yy equals a number is a floor; xx equals a number is a wall.”

Try it
Try it: special lines

Write the line through (−6,4)(-6, 4) that is (a) horizontal, (b) vertical, (c) perpendicular to y=9y = 9.

Show the answer

(a) Horizontal keeps y=4y = 4. (b) Vertical keeps x=−6x = -6. (c) y=9y = 9 is horizontal, so a perpendicular line is vertical: x=−6x = -6.

Going Deeper: Advanced Linear Functions

Concept
Moving Freely Among the Three Forms

Every non-vertical line can be written in three equivalent ways. Fluency means switching to whichever form a problem rewards.

  • Slope-intercept y=mx+by=mx+b — best for graphing and reading slope/intercept.
  • Point-slope y−y1=m(x−x1)y-y_1=m(x-x_1) — best when you know a point and the slope.
  • Standard Ax+By=CAx+By=C (integers, A≥0A\ge 0) — best for intercepts and for vertical lines x=cx=c.

Translation rules: to leave point-slope, distribute and solve for yy; to reach standard form, collect xx and yy on one side and clear denominators; to leave standard form, solve for yy so that m=−ABm=-\tfrac{A}{B} and b=CBb=\tfrac{C}{B}.

Example
One line, all three forms
xy−5−4−3−2−11234−11234(−2, 1)(4, 4)(0, 2)(−4, 0)
One line: intercepts (0,2)(0, 2) and (−4,0)(-4, 0), slope 12\tfrac12.

Write the line through (−2,1)(-2,1) and (4,4)(4,4) in every form.

m=4−14−(−2)=36=12,point-slope:y−1=12(x−(−2))=12(x+2),slope-intercept:y=12x+1+1=12x+2,standard form:2y=x+4  ⇒  −x+2y=4  ⇒  x−2y=−4.\begin{aligned} m &= \frac{4-1}{4-(-2)} = \frac{3}{6} = \tfrac{1}{2}, \\ \text{point-slope:}\quad y-1 &= \tfrac{1}{2}\bigl(x-(-2)\bigr) = \tfrac{1}{2}(x+2), \\ \text{slope-intercept:}\quad y &= \tfrac{1}{2}x + 1 + 1 = \tfrac{1}{2}x + 2, \\ \text{standard form:}\quad 2y &= x + 4 \;\Rightarrow\; -x + 2y = 4 \;\Rightarrow\; x - 2y = -4. \end{aligned}

Check: for (4,4)(4,4),   4−2(4)=4−8=−4\;4 - 2(4) = 4-8 = -4. ✓ And m=−AB=−1−2=12m=-\tfrac{A}{B}=-\tfrac{1}{-2}=\tfrac{1}{2} agrees.

Concept
Distance from a Point to a Line

The distance from a point (x0,y0)(x_0,y_0) to the line Ax+By+C=0Ax+By+C=0 is the length of the perpendicular segment from the point to the line:

d=∣Ax0+By0+C∣A2+B2.d=\frac{\lvert Ax_0+By_0+C\rvert}{\sqrt{A^2+B^2}}.

Move everything to one side first so the line reads Ax+By+C=0Ax+By+C=0. The absolute value keeps the distance positive; the denominator A2+B2\sqrt{A^2+B^2} scales for the line's slant.

Example
A perpendicular distance
xy−11234−1123(1, 1)d = 1
The shortest path from (1,1)(1, 1) meets the line at a right angle.

Find the distance from (1,1)(1,1) to the line 3x+4y=123x+4y=12.

Rewrite as 3x+4y−12=03x+4y-12=0, so A=3A=3, B=4B=4, C=−12C=-12. Then

d=∣3(1)+4(1)−12∣32+42=∣3+4−12∣25=∣−5∣5=55=1.d=\frac{\lvert 3(1)+4(1)-12\rvert}{\sqrt{3^2+4^2}} =\frac{\lvert 3+4-12\rvert}{\sqrt{25}} =\frac{\lvert -5\rvert}{5}=\frac{5}{5}=1.

The point sits exactly 11 unit from the line.

Concept
Collinearity and the Area of a Triangle

Three points A(x1,y1)A(x_1,y_1), B(x2,y2)B(x_2,y_2), C(x3,y3)C(x_3,y_3) form a triangle whose area is given by the shoelace formula

Area=12∣x1(y2−y3)+x2(y3−y1)+x3(y1−y2)∣.\text{Area}=\tfrac{1}{2}\bigl\lvert x_1(y_2-y_3)+x_2(y_3-y_1)+x_3(y_1-y_2)\bigr\rvert.

Collinearity test: the three points lie on one line exactly when this area is 00 (a “flat” triangle). Equivalently, the slope ABAB equals the slope BCBC.

Example
Area, then a collinearity check

(a) Area of the triangle with vertices A(1,1)A(1,1), B(5,2)B(5,2), C(3,6)C(3,6):

Area=12∣1(2−6)+5(6−1)+3(1−2)∣=12∣−4+25−3∣=12(18)=9.\begin{aligned} \text{Area} &= \tfrac{1}{2}\bigl\lvert 1(2-6)+5(6-1)+3(1-2)\bigr\rvert \\ &= \tfrac{1}{2}\bigl\lvert -4+25-3\bigr\rvert = \tfrac{1}{2}(18)=9. \end{aligned}

(b) Are (1,2)(1,2), (3,6)(3,6), (5,10)(5,10) collinear?

12∣1(6−10)+3(10−2)+5(2−6)∣=12∣−4+24−20∣=0.\tfrac{1}{2}\bigl\lvert 1(6-10)+3(10-2)+5(2-6)\bigr\rvert =\tfrac{1}{2}\lvert -4+24-20\rvert = 0.

Area 00, so yes — they lie on the single line y=2xy=2x (each slope equals 22).

Concept
Why the Slope Rules Are True (Two Short Proofs)

Parallel lines have equal slopes. Take y=m1x+b1y=m_1x+b_1 and y=m2x+b2y=m_2x+b_2. They intersect where m1x+b1=m2x+b2m_1x+b_1=m_2x+b_2, i.e. (m1−m2)x=b2−b1(m_1-m_2)x=b_2-b_1. If m1≠m2m_1\ne m_2 this has exactly one solution, so the lines cross. Parallel lines never cross, forcing m1=m2m_1=m_2.

Perpendicular lines have negative-reciprocal slopes. A line of slope mm points along the direction vector (1,m)(1,m). Rotating a direction by 90∘90^\circ sends (1,m)↦(−m,1)(1,m)\mapsto(-m,1), whose slope is 1−m=−1m\dfrac{1}{-m}=-\dfrac{1}{m}. Hence a perpendicular line has slope −1m-\tfrac{1}{m}, and m⋅(−1m)=−1m\cdot\left(-\tfrac{1}{m}\right)=-1.

Tip

Vertical/horizontal edge case. The negative-reciprocal rule assumes m≠0m\ne 0. A horizontal line (m=0m=0) is perpendicular to a vertical line (undefined slope); their “product” rule breaks down, so handle this pair by geometry, not algebra.

Concept
Piecewise and Step Functions

A piecewise function uses different rules on different parts of the domain. Each rule is paired with the interval where it applies:

f(x)={x+1,0≤x≤1,−x+3,1<x≤3.f(x)= \begin{cases} x+1, & 0\le x\le 1,\\ -x+3, & 1< x\le 3. \end{cases}

At the “seam” x=1x=1 both pieces give 22, so the graph connects. A step function is a piecewise function whose pieces are constant, producing a staircase of flat segments (for example, a parking rate that jumps to the next whole-hour price).

Example
Graphing a two-piece function
xy−1123−112(1, 2)
Two pieces meeting at the seam (1,2)(1, 2).

The function above, drawn on a grid: a rising segment then a falling segment, meeting at (1,2)(1,2).

Evaluate by choosing the rule for the input: f(0.5)=0.5+1=1.5f(0.5)=0.5+1=1.5 (first piece), while f(2)=−2+3=1f(2)=-2+3=1 (second piece).

Concept
Line of Best Fit (Linear Regression)

Real data rarely lands perfectly on one line. A line of best fit (or trend line) is the straight line y=mx+by=mx+b that passes as close as possible to all the points at once. The standard method, least squares, chooses mm and bb to make the total of the squared vertical gaps (the residuals) between the data and the line as small as possible.

  • The slope mm estimates the average rate of change in the data.
  • You can predict an unseen value by plugging its xx into y=mx+by=mx+b.
  • A fit is trustworthy only when the points genuinely cluster near a line; a strong straight-line pattern is called a strong (linear) correlation.
Tip

Correlation is not causation. A best-fit line can describe a pattern and forecast within the observed range, but it does not prove that xx causes yy, and predictions far outside the data (extrapolation) are unreliable.

Why It Works

Why do perpendicular slopes multiply to −1-1? Take a slope triangle with run aa and rise bb, so the slope is ba\tfrac ba. Turn it a quarter turn: the run aa becomes a rise of aa, and the rise bb becomes a run of bb in the opposite direction, −b-b. The new slope is a−b=−ab\tfrac{a}{-b} = -\tfrac ab, and ba⋅(−ab)=−1\tfrac ba \cdot \left(-\tfrac ab\right) = -1. And a line has constant slope because all its slope triangles are similar: they share the angle the line makes with the horizontal.

Tip
Reading a proof

Do not read a proof the way you read a rule. Cover the last line, ask what the previous line forces, and only then uncover it. If a step feels like magic, that is the step to work by hand with a concrete number.

Formulas, Proofs & Tips

Tip
Slope of a line
m=y2−y1x2−x1m = \frac{y_2-y_1}{x_2-x_1}

What it means. Rise over run: how much yy changes for each 11 that xx increases.

Example. Through (1,2)(1,2) and (4,8)(4,8): m=8−24−1=2m=\dfrac{8-2}{4-1}=2.

Why it works. Between two points on a line the vertical change is y2−y1y_2-y_1 and the horizontal change is x2−x1x_2-x_1. Similar triangles guarantee this ratio is the same wherever you measure it, so it is a property of the line itself.

Tip. Keep the points in the same order top and bottom. Reversing both gives the same slope; reversing only one flips the sign.

Tip
Slope-intercept and point-slope form
y=mx+bandy−y1=m(x−x1)y = mx + b \qquad\text{and}\qquad y - y_1 = m(x-x_1)

What it means. mm is the slope and bb is where the line crosses the yy-axis. Point-slope builds a line from a slope and any one point.

Example. Slope 33 through (2,1)(2,1): y−1=3(x−2)y-1=3(x-2), i.e. y=3x−5y=3x-5.

Why it works. Start from the slope formula with a general point (x,y)(x,y): m=y−y1x−x1m=\tfrac{y-y_1}{x-x_1}. Multiplying up gives point-slope. Choosing the point (0,b)(0,b) gives y−b=mxy-b=mx, i.e. y=mx+by=mx+b.

Tip. Given a point and a slope, use point-slope — no solving for bb needed. Rearrange at the end only if the answer must be in y=mx+by=mx+b form.

Tip
Distance and midpoint
d=(x2−x1)2+(y2−y1)2,M=(x1+x22, y1+y22)d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}, \qquad M=\left(\frac{x_1+x_2}{2},\ \frac{y_1+y_2}{2}\right)

What it means. The straight-line distance between two points, and the point exactly halfway between them.

Example. (1,2)(1,2) to (4,6)(4,6): d=32+42=5d=\sqrt{3^2+4^2}=5, midpoint =(2.5, 4)=(2.5,\,4).

Why it works. The two points are opposite corners of a right triangle with legs ∣x2−x1∣|x_2-x_1| and ∣y2−y1∣|y_2-y_1|; the distance is the hypotenuse, so Pythagoras gives the formula. The midpoint is just the average of the coordinates, since averaging lands halfway along each axis.

Tip. Distance is the Pythagorean theorem in disguise. Squaring removes any sign worry, so you never need absolute values here.