Math

System of Linear Equations Calculator

Solve a square system A × x = b and check its numerical residual.

Exact method explained belowEditable inputs
Linear algebra workspace
Linear algebra workspace

Keep columns in the same variable order across every equation.

See the method

Set up A × x = b

Runs on your device

Solution and residual

Your result

Let’s calculate.

Use the Calculate button to see your result.

Review the method below for assumptions and conventions.

How to use this tool

  1. Enter matrix a — one row per line, right-hand side b.
  2. Select Calculate to view the result.
  3. Check the method and assumptions below before using the result.

The method, explained

Augment the coefficient matrix with b and use Gauss–Jordan elimination with partial pivoting. Check the solution by computing max absolute component of A × x − b.

A WORKED EXAMPLE

Using matrix a — one row per line = 2, 1 1, 3, right-hand side b = 5, 7, the result is x1 = 1.6 x2 = 1.8. Change these example inputs to match your task; use the method above to check each step.

What to keep in mind

Square systems only, up to ten unknowns. Singular or near-singular systems are rejected; inconsistent and underdetermined systems are not classified separately. Finite-precision arithmetic is used. Check the domain and the stated convention before using an approximation.

Common questions

Where do the coefficients go?

Each row of A represents an equation, with columns in the same variable order. For 2x + y = 5 and x + 3y = 7, enter rows 2,1 and 1,3, then b as 5,7.

Can this solve nonlinear equations?

No. Products between unknowns, powers of unknowns and trigonometric expressions are not linear coefficients. Use this page only for a linear system.

Methodology maintained by ClarityKit. How these tools are built and checked.