In short

A system of linear equations in two variables is a pair of linear equations whose solution is the point (x, y) that satisfies both simultaneously. Four methods find this point: the graphical method (plot both lines and read the crossing point), substitution (express one variable in terms of the other and plug in), elimination (add or subtract the equations to kill one variable), and cross-multiplication (a formula that gives x and y directly from the coefficients). A system can have exactly one solution (the lines cross), no solution (the lines are parallel), or infinitely many solutions (the lines are the same). The ratios of the coefficients tell you which case you are in before you solve.

A fruit seller buys apples and oranges. 3 kg of apples and 2 kg of oranges cost ₹260. 2 kg of apples and 3 kg of oranges cost ₹240. What is the price per kilogram of each fruit?

Let the price of apples be x ₹/kg and oranges be y ₹/kg. The two conditions give two equations:

3x + 2y = 260
2x + 3y = 240

Each equation alone describes a line in the xy-plane — infinitely many pairs (x, y) satisfy it. But you need a pair that satisfies both equations at once. That pair is the single point where the two lines cross. Finding that crossing point is the central problem of this article.

The graphical method

The most direct approach: plot both lines and see where they meet.

For 3x + 2y = 260:

For 2x + 3y = 240:

Plot both lines. They cross at one point. Reading the coordinates carefully gives x = 60, y = 40. Check: 3(60) + 2(40) = 180 + 80 = 260. 2(60) + 3(40) = 120 + 120 = 240. Both equations satisfied.

The graphical method is valuable for seeing the answer, but it has a practical limitation: if the solution involves fractions or large numbers, reading exact coordinates from a graph is unreliable. For precise answers, you need an algebraic method.

Two lines intersecting at (60, 40) representing the fruit-price systemA coordinate plane with x representing apple price and y representing orange price. The first line, 3x + 2y = 260, passes through approximately (86.7, 0) and (0, 130). The second line, 2x + 3y = 240, passes through (120, 0) and (0, 80). The two lines cross at the point (60, 40), which is highlighted. x (apple ₹/kg) y (orange ₹/kg) 0 10 20 30 40 50 60 70 80 90 100 110 120 10 20 30 40 50 60 70 80 90 100 (60, 40) 3x + 2y = 260 2x + 3y = 240
The two lines cross at $(60, 40)$. Apples cost ₹60/kg, oranges cost ₹40/kg. Each line alone has infinitely many solutions, but the crossing point is the only pair that satisfies both equations at once.

The substitution method

Express one variable in terms of the other from one equation, then substitute into the second.

Take the same system:

3x + 2y = 260 \quad \cdots (1)
2x + 3y = 240 \quad \cdots (2)

From equation (1): 2y = 260 - 3x, so y = \frac{260 - 3x}{2}.

Substitute into equation (2):

2x + 3 \cdot \frac{260 - 3x}{2} = 240

Multiply both sides by 2 to clear the fraction:

4x + 3(260 - 3x) = 480
4x + 780 - 9x = 480
-5x = 480 - 780 = -300
x = 60

Now back-substitute: y = \frac{260 - 3(60)}{2} = \frac{260 - 180}{2} = \frac{80}{2} = 40.

The solution is (60, 40), the same point as before. Substitution works well when one equation is easy to solve for one variable — especially when a coefficient is 1.

The elimination method

Instead of substituting, multiply the equations by chosen constants so that one variable has the same coefficient in both, then subtract to eliminate it.

Take the same system:

3x + 2y = 260 \quad \cdots (1)
2x + 3y = 240 \quad \cdots (2)

Multiply (1) by 3 and (2) by 2:

