Class 9 › Mathematics › Chapter

Two Variables, One Line

Linear equations in two variables, their solutions and graphs, slope and the slope-intercept form, and solving a pair of linear equations by substitution, elimination and graphs, including how to tell the number of solutions.

1. Linear Equations in Two Variables
  • Why two variables: when a situation has two unknown quantities (for example, kilograms of mangoes and kilograms of bananas), we give each a letter, such as $x$ and $y$, and state clearly what each letter stands for.
  • Building the equation: the cost of an item is price $\times$ quantity. If mangoes cost $60$ per kg and bananas $50$ per kg, the total cost is $60x + 50y$. Setting this equal to the amount paid gives one equation in $x$ and $y$.
  • Both sides must measure the same thing: the left-hand side (LHS) and the right-hand side (RHS) must represent the same quantity in the same units (here, the total cost).
  • Direction matters: if a notebook costs twice as much as a pen, with costs $t$ and $p$, the correct equation is $t = 2p$, not $p = 2t$. Always check the relation with a quick sense-check.
Linear equation in two variables: an equation that can be written in the form $ax + by + c = 0$, where each variable appears only to the first power and the two variables are not multiplied together.
2. Standard Form
Standard form $$ax + by + c = 0 \qquad (a, b, c \text{ real numbers; } a \text{ and } b \text{ not both zero})$$ $a$ and $b$ are the coefficients of $x$ and $y$; $c$ is the constant.
  • Converting: move every term to one side so that the other side is $0$, then read off $a$, $b$ and $c$ with their signs.
  • Not unique: multiplying the whole equation by any non-zero number (including $-1$) gives another standard form of the same equation. For example, both $(a, b, c)$ and $(-a, -b, -c)$ describe the same equation.
  • Fractions and decimals: the coefficients and the constant may be rational numbers or decimals. To remove fractions, multiply the whole equation by a suitable number (the LCM of the denominators); the equation is unchanged.
  • Missing variable: equations like $ax + c = 0$ are also linear equations in two variables, because they can be written $ax + 0 \cdot y + c = 0$ (here $b = 0$). For example, $x = 8$ has $a = 1$, $b = 0$, $c = -8$, and $3y = 1$ has $a = 0$, $b = 3$, $c = -1$.
  • $a$ and $b$ cannot both be $0$: otherwise no variable is left and the equation is not about $x$ and $y$ at all.
3. Solutions of a Linear Equation in Two Variables
Solution: a pair of values of $x$ and $y$ that satisfies the equation. It is written as an ordered pair $(x, y)$: the first number is the value of $x$ and the second is the value of $y$, and the order matters.
  • Checking a pair: substitute both values; if LHS = RHS the pair is a solution, otherwise it is not.
  • Infinitely many solutions: for any value $u$ given to $x$, the equation becomes a linear equation in $y$ alone. Solving it gives a value $v$, and $(u, v)$ is a solution. Since $u$ can be chosen in infinitely many ways, there are infinitely many solutions. The same works by choosing $y$ first.
  • Kinds of values: solutions can contain zero, negative numbers, fractions and decimals.
  • Unknown constants: if a given pair is a solution of an equation containing an unknown constant, substitute the pair. This gives a linear equation in that constant. With one such equation per unknown constant, each can be found.
  • Equivalent equations: multiplying both sides of $ax + by = c$ by a number $k \neq 0$ gives $kax + kby = kc$, which has exactly the same set of solutions. Any solution of one satisfies the other, because multiplying or dividing both sides by a non-zero number keeps the equality.
  • Quadrants: the signs of $x$ and $y$ tell the quadrant: $(+, +)$ first, $(-, +)$ second, $(-, -)$ third, $(+, -)$ fourth. Because an equation has infinitely many solutions, it can have solutions in different quadrants.
