4 Methods to Solve Linear Equations (With Worked Examples)
Substitution, elimination, cross-multiplication, and Cramer's rule explained with verified worked examples and placement-test strategy for engineering students.
Linear equations appear in almost every quantitative aptitude section, whether you are preparing for TCS NQT, AMCAT, or a campus placement evaluation test.
The four methods covered here (substitution, elimination, cross-multiplication, and Cramer’s rule) each suit a different equation structure. Knowing which to reach for, rather than always defaulting to one, is what separates a student who finishes the aptitude section from one who runs out of time on it.
Linear Equations: Forms and Standard Notation
A linear equation is an algebraic equation where each variable appears to the first power only, with no products of variables. Three standard forms matter for placement tests.
One unknown: ax + b = 0, where a is not zero. Solved directly: x = -b/a.
Two unknowns (standard form): a₁x + b₁y + c₁ = 0 and a₂x + b₂y + c₂ = 0. This is the most common form in aptitude rounds. The NCERT Class 10 chapter on pairs of linear equations covers the full theory; placement tests draw almost entirely from this chapter.
Three unknowns: a₁x + b₁y + c₁z = d₁, a₂x + b₂y + c₂z = d₂, a₃x + b₃y + c₃z = d₃. Rare in standard aptitude screens but common in engineering-track tests and some Tier-1 company technical rounds.
Every method below assumes you have already written the equations correctly. Misreading the word problem is the source of most wrong answers, not the algebra itself.
Method 1 — Substitution
Best when one coefficient is already 1 (or -1), so isolating that variable requires no multiplication.
Steps:
- Step 1: Choose the equation where one variable has coefficient 1. Isolate that variable.
- Step 2: Substitute the expression into the other equation to get one equation in one unknown.
- Step 3: Solve for the remaining variable.
- Step 4: Back-substitute to find the first variable. Verify in both original equations.
Worked example:
- System: 2x + y = 7 and x - y = 2
- From eq 2: x = y + 2 (coefficient of x is 1, so isolate directly)
- Substitute into eq 1: 2(y + 2) + y = 7 → 2y + 4 + y = 7 → 3y = 3 → y = 1
- Back-substitute: x = 1 + 2 = 3
- Verify eq 1: 2(3) + 1 = 7 ✓
- Verify eq 2: 3 - 1 = 2 ✓
- Solution: x = 3, y = 1
Substitution slows down when both coefficients are large integers. That is when elimination is cleaner.
Method 2 — Elimination
Best when the same variable has matching (or easily matched) coefficients, so adding or subtracting cancels it cleanly.
Steps:
- Step 1: Multiply one or both equations by a scalar so one variable has equal coefficients.
- Step 2: Add or subtract the equations to eliminate that variable.
- Step 3: Solve the resulting single-variable equation.
- Step 4: Substitute back and verify.
Worked example:
- System: 3x + 2y = 12 and 5x - 2y = 4
- The y-coefficient is 2 in eq 1 and -2 in eq 2. Add directly.
- Add: (3x + 2y) + (5x - 2y) = 12 + 4 → 8x = 16 → x = 2
- Substitute into eq 1: 3(2) + 2y = 12 → 6 + 2y = 12 → 2y = 6 → y = 3
- Verify eq 1: 3(2) + 2(3) = 6 + 6 = 12 ✓
- Verify eq 2: 5(2) - 2(3) = 10 - 6 = 4 ✓
- Solution: x = 2, y = 3
When neither variable cancels cleanly, cross-multiplication gives both values in a single structured pass without rearranging intermediate steps.
Method 3 — Cross-Multiplication
Best when both equations are in standard form a₁x + b₁y + c₁ = 0 and you want a direct result.
The formula (for a₁x + b₁y + c₁ = 0 and a₂x + b₂y + c₂ = 0):
- x / (b₁c₂ - b₂c₁) = y / (c₁a₂ - c₂a₁) = 1 / (a₁b₂ - a₂b₁)
- Solved: x = (b₁c₂ - b₂c₁) / (a₁b₂ - a₂b₁) and y = (c₁a₂ - c₂a₁) / (a₁b₂ - a₂b₁)
The denominator a₁b₂ - a₂b₁ is the determinant. If it equals zero, the lines are parallel or coincident: no unique solution exists.
Worked example:
- System: 2x + 3y - 13 = 0 and 4x - y - 5 = 0
- Coefficients: a₁ = 2, b₁ = 3, c₁ = -13, a₂ = 4, b₂ = -1, c₂ = -5
- Numerator for x: b₁c₂ - b₂c₁ = (3)(-5) - (-1)(-13) = -15 - 13 = -28
- Numerator for y: c₁a₂ - c₂a₁ = (-13)(4) - (-5)(2) = -52 + 10 = -42
- Denominator: a₁b₂ - a₂b₁ = (2)(-1) - (4)(3) = -2 - 12 = -14
- x = (-28) / (-14) = 2; y = (-42) / (-14) = 3
- Verify eq 1: 2(2) + 3(3) - 13 = 4 + 9 - 13 = 0 ✓
- Verify eq 2: 4(2) - (3) - 5 = 8 - 3 - 5 = 0 ✓
- Solution: x = 2, y = 3
Memorise the pattern: numerators follow a diagonal-product structure on the b-c and c-a columns; the denominator is the a-b cross product. Khan Academy’s systems-of-equations module has interactive practice that reinforces this pattern.
Method 4 — Cramer’s Rule (Matrix Method)
Best when you have a 2x2 or 3x3 system with integer coefficients and want a fully systematic approach.
For a 2x2 system a₁x + b₁y = d₁ and a₂x + b₂y = d₂:
Steps:
- Step 1: Compute the coefficient determinant D = (a₁)(b₂) - (a₂)(b₁)
- Step 2: Compute Dx by replacing the x-column with constants: Dx = (d₁)(b₂) - (d₂)(b₁)
- Step 3: Compute Dy by replacing the y-column with constants: Dy = (a₁)(d₂) - (a₂)(d₁)
- Step 4: x = Dx / D and y = Dy / D (only valid when D is not zero)
Worked example:
- System: 2x + 3y = 8 and x + 2y = 5
- D = (2)(2) - (1)(3) = 4 - 3 = 1
- Dx = (8)(2) - (5)(3) = 16 - 15 = 1
- Dy = (2)(5) - (1)(8) = 10 - 8 = 2
- x = 1 / 1 = 1; y = 2 / 1 = 2
- Verify eq 1: 2(1) + 3(2) = 2 + 6 = 8 ✓
- Verify eq 2: 1 + 2(2) = 1 + 4 = 5 ✓
- Solution: x = 1, y = 2
For a 3x3 system, expand each 3x3 determinant along the first row using cofactors. The substitution logic stays identical; only the determinant computation grows.
Graphical Interpretation: Unique, No, and Infinite Solutions
Every 2x2 linear system corresponds to two straight lines on a coordinate plane. The relationship between those lines determines how many solutions exist.
The test uses the coefficient ratios a₁/a₂, b₁/b₂, and c₁/c₂:
| Condition | Lines | Solutions |
|---|---|---|
| a₁/a₂ not equal to b₁/b₂ | Intersect at one point | Unique solution |
| a₁/a₂ = b₁/b₂, not equal to c₁/c₂ | Parallel (never meet) | No solution |
| a₁/a₂ = b₁/b₂ = c₁/c₂ | Coincident (same line) | Infinite solutions |
A system with a unique solution is called consistent and independent. Parallel lines give an inconsistent system. Coincident lines give a consistent but dependent system.
This table reduces to two questions: does a/b hold, and does c/c match? Two checks, one decision tree, and the result follows directly.
Placement Test Strategy and Common Errors
Time-and-work problems and linear-equation word problems are the two most common two-variable setups in placement aptitude rounds. Both require the same translation step: read the word problem, assign variables, write two equations, solve.
Translation Practice: A Typical Age-Type Problem
- “The sum of two numbers is 20. Their difference is 4. Find the numbers.”
- Let the numbers be x and y.
- Equation 1: x + y = 20
- Equation 2: x - y = 4
- Add both: 2x = 24 → x = 12; substitute to get y = 8
- The equations themselves are straightforward. The time loss happens during translation, not solving.
Four errors that cost marks in placement rounds:
- Sign error on c: Cross-multiplication requires standard form ax + by + c = 0. If the equation is ax + by = c, rewrite it as ax + by - c = 0 before reading off c₁ and c₂. Students who skip this step get wrong numerators.
- Skipping verification: Substitute the final answer back into both original equations. A sign error mid-calculation produces a plausible-looking answer that fails on check. The check takes under 20 seconds and saves the mark.
- Wrong variable to isolate in substitution: Isolating a variable with a large coefficient produces fractions that compound downstream errors. Always isolate the variable whose coefficient is 1 or -1 first.
- Forgetting the unique-solution condition: If D (the determinant a₁b₂ - a₂b₁) equals zero, Cramer’s rule breaks down. Check D before dividing. If D = 0, use the ratio test from the graphical section to determine whether the system has no solution or infinite solutions.
For placement preparation books that drill these patterns in timed MCQ formats, R.S. Aggarwal’s quantitative aptitude volume covers linear equations with the kind of structured question sets that mirror TCS NQT and AMCAT patterns.
Cross-multiplication is a compressed algorithm applied in exactly the same order every time. That same ability (applying a repeatable structure without re-deriving it from scratch on each question) is what makes working with LLMs productive too. TinkerLLM is a sandbox where engineering students practise applying that structured thinking to AI problems, with entry at ₹299 and no prior AI experience needed.
Primary sources
Frequently asked questions
What is the fastest method to solve linear equations in a placement test?
Cross-multiplication is fastest for 2x2 systems once the formula is memorised, because it gives x and y directly without rearranging. Substitution is faster when one coefficient is already 1.
What is the cross-multiplication formula for two linear equations?
For a1x + b1y + c1 = 0 and a2x + b2y + c2 = 0: x = (b1c2 - b2c1) / (a1b2 - a2b1) and y = (c1a2 - c2a1) / (a1b2 - a2b1), provided a1b2 - a2b1 is not zero.
How do I know if a system of linear equations has no solution?
If the ratio a1/a2 equals b1/b2 but does not equal c1/c2, the two lines are parallel and the system has no solution. This is called an inconsistent system.
Can I use Cramer's rule for three equations with three unknowns?
Yes. For three equations, compute the 3x3 determinants D, Dx, Dy, and Dz using the coefficient and constant matrices. Then x = Dx/D, y = Dy/D, z = Dz/D, provided D is not zero.
What types of linear equation questions appear in TCS NQT and AMCAT?
Mostly word problems that translate into two-variable systems: age problems, mixture problems, and digit problems. The options are usually integers, so substituting from the answer choices is often the fastest route.
What is the difference between a consistent and an inconsistent system?
A consistent system has at least one solution. An inconsistent system has no solution because the lines are parallel. If a1/a2 = b1/b2 but that ratio differs from c1/c2, the system is inconsistent.
When does a system of linear equations have infinite solutions?
When both equations represent the same line: a1/a2 = b1/b2 = c1/c2. Every point on the line satisfies both equations, giving infinitely many solutions.
A self-paced playground for building with LLMs.
TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.
Try TinkerLLM (₹299 launch)