System of Equations Calculator

Free Online 6 Methods Step-by-Step

Free system of equations solver with step-by-step solutions. Solve using Gaussian elimination, Gauss-Jordan RREF, LU decomposition, Cramer's rule, matrix inverse, and least squares. Shows every row operation. Enter as text, matrix grid, or polynomial equations. Interactive 2D/3D graphs and built-in Python compiler.

System of Equations
equations ร— variables
Square system (m = n)
One row per line, space or comma separated
One value per line

Result

Ax=b

Enter a system of equations

Solve with 6 methods. Step-by-step solutions, interactive graph, Python code.

Interactive Graph

Solve a system to see its graph. 2D for 2 variables, 3D for 3 variables.

Python Compiler

What is a System of Linear Equations?

A system of linear equations is a set of equations where each unknown variable appears only to the first power (no xยฒ, no xy products). The goal: find values that make every equation true at the same time. We write the entire system compactly as Ax = b.

21 13
A (coefficients)
ร—
x y
x (unknowns)
=
5 7
b (constants)
๐Ÿ’ก
What this really means: The matrix equation above is just a compact way of writing 2x + 1y = 5 and 1x + 3y = 7. Each row of A holds the coefficients of one equation. The vector b holds the right-hand-side values. Solving means finding x, y that satisfy both equations simultaneously.

How Does Solving Work?

Every method follows the same core idea: systematically eliminate variables until you can read the answer directly.

1
Write Ax = b
Organize equations into matrix form: coefficients, unknowns, constants.
2
Augmented Matrix
Combine A and b into [A|b] to work with a single tableau.
3
Row Operations
Swap, scale, and combine rows to create zeros below (or above) each pivot.
4
Read Solution
Back-substitute from the last row up, or read directly from RREF.

Row Operations in Action

Row operations transform the augmented matrix without changing the solution. Here's one step of Gaussian elimination โ€” hover to see the row being eliminated:

[A | b]
 2 1| 5
 1 3| 7
Rโ‚‚ = Rโ‚‚ - ยฝRโ‚
Row Echelon
 2 1| 5
 0 2.5| 4.5
โœ…
Now back-substitute: From row 2: 2.5y = 4.5 โ†’ y = 1.8. Plug into row 1: 2x + 1.8 = 5 โ†’ x = 1.6. That's Gaussian elimination in a nutshell!

Geometric Interpretation: What Does a Solution Look Like?

In 2D, each linear equation is a line. Solving means finding where the lines meet. In 3D, each equation is a plane. There are exactly three possible outcomes:

Lโ‚ Lโ‚‚ (x, y)
One Solution
Lines intersect at exactly one point. det(A) โ‰  0.
gap Lโ‚ Lโ‚‚
No Solution
Parallel lines never meet. The system is inconsistent.
โˆž points
Infinite Solutions
Lines overlap completely. Every point on the line is a solution.
๐ŸŒŽ
In 3D it's the same idea, with planes: Three planes can meet at a single point (unique), form a line of intersection (infinite), or have no common intersection at all (inconsistent). Try the Graph tab above with a 3-variable system to see the 3D plane visualization.

Real-World Example: Mixing Solutions

A chemist needs to mix two acid solutions. Solution A is 30% acid, Solution B is 70% acid. She needs 200 mL of a 45% acid mixture. How much of each solution should she use?

๐Ÿงช Setting Up the System

Let x = mL of Solution A, y = mL of Solution B.

Total volume: x + y = 200

Acid balance: 0.3x + 0.7y = 90

(90 = 200 ร— 0.45, the total acid needed)

Matrix Form
[ 1    1   | 200 ]
[ 0.3 0.7 |  90 ]
x = 125 mL, y = 75 mL
๐Ÿ‘‰
Try it yourself! Click the 2D System example above, or enter the matrix A = [[1, 1], [0.3, 0.7]] and b = [200, 90] to see the step-by-step solution and graph.

Solution Methods Comparison

All methods find the same answer โ€” they differ in how they get there and when each is most efficient.

