System of Equations Solver

Solve systems of linear equations with AI-powered step-by-step solutions

Drag & drop or click to add images or PDF

Math Input
2x + 3y = 7, x - y = 1
x + y + z = 6, 2x - y + z = 3, x + 2y - z = 2
3x - 2y = 4, x + 4y = 10
5x + y = 13, 2x - 3y = -4

What is a System of Equations?

A system of equations (also called simultaneous equations) is a set of two or more equations with the same variables that must all be satisfied at the same time. The solution is the set of values that makes every equation true simultaneously.

A system of two linear equations in two unknowns has the form:

{a1x+b1y=c1a2x+b2y=c2\begin{cases} a_1 x + b_1 y = c_1 \\ a_2 x + b_2 y = c_2 \end{cases}

Geometrically, each equation represents a line in the plane. The solution is the point where the lines intersect.

A system can have:

  • One unique solution: The lines intersect at exactly one point (consistent and independent).
  • No solution: The lines are parallel (inconsistent).
  • Infinitely many solutions: The lines are identical (consistent and dependent).

Systems of equations appear in countless applications: mixing problems, circuit analysis, supply and demand equilibrium, traffic flow, and optimization. Larger systems with 3+ variables arise in engineering and data science.

How to Solve a System of Equations

1. Substitution Method

Solve one equation for one variable, then substitute into the other equation.

Example: Solve {xy=12x+3y=7\begin{cases} x - y = 1 \\ 2x + 3y = 7 \end{cases}

  1. From equation 1: x=y+1x = y + 1
  2. Substitute into equation 2: 2(y+1)+3y=72(y + 1) + 3y = 7
  3. 2y+2+3y=72y + 2 + 3y = 75y=55y = 5y=1y = 1
  4. Back-substitute: x=1+1=2x = 1 + 1 = 2

2. Elimination Method

Add or subtract equations to eliminate one variable.

Example: Solve {2x+3y=7xy=1\begin{cases} 2x + 3y = 7 \\ x - y = 1 \end{cases}

  1. Multiply equation 2 by 3: 3x3y=33x - 3y = 3
  2. Add to equation 1: 5x=105x = 10x=2x = 2
  3. Substitute back: 2y=12 - y = 1y=1y = 1

3. Matrix Method (Gaussian Elimination)

Write the system as an augmented matrix and row-reduce:

(237111)(102011)\begin{pmatrix} 2 & 3 & | & 7 \\ 1 & -1 & | & 1 \end{pmatrix} \rightarrow \begin{pmatrix} 1 & 0 & | & 2 \\ 0 & 1 & | & 1 \end{pmatrix}

4. Cramer's Rule

For a 2×22 \times 2 system, if D=a1b2a2b10D = a_1 b_2 - a_2 b_1 \neq 0:

x=c1b2c2b1D,y=a1c2a2c1Dx = \frac{c_1 b_2 - c_2 b_1}{D}, \quad y = \frac{a_1 c_2 - a_2 c_1}{D}

5. Graphing

Plot each equation and identify the intersection point.

MethodBest When
SubstitutionOne variable is easily isolated
EliminationCoefficients align for easy cancellation
Matrix/GaussianLarge systems (3+ variables)
Cramer's RuleSmall systems with non-zero determinant
GraphingVisual estimate or verification

Common Mistakes to Avoid

  • Incorrect substitution: When substituting an expression, replace the variable everywhere it appears and use parentheses.
  • Multiplying only part of an equation: When multiplying to eliminate, every term (including the constant) must be multiplied.
  • Losing track of signs: Be extra careful with negative coefficients during elimination.
  • Declaring no solution prematurely: Getting 0=00 = 0 means infinitely many solutions (dependent system), not no solution. Only 0=c0 = c (where c0c \neq 0) means no solution.
  • Forgetting to find all variables: After finding one variable, always substitute back to find the others.

Examples

Step 1: From the second equation: x=y+1x = y + 1
Step 2: Substitute into the first: 2(y+1)+3y=72(y+1) + 3y = 75y+2=75y + 2 = 7y=1y = 1
Step 3: Back-substitute: x=1+1=2x = 1 + 1 = 2
Answer: x=2,  y=1x = 2,\; y = 1

Step 1: From equations 1 and 2: subtract eq1 from eq2 → x2y=3x - 2y = -3 (call this eq4)
Step 2: From equations 1 and 3: subtract eq3 from eq1 → y+2z=4-y + 2z = 4; also add eq2 and eq3: 3x+y=53x + y = 5 (call this eq5). From eq4: x=2y3x = 2y - 3; substitute into eq5: 3(2y3)+y=53(2y-3) + y = 57y=147y = 14y=2y = 2
Step 3: Back-substitute: x=2(2)3=1x = 2(2) - 3 = 1; from eq1: z=612=3z = 6 - 1 - 2 = 3
Answer: x=1,  y=2,  z=3x = 1,\; y = 2,\; z = 3

Step 1: Multiply the first equation by 3: 15x+3y=3915x + 3y = 39
Step 2: Add to the second equation: 15x+3y+2x3y=39+(4)15x + 3y + 2x - 3y = 39 + (-4)17x=3517x = 35x=3517x = \frac{35}{17}
Step 3: Substitute back: y=1353517=1317517=22117517=4617y = 13 - 5 \cdot \frac{35}{17} = 13 - \frac{175}{17} = \frac{221 - 175}{17} = \frac{46}{17}
Answer: x=3517,  y=4617x = \frac{35}{17},\; y = \frac{46}{17}

Frequently Asked Questions

A system of equations is a collection of two or more equations that share the same variables. The solution is the set of values that satisfies all equations at the same time. For example, x + y = 5 and x - y = 1 form a system with solution x = 3, y = 2.

Yes. A system has no solution when the equations are contradictory — for two linear equations, this means the lines are parallel and never intersect. For example, x + y = 1 and x + y = 3 have no solution.

Substitution solves one equation for one variable and plugs it into the other equation. Elimination adds or subtracts equations to cancel out a variable. Both methods always give the same answer; the choice depends on which is easier for the given system.

Use elimination or substitution to reduce the system step by step. Eliminate one variable from two pairs of equations to get a 2x2 system, solve that, then back-substitute. For larger systems, Gaussian elimination (row reduction) is the most systematic approach.

Related Solvers

LinearEquationInequalityDerivative
Try AI-Math for Free

Get step-by-step solutions to any math problem. Upload a photo or type your question.

Start Solving