System of Linear Equations Solver
Solve an n×n system of linear equations (2 to 8 unknowns) with exact fraction arithmetic — get the unique solution, a parametric form for infinitely many solutions, or confirmation that none exists.
Input
Each line is one equation: its coefficients followed by the constant, comma- or space-separated — e.g. "2, 1, 5" means 2x₁ + x₂ = 5. The number of lines fixes the system's size (2 to 8 unknowns), so every line needs exactly that many coefficients plus the constant. Values can be integers, decimals, or fractions like 1/2.
Output
| Variable | Value |
|---|---|
| No data yet | |
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/system-of-linear-equations-solver \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"equations": "2, 1, 5\n1, -1, 1"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `system-of-linear-equations-solver` tool (System of Linear Equations Solver) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/system-of-linear-equations-solver/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="System of Linear Equations Solver — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|
Also available with
Guides
Solving a system by hand — elimination, back-substitution, keeping every fraction straight across a half-dozen equations — is where small arithmetic slips turn a correct method into a wrong answer. This calculator runs Gauss-Jordan elimination for you with exact fraction arithmetic, for any square system from 2 up to 8 unknowns, and tells you plainly whether the solution is unique, comes with free parameters, or doesn't exist.
How to use it
- Enter one equation per line, as its coefficients followed by the constant — for
2x₁ + x₂ = 5, enter2, 1, 5. - The number of lines you enter fixes the system's size: 3 lines means a 3×3 system, so each of those 3 lines needs exactly 4 values (3 coefficients + the constant).
- Read off the result: a unique value per variable, a parametric expression for each dependent variable when there are infinitely many solutions, or "no solution" when the system is inconsistent.
Coefficients and constants can be integers, decimals, or exact fractions like 1/2 — everything is solved with exact rational arithmetic, so results are never rounded.
The method
Gauss-Jordan elimination reduces the augmented matrix to reduced row echelon form: pick a pivot in each column (swapping rows as needed), scale its row so the pivot is 1, then clear every other row's entry in that column. What's left tells you the outcome:
- Every variable has a pivot → a unique solution, read straight off the constant column.
- A column has no pivot → that variable is free; every pivot variable is then expressed as a formula in terms of the free ones (infinitely many solutions).
- A row reduces to all zeros on the left but a nonzero constant → the system is inconsistent (no solution).
The row-reduced matrix itself is shown too, so you can follow the elimination instead of just trusting the final answer.
FAQ
What does "1 free parameter" mean?
It means one variable can be any value, and every other variable is then determined by it — the reduced-matrix output and the per-variable expressions show exactly how. Two dependent equations for two unknowns (like x + y = 3 and 2x + 2y = 6) is the simplest example: one equation is redundant, so one variable is free.
Why "no solution" instead of an approximate answer?
An inconsistent system (like x + y = 1 and x + y = 2) has no values that satisfy both equations, and rounding wouldn't fix that — the calculator reports it directly rather than returning a misleading fraction.
Can I solve a non-square system (more equations than unknowns, or fewer)?
Not with this tool — enter exactly as many equations as unknowns. For a single linear equation in one unknown, see the Linear Equation Solver. For matrix arithmetic (add, multiply, determinant, inverse) rather than solving a system, see the Matrix Calculator.
Related tools
For a single-variable linear equation, use the Linear Equation Solver. For matrix operations like determinant and inverse on 2×2 and 3×3 matrices, use the Matrix Calculator.
Privacy
All calculations run entirely in your browser — the equations you enter are never sent to a server.