4. Graph of a Linear Equation
The graph is a straight line $$ax + by + c = 0 \;\Longleftrightarrow\; y = -\dfrac{a}{b}x - \dfrac{c}{b} \quad (b \neq 0)$$ Plotting all the solutions of a linear equation in two variables gives a straight line.
46 xyO (0, 6) (4, 0) (1, 4.5) (2, 3) 3x + 2y = 12 x = 0 gives the y-intercept y = 0 gives the x-intercept
Every solution is a point on the line, and every point on the line is a solution.
  • Both directions are true: every point on the graph is a solution of the equation, and every solution is a point on the graph. A point not on the line does not satisfy the equation.
  • Two points are enough to draw a line. The quickest two: put $x = 0$ to get the point where the line meets the y-axis, and put $y = 0$ to get the point where it meets the x-axis. A third point is a good check.
  • Table of values: choose a few values of $x$, find $y$ for each, and plot the ordered pairs; they always fall on one line.
  • Lines through the origin: if $c = 0$, then $(0, 0)$ satisfies $ax + by = 0$, so the line passes through the origin whatever $a$ and $b$ are. Since both intercepts then coincide at the origin, take one more point (such as $x = 1$) to draw it.
  • The axes: $x = 0$ is the equation of the y-axis and $y = 0$ is the equation of the x-axis.
  • Parallel to an axis: $x = k$ is a vertical line and $y = k$ is a horizontal line. Both are valid linear equations in two variables.
  • Common true/false ideas: an equation has infinitely many solutions (not one); its graph does not always pass through the origin; it can have rational solutions.
5. Understanding Slope
Slope (gradient): the steepness of a line. A steeper hill needs more effort to climb.
Slope through $A(x_1, y_1)$ and $B(x_2, y_2)$ $$\text{Slope} = \dfrac{\text{Rise}}{\text{Run}} = \dfrac{y_2 - y_1}{x_2 - x_1}$$ Run and rise Run $= x_2 - x_1$ (horizontal change); Rise $= y_2 - y_1$ (vertical change).
run rise run rise slope = rise ÷ run (the same wherever it is measured)
Different points give different-sized triangles, but the ratio of rise to run does not change.
  • Positive slope: the line goes up as you move from left to right (rise and run have the same sign).
  • Negative slope: the line goes down as you move from left to right (rise and run have opposite signs).
  • Moving right is a positive run, moving up is a positive rise; moving left or down is negative.
  • Independent of the points chosen: because the line is straight, the ratio of rise to run is the same for any two points on it.
  • Independent of the order: swapping the two points changes the sign of both rise and run, so the ratio stays the same.
  • Following a line: from a known point, a run of $r$ units changes $y$ by $\text{slope} \times r$. This lets us find other points, for example the $y$-value for a given $x$.
  • Comparing steepness: compare the ratios rise $\div$ run, not just the heights. A ramp with a given slope $\dfrac{\text{rise}}{\text{run}}$ needs a run of $\text{rise} \times \dfrac{\text{run}}{\text{rise}}$ to reach a given height (for example, a $1 : 12$ slope needs $12$ units of run for every $1$ unit of height).
m > 0goes up m < 0goes down m = 0horizontal undefinedvertical
The four kinds of slope, read from left to right.
  • Zero slope: a horizontal line (parallel to the x-axis); $y$ stays constant, for example $y = 5$.
  • Undefined slope: a vertical line (parallel to the y-axis); $x$ stays constant, for example $x = 2$. The run is $0$, so the ratio has $0$ in the denominator, and division by $0$ is undefined.
