Skip to lesson content

Lesson 2 of 5

Straight Lines · Lesson 2 of 5

Equations of Straight Lines

“Build line equations from points, slopes and intercepts, and choose a form that matches the information given.”

Learning Objectives

• Explain why satisfying a line equation identifies a point on the line. • Derive point–slope, two-point, slope–intercept and intercept forms. • Handle horizontal and vertical lines and convert to general form. • Construct medians, perpendicular lines and lines with intercept constraints. • Interpret straight-line models with their variables, units and assumptions.

What a Line Equation Says

An equation of a line is a condition satisfied by every point on that line and by no other point. When we write an equation in x and y, we are describing an entire set of locations. A single point can be checked by substitution, while two distinct points usually determine which line we mean.

For example, y=2x+1 includes (0,1) and (2,5), because substituting each pair makes the equality true. It excludes (2,4), because 4 is not 2×2+1. The letters x and y vary over the line; a pair such as (x₀,y₀) names a fixed point used to construct it. Keep this distinction in mind when deriving formulas.

For a horizontal line, every point has the same y-coordinate. Its equation is y=k, irrespective of x. For a vertical line every point has the same x-coordinate, so the equation is x=h. Thus the x-axis is y=0 and the y-axis is x=0. A distance from an axis does not determine which side the line lies on: at distance a>0 from the x-axis, the two choices are y=a and y=−a.

Example — Lines parallel to the axes

Problem
Find the two lines through (−2,3) that are parallel to the coordinate axes.

  1. 1.The line parallel to the x-axis preserves y=3 while x varies, so its equation is y=3.
  2. 2.The line parallel to the y-axis preserves x=−2 while y varies, so its equation is x=−2.
  3. 3.Substitution verifies that (−2,3) lies on both lines, which meet at that point.

A Point and a Direction

A known point anchors the line, and a known slope supplies its direction. The slope ratio between the anchor and any other point on the line gives an equation. Multiplying out that ratio also brings the anchor itself back into the condition.

Let the anchor be P₀=(x₀,y₀) and let the line have finite slope m. For another point with x≠x₀, m=(y−y₀)/(x−x₀). Multiplying gives y−y₀=m(x−x₀). Unlike the ratio, this equation is also valid at x=x₀: it requires y=y₀. Therefore it describes the complete nonvertical line, including the anchor.

Point–slope formLaTeX
P₀=(x₀,y₀) is fixed and m is finite. A vertical line through P₀ is instead x=x₀.
Example — A negative slope through a given point

Problem
Find the line through (−2,3) with slope −4.

  1. 1.Start with y−3=−4(x−(−2))=−4(x+2).
  2. 2.Expand the right side: y−3=−4x−8.
  3. 3.Add 3 to both sides to obtain y=−4x−5, or 4x+y+5=0.
  4. 4.Check the anchor: 4(−2)+3+5=0. The slope of the rearranged equation is −4.

If two distinct points are given, calculate their slope and use either point as the anchor. The construction is not a new principle; it is the point–slope form with the slope written in terms of the endpoints. The subtraction order must match in numerator and denominator.

Two-point formLaTeX
Use when x₁≠x₂. For equal x-coordinates the line is x=x₁. Two identical points do not determine a unique line.
Two-point form without slope divisionLaTeX
This cross-multiplied form also represents a vertical line when the two points are distinct. If both differences vanish, it degenerates to 0=0 and describes no unique line.
Example — Two points determine a line

Problem
Find the line through (1,−1) and (3,5).

  1. 1.The slope is (5+1)/(3−1)=6/2=3.
  2. 2.Using the first point gives y+1=3(x−1).
  3. 3.Expand and subtract 1: y=3x−4, or −3x+y+4=0.
  4. 4.Check the second point: 5=3×3−4. Both given points lie on the line.

Intercepts as Convenient Anchor Points

An intercept is the signed coordinate where a line meets an axis. Its sign tells us which side of the origin the meeting point lies on. Intercepts are convenient because one coordinate is zero, which simplifies the point–slope or two-point form.

If a line has slope m and y-intercept c, its known point is (0,c). Inserting this point gives y−c=m(x−0), hence y=mx+c. If instead its x-intercept is d, the anchor is (d,0), giving y=m(x−d). The word intercept here means a signed coordinate, not necessarily a positive length.

