Sub topic 3
Two linear equations in two variables
This chapter assumes you can solve a linear equation in one variable and expand brackets without errors. It also assumes you can handle fractions and negative signs. Here you will learn the three standard ways to solve a pair of linear equations, when each one is quickest, and how the same ideas work in CAT-style questions.
What a system of two equations means
A linear equation in two variables has the form ax + by = c. It has infinitely many solutions on its own. For example, x + y = 10 is satisfied by (6, 4), (3, 7), (0, 10) and so on.
A system is two such equations that must hold together. A solution of the system is a pair (x, y) that satisfies both equations. Graphically, each equation is a straight line, and the solution is the point where the lines cross.
Most CAT questions of this type give a pair with exactly one solution. The next chapter covers the cases with none or infinitely many.
Method 1: Substitution
Solve one equation for one variable, then put that expression into the other equation. This works best when one variable already has coefficient 1 or -1.
Solve 3x + 2y = 16 and x - y = 2.
- From the second equation,
x = y + 2. - Substitute into the first:
3(y + 2) + 2y = 16, so5y + 6 = 16andy = 2. - Then
x = 2 + 2 = 4.
Check in both original equations: 3(4) + 2(2) = 16 and 4 - 2 = 2. Both hold.
Method 2: Elimination
Multiply the equations by suitable numbers so that one variable has equal and opposite coefficients. Then add the equations to remove it. This is usually the fastest method when no coefficient is 1.
Solve 2x + 3y = 13 and 5x - 2y = 4.
- Multiply the first equation by 2:
4x + 6y = 26. - Multiply the second by 3:
15x - 6y = 12. - Add:
19x = 38, sox = 2. - Substitute into the first equation:
4 + 3y = 13, soy = 3.
Check in the equation you did not use for the last step: 5(2) - 2(3) = 4. It holds.
Method 3: The determinant (cross-multiplication) formula
Elimination applied to the general system a1x + b1y = c1 and a2x + b2y = c2 gives a ready-made formula:
x = (c1·b2 - c2·b1) / (a1·b2 - a2·b1)y = (a1·c2 - a2·c1) / (a1·b2 - a2·b1)
The denominator a1·b2 - a2·b1 is the determinant. If it is zero, the formula fails. That case means the lines are parallel or identical, so there is no unique solution.
The function below implements the formula and returns None when the determinant is zero.
def solve_2x2(a1, b1, c1, a2, b2, c2):
"""Solve a1*x + b1*y = c1 and a2*x + b2*y = c2."""
det = a1 * b2 - a2 * b1
if det == 0:
return None # no unique solution: parallel or identical lines
x = (c1 * b2 - c2 * b1) / det
y = (a1 * c2 - a2 * c1) / det
return x, y
# x + y = 10 and x - y = 2 give x = 6, y = 4
print(solve_2x2(1, 1, 10, 1, -1, 2))Running it prints (6.0, 4.0). The formula is useful for checking your work. In the exam, a clean pair of equations is usually faster by elimination.
Choosing a method
| Method | Best when | Main risk |
|---|---|---|
| Substitution | A coefficient is 1 or -1 | Sign errors when expanding brackets |
| Elimination | Coefficients are unrelated | Forgetting to multiply the right-hand side |
| Determinant formula | You need a fast check or a coded solution | Mixing up the order of terms in the numerators |
| Add and subtract | Coefficients are swapped or nearly equal | Missing that the trick applies |
Add and subtract: a CAT favourite
CAT often gives coefficients that are swapped or close together. Adding and subtracting the equations then gives two simpler equations.
Solve 49x + 51y = 499 and 51x + 49y = 501.
- Add the equations:
100x + 100y = 1000, sox + y = 10. - Subtract the first from the second:
2x - 2y = 2, sox - y = 1. - Add these two results:
2x = 11, sox = 5.5. Theny = 4.5.
Check: 49(5.5) + 51(4.5) = 269.5 + 229.5 = 499. It holds. Solving by plain elimination would have meant multiplying by 49 and 51 and working with numbers like 2401.
Equations that look nonlinear but are linear
Some systems become linear after a change of variable. The usual case has the unknowns in denominators.
Solve 2/x + 3/y = 13 and 5/x - 4/y = -2.
- Let
u = 1/xandv = 1/y. The system becomes2u + 3v = 13and5u - 4v = -2. - Multiply the first by 4 and the second by 3:
8u + 12v = 52and15u - 12v = -6. - Add:
23u = 46, sou = 2. Then2(2) + 3v = 13, sov = 3. - Convert back:
x = 1/u = 1/2andy = 1/v = 1/3.
Do not stop at u and v. Answering with x = 2 is a common mistake. Also note that x and y cannot be zero in the original equations.
Word problems with two unknowns
Define one variable per unknown quantity, write one equation per stated relationship, then solve.
Three pens and two notebooks cost 45 rupees. Two pens and five notebooks cost 74 rupees. Find the price of each.
- Let
pbe the price of a pen andnthe price of a notebook. - The equations are
3p + 2n = 45and2p + 5n = 74. - Multiply the first by 5 and the second by 2:
15p + 10n = 225and4p + 10n = 148. - Subtract:
11p = 77, sop = 7. Then2n = 45 - 21 = 24, son = 12.
A pen costs 7 rupees and a notebook costs 12 rupees. The check 2(7) + 5(12) = 74 holds.
Common errors
- Scaling only one side. When you multiply an equation by a number, multiply every term, including the constant on the right.
- Subtracting instead of adding. If the coefficients to eliminate have opposite signs, add. If they have the same sign, subtract. Check the sign before you choose.
- Dropping a negative. In
x = (c1·b2 - c2·b1) / det, a negativebchanges the sign of the whole term. Substitute with brackets. - Checking in only one equation. An arithmetic slip in the second equation will not show up. Always check in both original equations.
- Forgetting what was asked. Read the last line of the question again. It may ask for
x + y, the larger number, or a value in different units.
Using the options
Many CAT questions give answer choices. When the equations are awkward, test the options. For a pair of equations, a candidate (x, y) must satisfy both. Substituting into the simpler equation first usually removes two or three options quickly. This also acts as your final check.
Exercise
Solve 7x + 3y = 41 and 2x - 5y = -11. Give x and y.
Show answer
Multiply the first equation by 5 and the second by 3: 35x + 15y = 205 and 6x - 15y = -33. Add them: 41x = 172... recheck the second multiplication: 3 times (2x - 5y = -11) gives 6x - 15y = -33. Then 41x = 172 does not give a whole number, so try the original system again with elimination of x instead. Multiply the first by 2 and the second by 7: 14x + 6y = 82 and 14x - 35y = -77. Subtract: 41y = 159, which is also not a whole number. So the solution is fractional: x = 172/41 and y = 159/41. Check: 7(172/41) + 3(159/41) = (1204 + 477)/41 = 1681/41 = 41. Correct. Both methods agree, so the answer is x = 172/41 and y = 159/41.
Exercise
Solve 37x + 43y = 123 and 43x + 37y = 117. Find x and y.
Show answer
Add the equations: 80x + 80y = 240, so x + y = 3. Subtract the first from the second: 6x - 6y = -6, so x - y = -1. Then 2x = 2, so x = 1, and y = 2. Check: 37 + 86 = 123 and 43 + 74 = 117.
Exercise
Solve 3/x + 4/y = 5 and 6/x - 2/y = 5/2... (use u = 1/x, v = 1/y) and give x and y.
Show answer
The system is 3u + 4v = 5 and 6u - 2v = 5/2. Multiply the second by 2: 12u - 4v = 5. Add to the first: 15u = 10, so u = 2/3. Then 3(2/3) + 4v = 5 gives 4v = 3, so v = 3/4. Therefore x = 3/2 and y = 4/3. Check: 3/(3/2) + 4/(4/3) = 2 + 3 = 5, and 6/(3/2) - 2/(4/3) = 4 - 1.5 = 2.5.