6. Slope-Intercept Form
Slope-intercept form $$y = mx + d$$ $m$ is the slope; $d$ is the y-intercept, so the line cuts the y-axis at $(0, d)$.
Why $m$ is the slope
1. Let $A(x_1, y_1)$ and $B(x_2, y_2)$ lie on $y = mx + d$. Then $y_1 = mx_1 + d$ and $y_2 = mx_2 + d$.
2. Slope of $AB = \dfrac{y_2 - y_1}{x_2 - x_1} = \dfrac{(mx_2 + d) - (mx_1 + d)}{x_2 - x_1} = \dfrac{m(x_2 - x_1)}{x_2 - x_1} = m$.
3. This holds for any two points on the line, so the slope can be read straight from the equation.
  • From standard form: $ax + by + c = 0$ becomes $y = -\dfrac{a}{b}x - \dfrac{c}{b}$ when $b \neq 0$. So $m = -\dfrac{a}{b}$ and $d = -\dfrac{c}{b}$.
  • Meaning of $m$: for every increase of $1$ unit in $x$, $y$ changes by $m$ units (up if $m > 0$, down if $m < 0$).
  • Meaning of $d$: the value of $y$ when $x = 0$, that is, the starting value.
  • $m = 0$: $y = d$ is a horizontal line. Vertical lines $x = k$ cannot be written as $y = mx + d$ (there $b = 0$).
  • x-intercept: put $y = 0$ in $y = mx + d$ to get $x = -\dfrac{d}{m}$ (when $m \neq 0$).
  • Equal slopes mean parallel lines: take $y = mx + d_1$ and $y = mx + d_2$ with $d_1 \neq d_2$. A common point would need $mx + d_1 = mx + d_2$, which forces $d_1 = d_2$. So they never meet. If $d_1 = d_2$ they are the same line.
  • Counting lines: there are infinitely many lines with a given slope (all parallel), but exactly one line with a given slope passing through a given point.
  • Reading a model: in a model such as "water level $= 3 \times$ minutes", the slope is the rate of change (cm per minute) and the intercept is the starting value. In the conversion $F = \dfrac{9}{5}C + 32$, the slope is $\dfrac{9}{5}$ and the intercept is $32$.
  • Point on a line? a point lies on the line exactly when its coordinates satisfy the equation; no new graph is needed.
7. Pair of Linear Equations in Two Variables
General form of a pair $$a_1x + b_1y + c_1 = 0, \qquad a_2x + b_2y + c_2 = 0$$ ($a_1, b_1$ not both zero; $a_2, b_2$ not both zero)
  • Where pairs come from: a situation with two unknowns and two separate conditions (two purchases, a sum and a difference, two taxi trips) gives two equations.
  • Solution of a pair: an ordered pair $(a, b)$ that satisfies both equations at once.
  • Why two equations: one equation alone has infinitely many solutions. A second condition cuts these down, usually to just one pair of values.
  • The idea behind every method: reduce the pair of equations to a single linear equation in one variable, which we already know how to solve.
8. Substitution Method
Steps of the substitution method
1. Isolate one variable: choose one equation and write one variable in terms of the other, for example $x = \text{(expression in } y)$.
2. Substitute: every solution of the pair satisfies this relation, so put the expression into the other equation. This gives a linear equation in one variable; solve it.
3. Back-substitute: put the value found into the relation from Step 1 (or either original equation) to get the other variable.
4. Verify: check the pair in both original equations.
  • Either choice works: isolating $x$ or $y$, from either equation, leads to the same solution.
  • Best when a variable already has coefficient $1$, or the relation is given directly (for example one quantity is a multiple of another).
  • Watch out for fractions: if no coefficient is $1$, isolating a variable creates fractions, and elimination may be easier.
