Matrix Equation Solver — Ax = b

Solve Ax = b for a square matrix A and vector b, with every row-reduction step shown. Detects unique, no-solution, and infinite-solution cases. Exact fractions, no rounding. Dimensions up to 6×6.

For a 2-variable system with the working shown differently, see the System of Equations Solver (Cramer's rule).

Solve A x = b (augmented [A | b]) A b x₁ x₂ x unique solution

How to Solve Ax = b

Enter the entries of the square matrix A and the vector b — whole numbers, decimals, and fractions like 1/2 are all accepted.

1

Set the size

Pick a size from 1×1 to 6×6. A must be square to solve Ax = b, and b automatically matches the number of rows in A.

2

Fill in A and b

Type a value into each cell of A and each entry of b. The result updates as you type, and every value is kept as an exact fraction rather than a rounded decimal.

3

Read the solution and steps

If a unique solution exists, x1 through xn appear first. Otherwise the calculator reports no solution or infinitely many solutions, followed by every row operation applied to the augmented matrix [A|b].

Frequently Asked Questions

How do you solve Ax = b for a matrix A?
Form the augmented matrix [A|b] by appending the vector b as an extra column to A, then row-reduce it using elementary row operations. If the left side reduces to the identity matrix, the last column gives the unique solution x. This calculator performs and shows every row operation used.
What does it mean when Ax = b has no solution?
The system Ax = b has no solution when row reduction produces a row where all the coefficients are zero but the right-hand side is not zero — an impossible equation like 0 = 5. This means the equations are inconsistent and no vector x satisfies all of them at once.
What does it mean when Ax = b has infinitely many solutions?
If the rank of A is less than the number of unknowns, at least one variable is free to take any value, and each choice gives a different valid solution — so there are infinitely many solutions. This happens when A is singular (its rows are linearly dependent) but the system is still consistent.
Why does this calculator use fractions instead of decimals?
Matrix entries are stored and combined as exact fractions using integer arithmetic, so results like 1/3 stay exact instead of rounding to 0.333... Row reduction involves many divisions and subtractions, and rounding errors compound quickly, so exact fractions keep every step and the final solution mathematically precise.