Slope and y-interceptLaTeX
m is the finite slope and c is the signed y-intercept. For c<0 the crossing is below the origin.
Slope and x-interceptLaTeX
d is the signed x-intercept. If m=0 this becomes y=0, which is the entire x-axis and has no single x-intercept.
Example — The same slope, different intercept data

Problem
Find lines with slope 1/2 when the y-intercept is −3/2 and when the x-intercept is 4.

  1. 1.For the first line, use y=mx+c: y=x/2−3/2. Multiply by 2 to get 2y−x+3=0.
  2. 2.For the second line, use the point (4,0): y=(x−4)/2. Multiplication gives 2y−x+4=0.
  3. 3.The first crosses the y-axis at −3/2; the second crosses the x-axis at 4. These are distinct parallel lines.

When both intercepts are given, let them be a on the x-axis and b on the y-axis. The anchor points are (a,0) and (0,b). Provided a and b are nonzero, the two-point slope is −b/a. Therefore y=−(b/a)(x−a)=−bx/a+b. Divide by b and move x/a to the left to obtain the intercept form.

Intercept formLaTeX
a and b are nonzero signed intercepts. This form is unsuitable for a line through the origin, a vertical line or a horizontal line without two distinct finite intercepts.
A negative x-intercept and positive y-interceptxyOA (−3,0)B (0,2)
A negative x-intercept and positive y-intercept— The line passes through (−3,0) and (0,2). Its intercept equation is x/(−3)+y/2=1.
Example — Build a line from intercepts

Problem
Find the equation with x-intercept −3 and y-intercept 2.

  1. 1.Substitute the signed intercepts: x/(−3)+y/2=1.
  2. 2.Multiply by 6: −2x+3y=6.
  3. 3.Move terms and, if desired, multiply by −1: 2x−3y+6=0.
  4. 4.Check (−3,0) and (0,2). Both make the expression zero.

General Form and Choosing a Method

All these equations describe straight lines, but each highlights a different piece of information. General form is useful when converting equations, solving intersections and later measuring distances. Choosing a convenient starting form reduces algebra while preserving the same geometry.

General equation of a lineLaTeX
A, B and C are constants. At least one of A and B must be nonzero. Multiplying all three by the same nonzero factor describes the same line.

If B≠0, rearrange to y=−(A/B)x−C/B. Its slope is −A/B and its y-intercept is −C/B. If B=0, A≠0 and the equation becomes x=−C/A, a vertical line. If A=0, it becomes y=−C/B, a horizontal line. Setting y=0 gives an x-intercept −C/A when A≠0; setting x=0 gives the y-intercept when B≠0.

Given informationConvenient formCheck
One point and finite slopey−y₀=m(x−x₀)Substitute the given point
Two distinct pointsTwo-point form or cross-multiplied formBoth points satisfy the equation
Slope and y-intercepty=mx+cAt x=0, y=c
Two nonzero signed interceptsx/a+y/b=1The axis crossings are (a,0),(0,b)
Vertical direction and one pointx=x₀All points have the same x
General equationAx+By+C=0A,B are not both zero
Common mistake

A coefficient is not automatically a slope: in Ax+By+C=0, the finite slope is −A/B. Also, multiplying an equation by a nonzero constant changes its coefficients but not its line. Do not interpret signed intercepts as positive distances.

Constructing Lines from Geometric Conditions

A geometric description often provides a point or direction indirectly. A median supplies a midpoint; a perpendicular supplies a new slope; an intercept constraint supplies an algebraic equation. Translate one condition at a time, then use a form whose required data you now know.

Example — A median in a triangle

Problem
For P=(2,1), Q=(−2,3), R=(4,5), find the median through R.

  1. 1.A median joins a vertex to the midpoint of the opposite side. The midpoint of PQ is M=((2−2)/2,(1+3)/2)=(0,2).
  2. 2.The slope of RM is (5−2)/(4−0)=3/4.
  3. 3.Through M, y−2=3x/4. Multiply by 4 to obtain 3x−4y+8=0.
  4. 4.Check R: 12−20+8=0. The line passes through the vertex and the required midpoint.
Example — A line perpendicular to a given segment

Problem
Find the line through (−3,5) perpendicular to the line joining (2,5) and (−3,6).

  1. 1.The given direction has slope (6−5)/(−3−2)=−1/5.
  2. 2.Its perpendicular slope is 5.
  3. 3.Through (−3,5), y−5=5(x+3), giving y=5x+20.
  4. 4.Thus 5x−y+20=0. The slope product is (−1/5)×5=−1.