9. Elimination Method
Steps of the elimination method
1. Match a coefficient: multiply each equation by a suitable number so that the coefficients of one variable become equal (for example, multiply Equation (1) by the coefficient of $y$ in Equation (2), and Equation (2) by the coefficient of $y$ in Equation (1)).
2. Subtract (or add): subtract one new equation from the other. Subtracting equal quantities from equal quantities keeps the equality, and that variable disappears. (If the matched coefficients are equal in size but opposite in sign, add instead.)
3. Solve the remaining linear equation in one variable.
4. Back-substitute to find the other variable, then verify in both original equations.
Substitution Isolate onevariable Substitute inthe other Solve forone variable Back-substitute Verify inboth ›››› Elimination Match onecoefficient Add orsubtract Solve forone variable Back-substitute Verify inboth ››››
Both methods turn a pair of equations into one equation in one variable, then work back.
  • Which variable to eliminate: pick the one that needs the smaller multipliers. Eliminating $x$ or $y$ gives the same solution.
  • Special pairs (interchanged coefficients): for $ax + by = p$ and $bx + ay = q$, adding gives $(a + b)(x + y) = p + q$ and subtracting gives $(a - b)(x - y) = p - q$. These two simple equations give $x + y$ and $x - y$, from which $x$ and $y$ follow quickly (Mahāvīra's citron problem has this form).
  • Choosing between methods: substitution suits pairs where a variable is easy to isolate; elimination suits pairs with larger coefficients. Both always give the same solution.
  • Always verify, and for word problems check against the original statement, not just the equations.
10. Nature of the Solutions
What elimination tells us
1. If, after matching one variable and subtracting, the other variable remains, we can solve for it: there is a unique solution.
2. If both variables vanish, we are left with a statement with no variables. If it reads $0 = 0$, the two equations are really the same, so there are infinitely many solutions.
3. If both variables vanish and we are left with $0 = (\text{non-zero number})$, the equations contradict each other: no solution.
Conditions for $a_1x + b_1y + c_1 = 0$ and $a_2x + b_2y + c_2 = 0$ $$\text{(1) } \dfrac{a_1}{a_2} \neq \dfrac{b_1}{b_2} \Rightarrow \text{unique solution}$$ $$\text{(2) } \dfrac{a_1}{a_2} = \dfrac{b_1}{b_2} = \dfrac{c_1}{c_2} \Rightarrow \text{infinitely many solutions}$$ $$\text{(3) } \dfrac{a_1}{a_2} = \dfrac{b_1}{b_2} \neq \dfrac{c_1}{c_2} \Rightarrow \text{no solution}$$
Intersectingunique solution Parallelno solution Coincidentinfinitely many solutions
The three possible pictures of a pair of linear equations.
Ratio conditionLinesSolutions
$\dfrac{a_1}{a_2} \neq \dfrac{b_1}{b_2}$Intersect at one pointExactly one
$\dfrac{a_1}{a_2} = \dfrac{b_1}{b_2} = \dfrac{c_1}{c_2}$Coincident (one equation is a constant multiple of the other)Infinitely many
$\dfrac{a_1}{a_2} = \dfrac{b_1}{b_2} \neq \dfrac{c_1}{c_2}$Parallel and distinctNone
  • Why case (2): if one equation is a constant multiple $k \neq 0$ of the other, then $a_1 = ka_2$, $b_1 = kb_2$, $c_1 = kc_2$. The equations are really the same, and one equation already has infinitely many solutions.
  • Why case (3): after multiplying, the $x$ and $y$ parts of the two equations match, but the constants do not, so the same expression would equal two different numbers. This is impossible.
  • The converses are true: the three cases cover every possibility and exclude each other, so a unique solution means $\dfrac{a_1}{a_2} \neq \dfrac{b_1}{b_2}$, no solution means case (3), and infinitely many solutions means case (2).
  • Not always unique or infinite: a pair can also have no solution.
  • Caution with zeros: the ratio rules assume $a_2, b_2, c_2$ are all non-zero. If one of them is $0$, check directly whether one equation is a constant multiple of the other.
  • Linking ratios and slopes: slopes are $-\dfrac{a_1}{b_1}$ and $-\dfrac{a_2}{b_2}$. Equal slopes mean $\dfrac{a_1}{b_1} = \dfrac{a_2}{b_2}$, which is the same as $\dfrac{a_1}{a_2} = \dfrac{b_1}{b_2}$.
  • Building a pair of a required type from a given equation: for coincident lines, multiply the whole equation (including the constant) by a number; for parallel lines, multiply only the $x$ and $y$ parts and change the constant so it is not multiplied by the same number; for intersecting lines, change the ratio of the $x$ and $y$ coefficients.
  • Equations with a parameter: to find the values of a parameter for a unique solution, require $\dfrac{a_1}{a_2} \neq \dfrac{b_1}{b_2}$ (which excludes one value). For infinitely many solutions or coincident lines, set all three ratios equal and solve.
11. Graphical Method
Steps of the graphical method
1. For each equation, find at least two points (use $x = 0$ and $y = 0$, or any convenient values) and write them in a table.
2. Plot the points on the same pair of axes and draw each straight line.
3. Read the answer from the picture (see below) and then verify by substituting in both equations.
  • Solutions are common points: a solution of the pair is a point that lies on both lines.
  • Intersecting lines: they meet at exactly one point, and its coordinates are the unique solution.
  • Parallel lines: they have no common point, so there is no solution.
  • Coincident lines: every point of the line is a common point, so there are infinitely many solutions.
  • Slope view: different slopes mean the lines intersect; the same slope with different y-intercepts means parallel; the same slope and the same y-intercept means coincident.
  • Algebra predicts the picture: the ratio test (previous section) tells us in advance whether the lines intersect, are parallel or coincide, and the graph confirms it.
  • Accuracy: a graph reads off exact coordinates only when the lines cross at a grid point. In other cases the graph gives an estimate, and the algebraic methods give the exact value.
  • Same equation, same line: two equations that are constant multiples of each other draw one and the same line.
12. Word Problems and Linear Models
Strategy for word problems
1. Define the unknowns: choose a letter for each unknown quantity and note its unit.
2. Translate: turn each condition into one equation (two independent conditions give two equations).
3. Solve by substitution, elimination or graphs.
4. Check against the original wording, and check that the answer makes sense (counts are whole numbers, ages and prices are positive, digits are from $0$ to $9$).
5. Answer in a sentence with the units.
Type of problemHow to set it up
Two numbers (sum and difference)$x + y = S$ and $x - y = D$
Two-digit numberTens digit $x$, units digit $y$: number $= 10x + y$; reversed number $= 10y + x$. Their sum is $11(x + y)$ and the difference of the two is $9(x - y)$ in size.
RatiosA ratio $p : q$ means the quantities are $pk$ and $qk$ for some common unit $k$. Two ratios give two common units, hence two unknowns.
Costs of itemsTotal cost $=$ price $\times$ quantity, summed over items; two purchases give two equations.
Fixed charge plus a rate (taxi, library)Total $=$ fixed charge $+$ rate $\times$ amount; two cases give two equations, and then any amount can be predicted.
Ages"$n$ years ago" means subtract $n$ from each age; "after $n$ years" means add $n$. Translate the multiples into equations.
FractionsLet the fraction be $\dfrac{x}{y}$. Adding $k$ to numerator and denominator gives $\dfrac{x + k}{y + k}$; set it equal to the given value and clear the denominator.
Notes or coinsNumber of notes: $x + y = N$. Total value: (denomination 1)$\,x$ + (denomination 2)$\,y$ = amount.
GeometryAngle sum of a triangle ($180^\circ$) or quadrilateral ($360^\circ$); half-perimeter of a rectangle $=$ length $+$ width; opposite angles of a cyclic quadrilateral add to $180^\circ$.
Speed, time, distanceDistance $=$ speed $\times$ time. For two scenarios with changed speeds, the distance is the same, so equate the two expressions.
  • Comparing two linear quantities: two plans such as "fixed fee plus rate per minute" are two lines. Equating them finds the break-even point where the costs are equal; on one side of it one plan is cheaper, and on the other side the other plan is. The line with the smaller slope wins for large usage.
  • Where two paths meet: repeated moves such as "right $a$, up $b$" trace a line of slope $\dfrac{b}{a}$. Two such paths meet where their lines intersect; if the slopes are equal and the lines are different, the paths never meet.
  • Unit conversions are lines: in $F = \dfrac{9}{5}C + 32$, putting $F = C$ shows the single temperature where both scales agree: $C = -40$.
  • Using a line as a model: given the line, a value of $x$ gives $y$ (read or substitute), and a value of $y$ gives $x$ (solve the linear equation).
13. A Pinch of History
Solving systems of linear equations through the ages
Babylonians (cuneiform tablets, c. 2000 BCE): the earliest traces of such problems.
China: the Nine Chapters on the Mathematical Art (compiled about two thousand years ago) devotes a whole chapter, fangcheng, to linear systems. Coefficients were arranged in columns of counting rods, and columns were combined to cancel variables, which is essentially modern elimination, about eighteen centuries before Gauss's name became attached to it in Europe.
India: Āryabhaṭa (499 CE) and Brahmagupta (628 CE) studied general systems in several unknowns using systematic reduction methods, including elimination. Mahāvīrāchārya (Gaṇita-sāra-saṅgraha, c. 850 CE) posed a problem on the prices of citrons and fragrant wood-apples that leads to a pair with interchanged coefficients.
14. Summary and Quick Revision
No.ConceptFormula / rule
1Standard form$ax + by + c = 0$, $a, b$ not both $0$
2Slope through two points$\dfrac{y_2 - y_1}{x_2 - x_1}$
3Slope-intercept form$y = mx + d$; slope $m$, y-intercept $d$
4From standard form$m = -\dfrac{a}{b}$, $d = -\dfrac{c}{b}$ ($b \neq 0$)
5x-intercept (when $m \neq 0$)$x = -\dfrac{d}{m}$
6Unique solution$\dfrac{a_1}{a_2} \neq \dfrac{b_1}{b_2}$ (lines intersect)
7No solution$\dfrac{a_1}{a_2} = \dfrac{b_1}{b_2} \neq \dfrac{c_1}{c_2}$ (parallel lines)
8Infinitely many solutions$\dfrac{a_1}{a_2} = \dfrac{b_1}{b_2} = \dfrac{c_1}{c_2}$ (coincident lines)
Method

Substitution

Isolate a variable, substitute into the other equation, solve, back-substitute. Best when a coefficient is $1$.

Method

Elimination

Match a coefficient, add or subtract to cancel a variable, solve, back-substitute. Best for larger coefficients.

Method

Graphical

Draw both lines. Intersection point gives the solution; parallel lines give none; the same line gives infinitely many.

Quick facts:
• A linear equation in two variables has infinitely many solutions, and its graph is a straight line.
• Every point on the line is a solution, and every solution is a point on the line.
• If $c = 0$, the line passes through the origin.
• Slope is the same for any two points on a line; a horizontal line has slope $0$, and a vertical line has undefined slope.
• Lines with equal slopes are parallel (or the same line).
Common mistakes:
• Writing the ordered pair as $(y, x)$ instead of $(x, y)$.
• Sign errors when moving terms to get the standard form, or forgetting to multiply the constant when multiplying an equation.
• Reading the slope with mismatched order, such as $\dfrac{y_2 - y_1}{x_1 - x_2}$.
• Treating a vertical line's slope as $0$ (it is undefined) or a horizontal line's slope as undefined (it is $0$).
• Finding one variable by elimination and forgetting to back-substitute for the other.
• Skipping the verification step, or checking only one of the two equations.
• Saying "no solution" when all three ratios are equal (that case has infinitely many solutions).
• Using the ratio test when a coefficient is $0$ without checking directly.
• Plotting only one point, or reading a non-grid intersection from a graph as an exact answer.
• Setting up $p = 2t$ when the statement means $t = 2p$.