Matrix Input
Enter a square coefficient matrix A and a constants vector b. The calculator solves the system Ax = b using Gaussian elimination with partial pivoting.
Formula Used
The calculator solves the linear system Ax = b.
Here, A is the coefficient matrix, x is the unknown vector,
and b is the constants vector.
If det(A) ≠ 0, the unique solution can be written as:
x = A-1b.
For better numerical stability, this tool uses Gaussian elimination with partial pivoting.
The residual check is:
r = Ax − b.
A small residual means the computed solution satisfies the original equations closely.
How to Use This Calculator
- Select the matrix size from 2 × 2 up to 6 × 6.
- Enter all values in the coefficient matrix A.
- Enter each value in the constants vector b.
- Choose decimal places for cleaner output.
- Tick the inverse option when you also need A-1.
- Click the solve button to view the answer above the form.
- Use CSV or PDF buttons to save the result.
Example Data Table
| Equation | x1 coefficient | x2 coefficient | x3 coefficient | b value |
|---|---|---|---|---|
| Equation 1 | 2 | 1 | -1 | 8 |
| Equation 2 | -3 | -1 | 2 | -11 |
| Equation 3 | -2 | 1 | 2 | -3 |
Understanding the Solve AX=B Matrix Calculator
What the system means
A matrix equation is a compact way to write many linear equations. The matrix A stores the coefficients. The vector x stores the unknown values. The vector b stores the constants on the right side. This format is used in algebra, engineering, economics, statistics, and computer graphics.
Why pivoting matters
Direct row elimination can fail when a pivot is zero. It can also become inaccurate when a pivot is very small. Partial pivoting reduces that risk. It swaps rows before elimination. The largest available pivot is moved into the active position. This makes the solution more stable.
How the answer is checked
The calculator does not only show the vector x. It also multiplies A by the computed x. Then it compares the result with b. The difference is called the residual. A residual close to zero is a strong sign that the answer is correct.
Advanced result details
The determinant helps identify whether the system has a unique solution. When the determinant is not zero, the coefficient matrix is invertible. Then the system has one exact solution in theory. If the determinant is zero or nearly zero, the system may have no solution or many solutions.
Practical uses
Students can use this page to verify homework. Teachers can prepare worked examples. Analysts can solve small model systems. Engineers can test linear relationships. The CSV download supports spreadsheet work. The PDF option creates a clean report for records. The chart gives a quick visual view of solution values and residual size.
FAQs
1. What does Ax = b mean?
It means a coefficient matrix A multiplied by an unknown vector x equals a constants vector b. The goal is to find x.
2. What matrix sizes are supported?
This calculator supports square systems from 2 × 2 through 6 × 6. The matrix A must be square for this solver.
3. What method does the calculator use?
It uses Gaussian elimination with partial pivoting. This method improves stability by swapping rows when a stronger pivot is available.
4. What if the determinant is zero?
If the determinant is zero, the system does not have a unique solution. It may have no solution or infinitely many solutions.
5. What is a residual?
The residual is Ax − b after the solution is calculated. A very small residual means the computed answer fits the equations well.
6. Can I download the results?
Yes. The page includes CSV and PDF download buttons after a successful calculation. They save the solution and accuracy checks.
7. Why is the inverse optional?
The inverse is useful for learning and verification. It is optional because elimination usually solves systems faster and more reliably.
8. Is this calculator suitable for homework?
Yes. It shows the solution, determinant, residual checks, graph, and elimination steps. These details help explain the work clearly.