For a line through a point dividing a segment in ratio 1:n, first obtain that point with the section formula, with n>0 for internal division. For endpoints (1,0),(2,3), the point is ((2+n)/(1+n),3/(1+n)); the segment slope is 3, so a perpendicular through that point has slope −1/3. This sequence also handles a perpendicular bisector by choosing n=1.

Example — Two intercept solutions

Problem
Find lines through (2,2) whose signed intercepts sum to 9.

  1. 1.Let the nonzero intercepts be a,b. Then a+b=9 and 2/a+2/b=1.
  2. 2.Multiply the second equation by ab: 2(a+b)=ab, so ab=18.
  3. 3.Since a+b=9 and ab=18, each intercept is a root of t²−9t+18=(t−3)(t−6).
  4. 4.The ordered pairs are (a,b)=(3,6) or (6,3). The equations are 2x+y=6 and x+2y=6.
  5. 5.Both contain (2,2) and both have intercept sum 9. Swapping axis assignments generally changes the line.

If the intercepts are equal, set a=b in the intercept form to obtain x+y=a. Through (2,3), a=5 and the equation is x+y=5. If instead a point (h,k) divides the segment between intercepts (a,0) and (0,b) in ratio 1:2, the section formula gives h=2a/3 and k=b/3. For nonzero h,k the line is 2x/(3h)+y/(3k)=1. A midpoint is the special case a=2h,b=2k, giving x/h+y/k=2.

Collinearity can also be checked by equation membership. The line through (3,0) and (−2,−2) has slope 2/5 and equation 2x−5y−6=0. Substitution of (8,2) gives 16−10−6=0, proving that this third point lies on the same line. This method avoids comparing an undefined slope when the line is vertical.

Straight Lines as Models

Coordinates need not represent physical horizontal and vertical positions. They can represent two quantities linked approximately by a linear relationship. Slope then has units: it measures how much the output changes for one unit of input, while the intercept is the modelled output at input zero.

Example — Thermal length model

Problem
A copper rod has length 124.942 cm at 20°C and 125.134 cm at 110°C. Assuming length is linear in temperature, express L in terms of C.

  1. 1.Here C is Celsius temperature, not the constant C in a general line equation. Take coordinates (C,L).
  2. 2.The slope is (125.134−124.942)/(110−20)=0.192/90=0.002133333… cm per °C.
  3. 3.Use an anchored form: L−124.942=(0.192/90)(C−20).
  4. 4.Equivalently L=124.899333…+0.002133333…C. The anchored form preserves the supplied decimal values cleanly.
  5. 5.At C=110 the increase is 0.192 cm, recovering 125.134 cm. The model assumes an approximately constant expansion rate over the range used.
Example — A supplied price–quantity model

Problem
A store reports 980 litres weekly at ₹14 per litre and 1220 litres at ₹16. Assuming the stated linear relationship, predict weekly litres at ₹17.

  1. 1.Let price be p and weekly quantity be Q. The supplied pairs are (14,980) and (16,1220).
  2. 2.Slope=(1220−980)/(16−14)=120 litres per rupee.
  3. 3.Therefore Q−980=120(p−14). At p=17, Q=980+360=1340 litres.
  4. 4.This follows the supplied data, even though the positive relationship differs from the usual decreasing price–demand pattern. It is a mathematical model, not a general economic law.
  5. 5.The prediction is an extrapolation beyond the two given prices; its reliability depends on the assumed relationship continuing.

Quiz

Quick check

Which equation is the y-axis?

Quick check

A line through (2,3) with slope −2 has equation:

Quick check

For 3x+2y−12=0, the y-intercept is:

Quick check

Which line has intercepts 4 and −2 on x and y respectively?

Quick check

What does multiplying a valid line equation by −3 do?

Quick check

A line passes through two distinct points with the same x-coordinate h. Use:

Key Takeaways

Key Takeaways

• A point is on a line exactly when its coordinates satisfy the equation. • Choose equation forms according to the known point, slope or signed intercepts. • Point–slope and two-point forms share the same constant-slope reasoning. • General form includes vertical and horizontal lines when A and B are not both zero. • Use geometric conditions to obtain the needed anchors and directions before doing algebra. • Linear models need defined variables, units and a stated assumption about their useful range.