# System of Equations Solver

Source: https://calcsolve.org/system-of-equations-solver

Enter two or more equations, one per line or separated by commas. Linear systems are solved by elimination and row reduction; non-linear systems by substitution.

## Methods for solving a system

| Method | Best for | Idea |
| --- | --- | --- |
| Substitution | When one variable is easy to isolate | Solve one equation for a variable and substitute into the other |
| Elimination | 2×2 and 3×3 linear systems | Add or subtract equations to cancel a variable |
| Cramer's rule | Small systems with a non-zero determinant | Each variable is a ratio of determinants |
| Gauss–Jordan | Larger systems | Row-reduce the augmented matrix |

## Example: 2×2 by substitution

### Solve 2x + 3y = 12 and x − y = 1

1. From the second equation, x = y + 1.
2. Substitute: 2(y + 1) + 3y = 12, so 5y = 10 and y = 2.
3. Then x = 2 + 1 = 3.
4. Check: 2(3) + 3(2) = 12 and 3 − 2 = 1.

**Answer:** x = 3, y = 2

## The same system with Cramer's rule

The determinant of the coefficient matrix is D = 2(−1) − 3(1) = −5. Replacing the x-column with the constants gives Dₓ = 12(−1) − 3(1) = −15, and replacing the y-column gives Dᵧ = 2(1) − 12(1) = −10. So x = −15/−5 = 3 and y = −10/−5 = 2, matching the substitution result.

## Example: three equations, three unknowns

### Solve x + y + z = 6, 2x − y + z = 3, x + 2y − z = 2

1. Add equations 1 and 3 to eliminate z: 2x + 3y = 8.
2. Add equations 2 and 3: 3x + y = 5, so y = 5 − 3x.
3. Substitute: 2x + 3(5 − 3x) = 8, giving −7x = −7, so x = 1 and y = 2.
4. From equation 1, z = 6 − 1 − 2 = 3.

**Answer:** x = 1, y = 2, z = 3

## Three possible outcomes

- One solution: the lines meet at a single point.
- No solution: the lines are parallel, and elimination ends with a false statement like 0 = 4.
- Infinitely many solutions: the equations describe the same line, and elimination ends with 0 = 0.

## Non-linear systems

### Solve x² + y² = 25 and x + y = 7

1. Substitute y = 7 − x: x² + (7 − x)² = 25.
2. Expand: 2x² − 14x + 49 = 25, so x² − 7x + 12 = 0.
3. Factor: (x − 3)(x − 4) = 0.
4. The pairs are (3, 4) and (4, 3).

**Answer:** (3, 4) and (4, 3)

## Frequently asked questions

### How many equations do I need?

As a rule, one equation for each unknown. Fewer usually gives infinitely many solutions, and extra equations can make the system inconsistent.

### Which separator should I use?

Commas, semicolons or new lines all work.
