Systems of Linear Equations

Enter the coefficients and the right-hand side of any linear system, and Gauss–Jordan elimination walks through every row operation. You get a unique solution, a proof that no solution exists, or the full parametric solution when there are infinitely many.
Unique solution
The system has exactly one solution; it is shown below together with the full row reduction.
Augmented matrix [A ∣ b]fractions allowed

The column after the divider is the right-hand side b.

Solutionexact
1
2
3

Step-by-step solution

  1. 1

    Set up the augmented matrix

    Write the 3 equations in 3 unknowns as one block matrix [A ∣ b]; the last column is the right-hand side.

    1
    1
    1
    6
    2
    -1
    1
    3
    1
    2
    -1
    2
  2. 2

    Partial pivot: swap R1 ↔ R2

    Bring the largest-magnitude entry of column 1 into row 1 to use it as the pivot.

    R1↔R2R_{1} \leftrightarrow R_{2}
    2
    -1
    1
    3
    1
    1
    1
    6
    1
    2
    -1
    2
  3. 3

    Normalize R1

    Divide row 1 by 2 so the pivot becomes 1.

    R1→12 R1R_{1} \to \frac{1}{2}\,R_{1}
    1
    -1/2
    1/2
    3/2
    1
    1
    1
    6
    1
    2
    -1
    2
  4. 4

    Clear column 1

    R2 → R2 − (1)·R1 · R3 → R3 − (1)·R1

    R2→R2−R1R3→R3−R1R_{2} \to R_{2} - R_{1} \\ R_{3} \to R_{3} - R_{1}
    1
    -1/2
    1/2
    3/2
    0
    3/2
    1/2
    9/2
    0
    5/2
    -3/2
    1/2
  5. 5

    Partial pivot: swap R2 ↔ R3

    Bring the largest-magnitude entry of column 2 into row 2 to use it as the pivot.

    R2↔R3R_{2} \leftrightarrow R_{3}
    1
    -1/2
    1/2
    3/2
    0
    5/2
    -3/2
    1/2
    0
    3/2
    1/2
    9/2
  6. 6

    Normalize R2

    Divide row 2 by 5/2 so the pivot becomes 1.

    R2→152 R2R_{2} \to \frac{1}{\frac{5}{2}}\,R_{2}
    1
    -1/2
    1/2
    3/2
    0
    1
    -3/5
    1/5
    0
    3/2
    1/2
    9/2
  7. 7

    Clear column 2

    R1 → R1 − (-1/2)·R2 · R3 → R3 − (3/2)·R2

    R1→R1+12 R2R3→R3−32 R2R_{1} \to R_{1} + \frac{1}{2}\,R_{2} \\ R_{3} \to R_{3} - \frac{3}{2}\,R_{2}
    1
    0
    1/5
    8/5
    0
    1
    -3/5
    1/5
    0
    0
    7/5
    21/5
  8. 8

    Normalize R3

    Divide row 3 by 7/5 so the pivot becomes 1.

    R3→175 R3R_{3} \to \frac{1}{\frac{7}{5}}\,R_{3}
    1
    0
    1/5
    8/5
    0
    1
    -3/5
    1/5
    0
    0
    1
    3
  9. 9

    Clear column 3

    R1 → R1 − (1/5)·R3 · R2 → R2 − (-3/5)·R3

    R1→R1−15 R3R2→R2+35 R3R_{1} \to R_{1} - \frac{1}{5}\,R_{3} \\ R_{2} \to R_{2} + \frac{3}{5}\,R_{3}
    1
    0
    0
    1
    0
    1
    0
    2
    0
    0
    1
    3
  10. 10

    Read off the solution

    The left half is the identity matrix, so each row gives one variable directly.

    x1=1x2=2x3=3\begin{aligned} x_{1} = 1 \\ x_{2} = 2 \\ x_{3} = 3 \end{aligned}
    1
    0
    0
    1
    0
    1
    0
    2
    0
    0
    1
    3
  11. 11

    Result

    x₁ = 1, x₂ = 2, x₃ = 3