MethodBest ForComplexityKey Idea
Gaussian EliminationGeneral systemsO(nยณ)Create zeros below pivots, then back-substitute
Gauss-Jordan (RREF)Finding all solutionsO(nยณ)Create zeros above and below โ€” read solution directly
LU DecompositionMultiple right-hand sidesO(nยณ)Factor A = LU once, solve Ly = b then Ux = y
Cramer's RuleSmall systems (n โ‰ค 3)O(n! ยท n)xแตข = det(Aแตข) / det(A) using determinants
Matrix InverseSquare systemsO(nยณ)Compute A&supmin;ยน, then x = A&supmin;ยนb
Least SquaresOverdetermined (m > n)O(mnยฒ)Minimize ||Ax - b||ยฒ via normal equations Aแต€Ax = Aแต€b

Types of Solutions: How to Identify Each

โ— Unique Solution

Exactly one set of values satisfies all equations. Happens when det(A) โ‰  0 (the rows are linearly independent). The row echelon form has a pivot in every column.

[1 * * | *]
[0 1 * | *]
[0 0 1 | *]

โ— No Solution

The equations contradict each other. In row echelon form, you get a row [0 0 โ€ฆ 0 | c] where c โ‰  0 โ€” this says "0 = c", which is impossible.

[1 * * | *]
[0 1 * | *]
[0 0 0 | 5] โ† contradiction!

โ— Infinite Solutions

Free variables exist because rank(A) < n. The solution is parametric: some variables are expressed in terms of free parameters (t, s, โ€ฆ).

[1 * * | *]
[0 0 1 | *]
[0 0 0 | 0] โ† xโ‚‚ is free

โ— Least Squares

When there are more equations than unknowns (overdetermined), no exact solution exists. Least squares finds the x that minimizes the total error ||Ax - b||ยฒ.

Aแต€Ax = Aแต€b โ†’ xฬ‚ = best fit

Where Linear Systems Appear

โšก

Circuit Analysis

Kirchhoff's voltage and current laws at each node create a linear system. Solve for branch currents and node voltages.

๐Ÿ“Š

Data Fitting

Least squares regression fits a line or curve to noisy data by solving the normal equations Aแต€Ax = Aแต€b.

๐Ÿญ

Structural Engineering

Force and moment equilibrium in trusses and frames produces systems of equations for member forces.

๐Ÿ’ป

Computer Graphics

3D rotation, projection, ray-plane intersection, and mesh deformation all involve solving linear systems.

๐Ÿค–

Machine Learning

Linear regression, PCA, and neural network weight updates rely on solving or approximating linear systems.

โš–๏ธ

Chemical Balancing

Balancing chemical equations (conservation of atoms for each element) is a system of linear equations.

Frequently Asked Questions

This solver handles square systems (same number of equations and variables), overdetermined systems (more equations than variables, solved via least squares), and underdetermined systems (fewer equations than variables, showing parametric solutions with free variables). It also handles polynomial systems using Newton-Raphson iteration. Systems up to 10ร—10 are supported.
Six methods are available: Gaussian elimination (general-purpose with partial pivoting), Gauss-Jordan (produces reduced row echelon form), LU decomposition (factors A=LU then solves by substitution), Cramer's rule (uses determinants, best for small systems), matrix inverse (computes x = A&supmin;ยนb), and least squares (minimizes residual for overdetermined systems).
Three input modes are available. Text mode: enter the coefficient matrix A (one row per line, space-separated) and constants vector b separately. Grid mode: click into cells of a visual augmented matrix [A|b]. Polynomial mode: enter equations like "x^2 + y^2 = 25" for nonlinear systems solved by Newton-Raphson.
All step-by-step solutions are computed entirely in your browser (client-side). Each method generates detailed steps: Gaussian elimination shows every row operation and augmented matrix state, Cramer's rule shows each determinant computation, LU decomposition shows L and U matrices with forward/back substitution, and so on. No server calls needed โ€” results are instant.
Yes, this solver is completely free with no signup required. You get 6 solving methods, step-by-step solutions with augmented matrix visualization, interactive 2D/3D Plotly graphs, a Python compiler with NumPy/SymPy/SciPy templates, LaTeX export, and shareable URLs. All computation runs entirely in your browser for instant results.

Explore More Math Tools

โˆซ

Integral Calculator

Step-by-step integration with graphs and PDF export

d/dx

Derivative Calculator

Differentiate any function with step-by-step solutions

log

Logarithm Calculator

Solve, expand, condense log equations with steps

Support This Free Tool

Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site โ€” you're helping me build what developers actually need.

500K+ users
200+ tools
100% private
Privacy Guarantee: Private keys you enter or generate are never stored on our servers. All tools are served over HTTPS.