Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Linear Systems Calculator

How to use Linear Systems Calculator
  1. Pick Equations or Augmented Matrix in the Input Mode column; the same system is shown as equations or as the matrix A|b]. [Learn more about the input mode
  2. Pick a method in the Method list: Gaussian Elimination, Gauss-Jordan, Cramer's Rule or Inverse Method; the last two need a square system. Learn more about the methods
  3. Set Equations and Variables (1 to 10); the grid rebuilds and keeps the values that still fit. Learn more about the system size
  4. Type one number per box, a negative coefficient for a subtracted term; Random fills the boxes, Clear empties them. Learn more about entering coefficients
  5. Click Solve System; the Solution box gives the unknowns, No Solution or Infinite Solutions, and a red box lists any empty cell. Reset All returns to an empty 3×3 system. Learn more about solving
  6. Use the Theory, Steps and Graph tabs on the right: the method text, the row operations after solving, and the lines of a two-variable system. Learn more about the panel

Solve and visualize systems of linear equations

Input Mode
Method

System of Equations (3×3)

3 equations, 3 unknowns

Coefficients

1.x₁+x₂+x₃=
2.x₁+x₂+x₃=
3.x₁+x₂+x₃=

Solution

Enter values, choose a method, and click Solve







Choosing the Input Mode

DemoThe matrix view, a typed row, back to equations
Step 0 of 3
The left column of the calculator starts with Input Mode and two buttons. Equations lays the system out one line per equation: a numbered row with a box for each coefficient, the variable names x1,x2,…x_1, x_2, \ldots printed between them, an equals sign and a last box for the constant. Augmented Matrix shows the same numbers as the matrix [A∣b][A|b]: a grid of coefficient boxes on the left, a vertical bar, and a single column of constants on the right. The two views are two pictures of one system, so switching keeps every value you typed and the chosen method; nothing is cleared.

Use Equations when you are copying a system from a textbook, where the signs and variable names help you keep your place. Use Augmented Matrix when you want to see the matrix the row operations will act on, or when a matrix is what you were given. A plus sign is printed between the coefficient boxes in the Equations view, so a subtracted term is typed as a negative coefficient, for example −1-1 for −x2-x_2. The matrix view and its notation are explained in Augmented Matrix Representation.

Choosing the Method

DemoTwo methods, then a non-square system
Step 0 of 3
Under the input mode, the Method list offers Gaussian Elimination, Gauss-Jordan, Cramer's Rule and Inverse Method. Gaussian Elimination is selected when the page opens; a dot marks the current choice. Clicking a method clears the last result but keeps your numbers, and the Theory tab of the panel on the right switches to a short description of that method with a link to its section on this page. All four methods give the same answer for a square system with a unique solution; they differ in how the answer is reached and in what the Steps tab shows afterwards.

Cramer's Rule and Inverse Method need a square system, one with as many equations as unknowns. As soon as the two size boxes differ, those two buttons grey out, cannot be clicked, and an orange note says that some methods require square systems. If one of them is already selected when you make the system non-square, clicking Solve System reports that the method requires a square system; pick Gaussian Elimination or Gauss-Jordan instead, which also handle systems with no solution or infinitely many solutions. Each method is explained in its own section, starting with Gaussian Elimination.

Setting the System Size

DemoA 2×2 system, a 2×4 system, Reset All
Step 0 of 3
Above the coefficient boxes sit the two size boxes, Equations and Variables, both set to 33 when the page opens, so the editor shows a 3×33 \times 3 system; the heading System of Equations (3×3) and the note "3 equations, 3 unknowns" repeat the size. Each box takes a whole number from 11 to 1010; a value outside that range is ignored and the boxes keep their old number. Changing a size rebuilds the grid at once: boxes that still fit keep their values, new rows or columns arrive empty, and the last result is cleared.

A system with more unknowns than equations, such as 2×42 \times 4, can only have no solution or infinitely many, and a system with more equations than unknowns is usually inconsistent; both are allowed, but only Gaussian Elimination and Gauss-Jordan can solve them, as the note under the boxes warns. The Reset All button at the top right of the editor returns the size to 3×33 \times 3, empties every box, selects Gaussian Elimination and the Equations view, and clears the result and the panel. Why the shape of the system decides the kind of answer is explained in Types of Solutions.

Entering the Coefficients

DemoRandom, Clear, then a system typed by hand
Step 0 of 3
Type one number per box. In the Equations view each row reads coefficient, variable, plus, coefficient, and so on up to the equals sign and the constant; a term that is missing from an equation gets 00, and a subtracted term gets a negative coefficient. In the Augmented Matrix view the coefficients fill the grid row by row and the constants fill the column after the bar. Decimals and negative numbers are accepted; an empty box shows the grey placeholder 00 but counts as missing when you solve, so fill every box. Pressing Tab moves to the next box.

Two buttons sit above the boxes. Random fills every coefficient and constant with a whole number from −10-10 to 1010, useful for trying a method on a system you do not have to type; the size stays as it is. Clear empties every box but keeps the size, the method and the view. Both clear the last result. A worked system to type is x1+x2+x3=6x_1 + x_2 + x_3 = 6, 2x1−x2+x3=32x_1 - x_2 + x_3 = 3, x1+2x2−x3=2x_1 + 2x_2 - x_3 = 2, whose solution is x1=1x_1 = 1, x2=2x_2 = 2, x3=3x_3 = 3. How the typed numbers form the matrix [A∣b][A|b] is explained in Augmented Matrix Representation.

Solving the System and Reading the Result

DemoA unique solution, an error list, no solution, infinite solutions
Step 0 of 4
Click Solve System under the boxes. The calculator first checks the input: every empty or non-numeric box is listed in a red box headed "Please fix the following", naming the row and the variable, for example "Coefficient at row 1, x₁ is empty or invalid", and a square-only method on a non-square system is reported there too. When the input is complete, the answer appears in the Solution box below the button and the panel on the right switches to the Steps tab.

Three answers are possible. A unique solution lists every unknown, x1=1x_1 = 1, x2=2x_2 = 2, x3=3x_3 = 3 for the worked system above, with a note on why it is unique: the rank of AA equals the number of unknowns, or, for Cramer's Rule and the Inverse Method, the value of det⁡(A)\det(A), here 77. No Solution appears in red with the ranks that disagree, for example x1+x2=2x_1 + x_2 = 2 together with x1+x2=3x_1 + x_2 = 3 gives rank 11 for AA but rank 22 for [A∣b][A|b]. Infinite Solutions appears in orange when the rank is below the number of unknowns, as for x1+x2=2x_1 + x_2 = 2 with 2x1+2x2=42x_1 + 2x_2 = 4. Cramer's Rule and the Inverse Method stop with a message whenever det⁡(A)=0\det(A) = 0 instead of telling the two cases apart. The three cases are explained in Types of Solutions.

The Theory, Steps and Graph Panel

DemoSteps after solving, the graph, back to theory
Step 0 of 3
The panel on the right has three tabs. Theory is shown when the page opens: it names the selected method and gives a short description of what it does, ending with a link to the section of this page that explains it. Steps is empty until you solve; then the calculator jumps to it and lists the work, starting with the augmented matrix, then each row swap and each row operation such as R2←R2−(2)R1R_2 \leftarrow R_2 - (2)R_1 with the matrix after it, and finally the back-substitution or the RREF from which the unknowns are read. For Cramer's Rule the steps list the determinants, for the Inverse Method the inverse matrix. Graph draws the equations as lines for a system in two unknowns and marks the intersection when the solution is unique; for other sizes it explains that only two-variable systems are drawn.

Click a tab at any time to switch; the tabs do not change the input or the result, and the panel returns to Theory when you press Reset All. For the system 2x1+x2=52x_1 + x_2 = 5, x1−x2=1x_1 - x_2 = 1 the solution is x1=2x_1 = 2, x2=1x_2 = 1 and the graph shows the two lines meeting at (2,1)(2, 1). The row operations the Steps tab lists are explained in Gaussian Elimination and the two forms they aim for in Row Echelon Form vs Reduced Row Echelon Form.

Gaussian Elimination

Gaussian elimination reduces an augmented matrix [A∣b][A|\mathbf{b}] to row echelon form (REF) through three elementary row operations: swapping rows, scaling a row by a nonzero constant, and adding a multiple of one row to another.

The process works column by column from left to right. For each column, a pivot element is selected (using partial pivoting for numerical stability), and all entries below the pivot are eliminated. The result is an upper triangular system that is solved via back-substitution, working from the last equation upward.

a11x1+a12x2+⋯=b1a_{11}x_1 + a_{12}x_2 + \cdots = b_1

a22x2+⋯=b2a_{22}x_2 + \cdots = b_2

⋱\ddots


Gaussian elimination has O(n3)O(n^3) time complexity and is the foundation of most direct solvers for linear systems.

The lesson works the algorithm through in Forward elimination and Back substitution; Partial pivoting explains the pivot choice this calculator makes, and Computational cost the O(n3)O(n^3) count.

Gauss-Jordan Elimination

Gauss-Jordan elimination extends Gaussian elimination by continuing to reduce the matrix to reduced row echelon form (RREF). After creating zeros below each pivot (forward elimination), it also eliminates all entries above each pivot (backward elimination) and scales each pivot to 1.

The result is an identity-like structure on the left side of the augmented matrix, and the solution vector appears directly in the rightmost column — no back-substitution is needed.

Gauss-Jordan is slightly more expensive than standard Gaussian elimination (roughly 50% more operations) but produces a cleaner final form. It is also the method used to compute matrix inverses by applying the process to [A∣I][A|I].

See Gauss-Jordan elimination for the full procedure, Reduced row echelon form for the target form, and Computing the inverse by row reduction for the same idea applied to [A∣I][A|I].

Cramer's Rule

Cramer's Rule solves a square system Ax=bA\mathbf{x} = \mathbf{b} by expressing each unknown as a ratio of determinants:

xi=det⁡(Ai)det⁡(A)x_i = \frac{\det(A_i)}{\det(A)}


where AiA_i is the matrix AA with its ii-th column replaced by b\mathbf{b}. The method requires det⁡(A)≠0\det(A) \neq 0, meaning the system must have a unique solution.

While Cramer's Rule is elegant and useful for theoretical analysis and small systems (2x2, 3x3), it becomes computationally impractical for large systems due to O(n!)O(n!) complexity of naive determinant computation. For practical computation, Gaussian elimination is preferred.

The rule is proved in Cramer's rule; Singular and nonsingular matrices explains why det⁡(A)=0\det(A) = 0 rules it out, and Determinant-based formulas places it among the other determinant formulas.

Inverse Method

The inverse method solves Ax=bA\mathbf{x} = \mathbf{b} by computing x=A−1b\mathbf{x} = A^{-1}\mathbf{b} directly. This requires AA to be square and non-singular (det⁡(A)≠0\det(A) \neq 0).

The calculator finds A−1A^{-1} using Gauss-Jordan elimination on the augmented matrix [A∣I][A|I]. Row operations transform the left side into II, and the right side becomes A−1A^{-1}.

The inverse method is most useful when solving multiple systems with the same coefficient matrix but different right-hand sides, since A−1A^{-1} only needs to be computed once. For a single system, Gaussian elimination is more efficient because computing the full inverse requires more operations than directly solving the system.

See Solving systems with the inverse, When does the inverse exist and, for the warning in the last paragraph, When not to compute the inverse.

Types of Solutions

A system of linear equations has exactly one of three solution types:

Unique solution -- the system has exactly one set of values satisfying all equations. This occurs when the coefficient matrix has full rank (rank equals the number of unknowns). The graph shows lines intersecting at a single point.

Infinitely many solutions -- the system is consistent but underdetermined. This occurs when the rank is less than the number of unknowns and no contradictions exist. Solutions form a line, plane, or higher-dimensional subspace.

No solution -- the system is inconsistent. This occurs when row reduction produces a row of the form [0  0  ⋯  0  ∣  c][0 \; 0 \; \cdots \; 0 \; | \; c] where c≠0c \neq 0. Geometrically, this means parallel lines or planes that never intersect.

The three cases are introduced in The three possible outcomes and proved in The three cases combined; Rank and linear systems gives the rank test, and Detecting inconsistency shows the tell-tale row.

Augmented Matrix Representation

The augmented matrix [A∣b][A|\mathbf{b}] combines the coefficient matrix and the constants vector into a single matrix for efficient manipulation. For a system with mm equations and nn unknowns:

[a11a12⋯a1nb1a21a22⋯a2nb2⋮⋮⋱⋮⋮am1am2⋯amnbm]\left[\begin{array}{cccc|c} a_{11} & a_{12} & \cdots & a_{1n} & b_1 \\ a_{21} & a_{22} & \cdots & a_{2n} & b_2 \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} & b_m \end{array}\right]


Row operations on the augmented matrix correspond exactly to valid algebraic manipulations of the equations. The calculator supports both equation input (showing the algebraic form) and matrix input (showing the augmented matrix directly).

See The augmented matrix and Elementary row operations in the linear systems lesson.

Row Echelon Form vs Reduced Row Echelon Form

Row echelon form (REF) is the result of Gaussian elimination. Requirements: all zero rows are at the bottom, each leading entry (pivot) is to the right of the one above it, and all entries below each pivot are zero. REF requires back-substitution to find the solution.

Reduced row echelon form (RREF) is the result of Gauss-Jordan elimination. In addition to REF requirements: every pivot equals 1, and every pivot is the only nonzero entry in its column. The solution can be read directly from the final matrix.

RREF is unique for any given matrix, while REF is not (different pivot choices produce different REF forms). Both forms preserve the solution set of the original system.

Both forms are defined in Row echelon form and Reduced row echelon form; Uniqueness of RREF proves the last claim.