9x + 6y = 780 \quad \cdots (1')
4x + 6y = 480 \quad \cdots (2')

Subtract (2') from (1'):

5x = 300 \implies x = 60

Substitute x = 60 into equation (2): 2(60) + 3y = 240 \implies 120 + 3y = 240 \implies 3y = 120 \implies y = 40.

The name "elimination" says it all — you manufacture equal coefficients, then subtract to eliminate one variable. The arithmetic is usually cleaner than substitution because you avoid fractions.

The elimination method: multiply to match coefficients, then subtractA vertical flowchart showing the elimination process. The first row has two equations side by side: 3x + 2y = 260 and 2x + 3y = 240. Arrows labelled times 3 and times 2 lead to 9x + 6y = 780 and 4x + 6y = 480. A subtraction step removes the y-terms, giving 5x = 300, and the final box shows x = 60. 3x + 2y = 260 2x + 3y = 240 × 3 × 2 9x + 6y = 780 4x + 6y = 480 subtract: (1') − (2') 5x + 0y = 300 divide by 5 x = 60
Elimination in action. Multiplying the first equation by $3$ and the second by $2$ gives both equations the same $y$-coefficient ($6y$). Subtracting one from the other kills $y$ entirely, leaving a single equation in $x$. One variable is eliminated, and the other follows by back-substitution.

The cross-multiplication method

For the general system

a_1 x + b_1 y + c_1 = 0
a_2 x + b_2 y + c_2 = 0

there is a direct formula. Write the coefficients in two rows:

\frac{x}{b_1 c_2 - b_2 c_1} = \frac{y}{c_1 a_2 - c_2 a_1} = \frac{1}{a_1 b_2 - a_2 b_1}

provided a_1 b_2 - a_2 b_1 \neq 0. This gives:

x = \frac{b_1 c_2 - b_2 c_1}{a_1 b_2 - a_2 b_1}, \qquad y = \frac{c_1 a_2 - c_2 a_1}{a_1 b_2 - a_2 b_1}

For the fruit-price problem, rewrite the equations as 3x + 2y - 260 = 0 and 2x + 3y - 240 = 0. Here a_1 = 3, b_1 = 2, c_1 = -260, a_2 = 2, b_2 = 3, c_2 = -240.

a_1 b_2 - a_2 b_1 = 3(3) - 2(2) = 9 - 4 = 5
x = \frac{b_1 c_2 - b_2 c_1}{5} = \frac{2(-240) - 3(-260)}{5} = \frac{-480 + 780}{5} = \frac{300}{5} = 60
y = \frac{c_1 a_2 - c_2 a_1}{5} = \frac{(-260)(2) - (-240)(3)}{5} = \frac{-520 + 720}{5} = \frac{200}{5} = 40

Same answer: (60, 40). The cross-multiplication method is fastest when you want a direct formula answer — no intermediate steps, no back-substitution. The quantity a_1 b_2 - a_2 b_1 in the denominator is called the determinant of the system and appears again in Determinants.

A memory aid for the cross-multiplication formula: write the coefficients a, b, c in a cycle, and cross-multiply adjacent pairs with alternating signs. The pattern is

\begin{array}{ccccc} b_1 & c_1 & a_1 & b_1 \\ b_2 & c_2 & a_2 & b_2 \end{array}

Cross-multiply diagonally: b_1 c_2 - b_2 c_1 gives the numerator for x, c_1 a_2 - c_2 a_1 gives the numerator for y, and a_1 b_2 - a_2 b_1 gives the common denominator.

Consistency and types of solutions

Not every system has a single solution. The geometry makes this clear: two lines in a plane can relate to each other in exactly three ways.

Case 1: Intersecting lines. The lines cross at one point. The system has exactly one solution — it is consistent and independent.

Case 2: Parallel lines. The lines never meet. The system has no solution — it is inconsistent.

Case 3: Coincident lines. The two equations describe the same line. The system has infinitely many solutions — it is consistent and dependent.

You can tell which case you are in from the coefficients alone, without solving. For the system a_1 x + b_1 y + c_1 = 0 and a_2 x + b_2 y + c_2 = 0:

Condition Geometry Solutions
\frac{a_1}{a_2} \neq \frac{b_1}{b_2} Intersecting lines Exactly one
\frac{a_1}{a_2} = \frac{b_1}{b_2} \neq \frac{c_1}{c_2} Parallel lines None
\frac{a_1}{a_2} = \frac{b_1}{b_2} = \frac{c_1}{c_2} Same line Infinitely many

The logic: if a_1/a_2 = b_1/b_2, the two lines have the same slope, so they are parallel. If they also have the same intercept (c_1/c_2 matches), they are the same line. If the slopes differ (a_1/a_2 \neq b_1/b_2), the lines must cross somewhere.

Three cases for a system of two linear equations: intersecting, parallel, and coincident linesThree coordinate planes arranged in a row. The left panel shows two lines crossing at a single red dot, labelled one solution. The middle panel shows two parallel lines with no crossing, labelled no solution. The right panel shows two lines drawn on top of each other, labelled infinitely many solutions. Intersecting one solution Parallel no solution Coincident infinitely many The ratios a₁/a₂ and b₁/b₂ decide which case applies a₁/a₂ ≠ b₁/b₂ → intersecting → unique solution a₁/a₂ = b₁/b₂ ≠ c₁/c₂ → parallel → no solution a₁/a₂ = b₁/b₂ = c₁/c₂ → coincident → infinitely many
The three possible outcomes for a system of two linear equations. Two different slopes guarantee a crossing. Equal slopes with different intercepts mean parallel lines. Equal slopes with equal intercepts mean the same line drawn twice. The coefficient ratios tell you which case you are in.

Example of no solution. Take 2x + 4y = 10 and x + 2y = 8. Rewrite the first as x + 2y = 5. Now the system is x + 2y = 5 and x + 2y = 8 — the same left side, different right side. The lines are parallel (a_1/a_2 = b_1/b_2 = 1, but c_1/c_2 = 5/8 \neq 1). No point can make x + 2y equal to both 5 and 8 at once.

Example of infinitely many solutions. Take 2x + 4y = 10 and x + 2y = 5. The first equation is just twice the second. They describe the same line. Every point on x + 2y = 5 is a solution: (5, 0), (1, 2), (-3, 4), and infinitely many others.

Interactive exploration

Drag the red point below along the line x + y = 7. The readout shows the values of x and y, and also computes 2x + y (the left side of the second equation 2x + y = 10). When 2x + y hits 10, you have found the intersection point — the solution that satisfies both equations simultaneously.

Interactive exploration of a system of two equations by dragging a point along one lineA coordinate plane showing two lines: x plus y equals 7 and 2x plus y equals 10. A draggable red point moves along the first line. Readouts show the current x and y values and the value of 2x plus y. The reader drags until 2x plus y equals 10, finding the intersection point at (3, 4). x y 0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 x + y = 7 2x + y = 10 ↔ drag the red point along x + y = 7
Drag the red point along the line $x + y = 7$. The third readout shows $2x + y$ in real time. When $2x + y = 10$, you have found the intersection — the point $(3, 4)$ that satisfies both $x + y = 7$ and $2x + y = 10$. Any other position on the first line satisfies the first equation but not the second.

Two worked examples

Example 1: Solve by elimination — $5x + 3y = 31$ and $3x + 5y = 29$

Step 1. Multiply the first equation by 5 and the second by 3 to match the y-coefficients.

25x + 15y = 155 \quad \cdots (1')
9x + 15y = 87 \quad \cdots (2')

Why: both equations now have 15y. Subtracting one from the other will eliminate y, leaving a single equation in x.

Step 2. Subtract (2') from (1').

25x - 9x = 155 - 87
16x = 68
x = \frac{68}{16} = \frac{17}{4}

Why: the 15y terms cancel exactly. What remains is 16x = 68, a one-variable equation that you solve by dividing.

Step 3. Back-substitute to find y. Use the original first equation:

5 \cdot \frac{17}{4} + 3y = 31
\frac{85}{4} + 3y = 31
3y = 31 - \frac{85}{4} = \frac{124 - 85}{4} = \frac{39}{4}
y = \frac{39}{12} = \frac{13}{4}

Why: plug x = 17/4 into either original equation and solve for y. Using the first equation keeps the arithmetic slightly cleaner.

Step 4. Check in the second equation.

3 \cdot \frac{17}{4} + 5 \cdot \frac{13}{4} = \frac{51}{4} + \frac{65}{4} = \frac{116}{4} = 29 \quad \checkmark

Why: always check in the equation you did not use for back-substitution. If both equations are satisfied, the answer is confirmed.

Result. x = \frac{17}{4}, y = \frac{13}{4}.

Graph of 5x + 3y = 31 and 3x + 5y = 29 intersecting at (17/4, 13/4)A coordinate plane showing two lines. The first line, 5x + 3y = 31, and the second line, 3x + 5y = 29, cross at the point (4.25, 3.25). Both intercepts and the crossing point are marked. x y 0 1 2 3 4 5 6 1 2 3 4 5 (17/4, 13/4) 5x + 3y = 31 3x + 5y = 29
The two lines cross at $(17/4, 13/4) = (4.25, 3.25)$. Notice how the graphical method would struggle to read this fractional answer precisely — elimination handles it without ambiguity.

This example shows why the algebraic methods outperform the graphical method when the answer has fractions. The graph tells you the crossing is somewhere between 4 and 5 on the x-axis, but elimination gives the exact answer 17/4.

Example 2: Substitution with a word problem — two-digit number

A two-digit number is 7 times the sum of its digits. The digit in the tens place is 2 more than the digit in the units place. Find the number.

Step 1. Set up the variables.

Let the tens digit be x and the units digit be y. Then the two-digit number has value 10x + y.

Why: a two-digit number with tens digit x and units digit y is 10x + y. The number 42, for instance, is 10(4) + 2.

Step 2. Translate the conditions into equations.

Condition 1: the number is 7 times the sum of its digits.

10x + y = 7(x + y)

Condition 2: the tens digit is 2 more than the units digit.

x = y + 2

Why: "the number" is 10x + y and "the sum of its digits" is x + y. "Is 7 times" gives the multiplication. The second condition is a direct translation.

Step 3. Simplify the first equation.

10x + y = 7x + 7y
3x = 6y
x = 2y

Why: expand the right side, then collect x-terms and y-terms on opposite sides. The equation x = 2y is simpler and equivalent.

Step 4. Substitute x = y + 2 from the second equation into x = 2y.

y + 2 = 2y
2 = y

So y = 2, and x = y + 2 = 4. The number is 10(4) + 2 = 42.

Why: the second equation already gives x in terms of y — a perfect setup for substitution. Plugging it into the simplified first equation gives a single equation in y.

Result. The number is 42.

Graph of x = 2y and x = y + 2 intersecting at (4, 2) giving the number 42A coordinate plane showing two lines. The line x = 2y passes through the origin with slope in the x-direction of 2. The line x = y + 2 has a slope of 1 and crosses the x-axis at 2. They intersect at (4, 2). The digits form the number 42, shown in a callout box. y x 0 1 2 3 4 1 2 3 4 5 (2, 4) x = 2y x = y + 2 tens = 4, units = 2 Number = 42
The lines $x = 2y$ and $x = y + 2$ meet at $(y, x) = (2, 4)$. The tens digit is $4$, the units digit is $2$, and the number is $42$. Check: $4 + 2 = 6$, and $7 \times 6 = 42$. The tens digit $4$ is indeed $2$ more than the units digit $2$. Both conditions are satisfied.

The substitution method was the natural choice here because the second equation already expressed x directly in terms of y. There was nothing to rearrange — just plug in.

Common confusions

Going deeper

If you came here to learn the four methods and the consistency conditions, you have the complete toolkit for solving pairs of linear equations. What follows is for readers who want to see how these ideas extend.

The determinant

The quantity a_1 b_2 - a_2 b_1 that appears in the cross-multiplication formula is a 2 \times 2 determinant:

\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix} = a_1 b_2 - a_2 b_1

When the determinant is nonzero, the system has a unique solution. When it is zero, the system is either inconsistent or dependent. The determinant is a single number that encodes whether the two lines are "independent enough" to pin down a point. You meet determinants in full generality in Determinants, where they extend to 3 \times 3 and larger systems.

Cramer's rule

The cross-multiplication formula is a special case of Cramer's rule, which works for any system of n equations in n unknowns (provided the main determinant is nonzero). For a 2 \times 2 system a_1 x + b_1 y = d_1 and a_2 x + b_2 y = d_2:

x = \frac{\begin{vmatrix} d_1 & b_1 \\ d_2 & b_2 \end{vmatrix}}{\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}}, \qquad y = \frac{\begin{vmatrix} a_1 & d_1 \\ a_2 & d_2 \end{vmatrix}}{\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}}

The rule replaces one column of the coefficient matrix with the constants from the right-hand side, computes the determinant, and divides by the main determinant. The pattern extends to 3 \times 3 systems with three equations and three unknowns.

Systems of three or more equations

With three unknowns, you need three independent equations. Geometrically, each equation in three variables describes a plane in \mathbb{R}^3. Two planes generally meet in a line, and three planes generally meet at a point. The methods extend: elimination works by reducing a 3 \times 3 system to a 2 \times 2 system (eliminating one variable), then to a 1 \times 1 system. This cascading elimination is formalised as Gaussian elimination, which is the workhorse algorithm for solving linear systems of any size. You meet it in Matrices — Introduction.

Why systems matter

Almost every real-world problem with multiple interacting quantities reduces to a system of equations. Circuit analysis (Kirchhoff's laws) gives a system of linear equations. Balancing chemical equations is a system. Fitting a line to data (least squares) involves solving a system. Economic equilibrium models are systems. The 2 \times 2 case you learned here is the smallest nontrivial version — the training ground for a technique that scales to thousands of equations solved by computers in microseconds.

Where this leads next

Systems of linear equations connect algebra to geometry, to matrices, and eventually to almost every applied field.